theme

How theme variables work

  1. //in win.module
  2.  
  3. <?php
  4. /*
  5.  * Implementation of hook_preprocess_node
  6.  */
  7. function win_preprocess_node(&$variables) {
  8.   switch ($variables['node']->type) {
  9.     //Win a Prize
  10.     case 'win_prize

Fancybox

  1. function zen_preprocess_node(&$variables, $hook) {
  2.   // Add $unpublished variable.
  3.   $variables['unpublished'] = (!$variables['status']) ?

Fix for Node template with jquery ui tabs

  1. <?php if($teaser==true) : ?>
  2. <div id="node-<?php print $node->nid; ?>" class="node <?php print $node_classes; ?>">
  3.         <h2 class="title"><a href="<?php print $node_url ?>" title="<?php print $title ?>"

Looking to create a custom pager

  1. Guys i'm looking to make some changes to the default pager that is being generated by my view called frontpage.

Fix for Node template with jquery ui tabs

  1. <?php if($teaser==true) : ?>
  2. <div id="node-<?php print $node->nid; ?>" class="node <?php print $node_classes; ?>">
  3.         <h2 class="title"><a href="<?php print $node_url ?>" title="<?php print $title ?>"

Drupal 6 equivalent of stylesheets-override[]

  1. function phptemplate_preprocess_page(&$vars) {
  2.   // Override system.css with theme version, but keep its position.
  3.   // So much to stylesheets-override[] .info property being needless...
  4.   // @see

Fix for Using jquery cycle and lightbox in node tempalte using image field images

  1. <?php
  2.  drupal_add_js(path_to_theme() .'/jquery.cycle.js', 'theme');
  3.  drupal_add_js("
  4.   $(document).ready(function(){
  5.     $('#photos').cycle({
  6.      fx:     'fade',
  7.      speed:  2500,
  8.      t

Simplenews email with links to attachments

  1. // This code allows one to override the default email output generated by the Simple News module.
  2. // This was specifically designed to allow for the inclusion of links for attachments, as the default

Fix for Simplenews email with links to attachments

  1. // This code allows one to override the default email output generated by the Simple News module.
  2. // This was specifically designed to allow for the inclusion of links for attachments, as the default

Fix for Node template with jquery ui tabs

  1. <?php if($teaser==true) : ?>
  2. <div id="node-<?php print $node->nid; ?>" class="node <?php print $node_classes; ?>">
  3.         <h2 class="title"><a href="<?php print $node_url ?>" title="<?php print $title ?>"
Syndicate content