jonathanpglick


Member since 04/17/2009

13 snippets

2738 profile views

2 Comment(s) Posted

View their favorites

Profile

Achievement

first submission:submitting first snipplet

jonathanpglick's Recent SnippetsTagged drupal



« Prev 1 Next »
Foromat {timestamp} as a "x x ago" date/time.
0 1322 posted 13 years ago by jonathanpglick
It's not immediately clear from the `context_set()` function how to trigger a context to be "active" using code. Do it like this:
0 1107 posted 14 years ago by jonathanpglick
This override function for the default Drupal.toggleFieldset function adds code that looks for instances of TinyMCE inside the fieldset and triggers the autoresize on them when the fieldset is opened. Otherwise TinyMCE renders with a weird height.
0 1097 posted 14 years ago by jonathanpglick
Render the contents for a single node field.
0 881 posted 14 years ago by jonathanpglick
If you're importing nodes from a file and have pathauto setup, the existing paths for the nodes will be rewritten with pathauto. To avoid this, simply add the following to the node export array for each node:
0 1038 posted 14 years ago by jonathanpglick
The total number of search results can be added in a hook_preprocess_search_results() function from the following variable:
0 1189 posted 14 years ago by jonathanpglick
Drupal 6 Do this after $view->execute() has already been called
0 1184 posted 14 years ago by jonathanpglick
This example triggers the admin theme when on any of the user/* pages (login, edit, etc.). Put the name of your admin theme in {admin-theme-name} so there's a safe fallback in case variable_get doesn't find the admin_theme.
0 1096 posted 15 years ago by jonathanpglick
If `views_embed_view()` or just `$view->execute()` are called, the default view settings are used (only shows 10 entries, etc.) so we have to call `$view->set_display()` & `$view->pre_execute()`.
0 928 posted 16 years ago by jonathanpglick
This function goes in the {module\_name}.views\_default.inc file
0 901 posted 16 years ago by jonathanpglick
This will trigger views to load the views in the file {module\_name}.views\_default.inc
0 886 posted 16 years ago by jonathanpglick
1 1361 posted 16 years ago by jonathanpglick
« Prev 1 Next »