Skip to content

Category Archives: drupal

Enhancing Drupal performance with drupal_static

One of the easiest methods of optimizing the execution of PHP script is by using a static variable. Imagine a function that does some complex calculations, possibly executes several database queries. If the return value from the function does not change too often and the function may be called several times during single request, it [...]

Disable “published by” heading from teaser

I wanted to change the way teasers are displayed – disable this information about the node submission: published by admin on Fri, 04/22/2011 – 17:25. As it turns out, there is a variable that Drupal checks when generating submission information. The variable is set per each content type in a format node_submitted_<NODE TYPE>, e.g., node_submitted_page [...]

WYSIWYG module, loads of checkboxes, problem and solution

Update on 2011.12.01: the script doesn’t work for my FF8 anymore, looks like checkboxmate-lefedor-edition is a way to go now. Upon installing WYSIWYG module in Drupal 7, site builder is presented with rather annoying task of selecting all the buttons to be enabled. The corresponding section of the WYSIWYG form – “buttons and plugins” is [...]

Non-database field in custom Drupal views 2

Drupal views 2 API allows creating views based on any table. Most of the fields you will be displaying will be based on the table columns but it may sometimes be handy to create a non-database field. Usually it will be a field that you need to compute – maybe based on some other fields [...]