-
Customize links menu in Drupal
Tested on: Zen theme, Drupal 5.7 Copy function theme_links from includes/themes.inc Paste it into your template.php Rename it in theme_primarylinks (or anything you want) In your page.tpl.php, change print theme(‘links’, $primary_links); to print theme(‘primarylinks’, $primary_links); Apply some changes to theme_primarylinks to customize your primary links. According to theme manual, for any first argument passed to […]
-
Contemplate and views: create a link without $node->path
In contemplate and views, $node->path return current page path. But this variable is only available to users with “administer alias” permission, so as administrator you can view links, but as normal user you cannot use them. Here a $node->path alternative: l(strip_tags($node->title),”node/”.$node->nid) Since $node->title is raw input, strip_tags strips all HTML tags. A node/$node->nid links to […]
-
Enable user profile field token on Drupal
Tested on: Drupal 5.x (Profile module included) Token Personalized E-mails 5.x-1.0 In token module directory, rename token_user.inc to token_user.inc.orig Copy pmail/patches/token_user.inc in Token module directory Go to Personalized E-mails setting and watch your profile fields as tokens.
-
Raise Drupal files upload limit
In your Drupal site, go to admin/settings/uploads Raise upload limits. If the value you want to insert is greater than PHP allowed value: On bottom of your .htaccess file (drupal/.htaccess) add these lines: # upload settings # cfr. http://it.php.net/manual/it/function.ini-set.php php_value post_max_size 50M php_value upload_max_filesize 50M php_value memory_limit 128MChange values as you wish. Return to admin/settings/uploads […]
-
Improve Drupal performance
I use YSlow to check a Drupal site performance. Here some tips to get an A with Drupal 5.x. Step 1: Fewer HTTP requests: Aggregate CSS (/admin/settings/performance) Aggregate JS with Javascript Aggregator (experimental). To avoid JavaScript errors in some modules (i.e. TinyMCE), you can use the dirscard list patch by derjochenmeyer on the dev version […]