Snippets
-
Custom template suggestions
If we want to have different template suggestions, such as based on url alias, we do so in preprocess function of that hook (you can use _block, _page,...)
-
Detect if the user is opening a page in the overlay
<?php
if (module_exists('overlay')) {
if (overlay_get_mode() == 'child') {
// yes, we are in the overlay -
Drupal 6 - user picture imagecache
<?php
// imagecache preset for user picture
function assistng_user_picture($account, $size = 'user_picture') { -
Create default imagecache preset programmatically - Drupal 6
Applies to imagecache 2.x
-
Disable "grippie" (resizable) on text area
Via form_alter, find the textarea you want to change.
Set #resizable attribute to FALSE; -
Tabs - menu local tasks - when ctools enabled
Ctools overrides the local tabs behaviour and when you want to override the themable function you need to call ctools code as well.
<?php
function mytheme_menu_local_tasks() {
$output = '';