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
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
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...
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']...
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)...
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...
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
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...
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; }
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'; } }