Drupal is an open source Content Management System (CMS) built in PHP. It is used by a wide variety of websites from large corporates through to smaller startups. Drupal is hugely flexible which is what makes it such a great framework around which to build almost any type of website. At ComputerMinds we are a Drupal only development house so Drupal is all we do, all day, every day. To find out more about Drupal and how it can work for you have a look at some of our Drupal articles below and feel free to explore our site further to see how ComputerMinds might be able to help you realise your web goals.
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
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'; } }
There are times when it's necessary to add some additional markup to a particular menu item, for example a link to DrupalMinds might need a strong tag around the Drupal portion. This can be achieved in a couple of ways, both using a very similar theme override. Option 1 The first method is to allow HTML in the title of all menu items - while this is nice and easy, it does mean that you...
By default the Drupal event module will provide a nice calander block, listing the days of the week accross the top using 3 letter abbreviations (mon, tue etc). This little theme snippet will override this default behaviour and display the first letter of each day of the week (i.e. M T W) etc. Pop the following into your template.php file and you should be in business function phptemplate_event_calendar_month($op, $header, $rows, $attributes = array(), $caption =...
TinyMCE has a habit of popping up right where you don't want it - the log field on a node edit page is a good example. Lucklily it is a relatively easy job to theme out tinymce for a particular textarea. The following theme override should go into your template.php file function phptemplate_tinymce_theme($init, $textarea_name, $theme_name, $is_running) { switch($textarea_name){ case 'nodewords-description': case 'edit-nodewords-description': unset($init); return $init; break; default: return theme_tinymce_theme($init, $textarea_name, $theme_name, $is_running); } } Just...
One of the most annoying things about developing a Drupal theme is the lack of an 'active' class on your primary links. By default the primary links are given a class of menu-X-Y-Z-active if they are active. From a theming point of view, this is next to useless, you need a nice standalone active class on your primary links. So - here is a very simple snippet for your template.php file ... function _phptemplate_variables($hook,$vars){ if...
We have had a few sites recently on which TinyMCE was playing up on narrow themes. The buttons where not breaking onto new lines, causing the TinyMCE textarea to be much too wide. We solved the problem with the following snippet of CSS .mceToolbarTop * { float:left; } .mceToolbarTop select { width:auto!important; } .mceToolbarTop option { float:none; }