328 Results
  • Latest
  • Oldest
Article
Posted on 20th January 2008
Takes about 1 min to read

This small theme override will allow you to select which Drupal textareas the image assist icon will appear on /** * Theme for adding an image link underneath textareas */ function phptemplate_img_assist_textarea_link($element, $link) { if ($element['#id']=='edit-body'){ return theme_img_assist_textarea_link($element, $link); } } The above code will limit the icon to appearing on only the node edit body fields, you can add more ids as required

Published in: #Drupal #Drupal Planet
Article
Posted on 28th December 2007
Takes about 1 min to read

The Drupal association have just rolled out a new logo and are having a bit of a membership drive ... so if you haven't joined yet do now! http://drupal.org/node/204175

Published in:
Article
Posted on 21st December 2007
Takes about 1 min to read

Just a quick one this, and not strictly Drupal related - but might save you some time when you are writing modrewrite rules to rewrite legacy URLs. The problem : We had a whole bunch of legacy URLs in the format index.php?Page=SomePageHere which we needed to rewrite to point at some shiny new Drupal URLs. A simple RewriteRule wasn't working, and after a bit of digging we discovered you can't reference the querystring within a...

Published in: #Drupal #Drupal Planet
Article
Posted on 16th December 2007
Takes about 1 min to read

You have to be a little careful with this one, but there are many times when in would be very handy to have HTML in your Drupal menu items. For example, you might want your Drupal menu to have a
to force a break, or perhaps insert a around some content to get a two-tone menu item Add the following to your Drupal theme's template.php file function phptemplate_menu_item_link($item, $link_item) { $output = l($item['title']...

Published in: #Drupal #Drupal Planet
Article
Posted on 16th December 2007
Takes about 1 min to read

The Drupal search block form is one of those things that gets used in most themes, and frequently needs a bit of themeing to bring it in line with your target design. The following snippet (which needs to live in your template.php file) will change the word "Search" in the submit button to "Go", and will add a title to the search terms box ... function phptemplate_search_block_form($form) { $form['search_block_form_keys']['#title']='search the site'; $form['search_block_form_keys']['#size']=10; $form['submit']['#value']='GO!'; return drupal_render($form)...

Published in: #Drupal #Drupal Planet
Article
Posted on 16th December 2007
Takes about 1 min to read

The contact page exposed by the Drupal contact module is great, it allows you to put together a contact form quickly and easily. But there is one small(ish) problem, the header text for the form is being filtered - which prevents you from using certain tags (for example embed). We found this problem when trying to embed a youtube movie onto the drupal contact form. The solution is a little bit of themeing - put...

Published in: #Drupal #Drupal Planet
Article
Posted on 13th December 2007
Takes about 1 min to read

One of the classic Drupal problems that catches a lot of newbies out is the memory error exhausted error. Typically you get this on the modules page - but it could appear almost anywhere. Its nothing much to worry about and can be easily solved by following the advice posted here http://drupal.org/node/76156

Published in: #Drupal #Drupal Planet
Article
Posted on 12th December 2007
Takes about 2 mins to read

Its always the way, you go months without dealing with flash in Drupal when all of a sudden you get 5 people all asking the same thing, how do you deal with flash in Drupal. We use the swftools module (http://drupal.org/project/swftools), these excellent modules give you an easy way to embed flash objects in your Drupal site. We will cover the basics of adding flash content to your Drupal site below. Download swftools from drupal.org...

Published in: #Drupal Planet
Article
Posted on 11th December 2007
Takes about 1 min to read

You may have spotted that for some Drupal themes in some versions of Firefox the titles on fieldsets are sometimes not there ... This little CSS snippet should solve the problem ... fieldset legend {display:block; }

Published in: #Drupal #Drupal Planet
Article
Posted on 10th December 2007
Takes about 1 min to read

Drupal's handling of RSS's feeds is generall excellent, BUT sometimes it's nice to add a bit of explanation text to the standard orange feed icon. Add this little snippet to your template.php file and you can add a bit of text to your Drupal feed icon. function phptemplate_feed_icon($url) { if ($image = theme('image', 'misc/feed.png', t('Syndicate content'), t('Syndicate content'))) { return ''. $image. ' RSS feed'; } }

Published in: #Drupal