5.x

Emfield WTF!

  1. /**
  2.  * the embedded flash displaying the Vimeo video
  3.  */
  4. function theme_video_cck_vimeo_flash($embed, $width, $height, $autoplay) {
  5. watchdog('emfield', print_r($embed, TRUE));
  6.   $output = '';
  7.  

template.php for D5 theming of UC checkout and cart

  1. /**
  2.  * Overriding theme_uc_cart_block_content() to hide
  3.  * TOTAL from Wholesalers
  4.  *
  5.  * Theme the shopping cart block content.
  6.  */
  7. function phptemplate_uc_cart_block_content() {
  8.   global $user

db_rewrite_sql for filtering on CCK type

  1. /**
  2.  * Rewrite search query to search only show results where
  3.  * the "status" CCK field is "approved"
  4.  */

Adding stock levels to Add To Cart variations drop-down

  1. /**
  2.  * Implementation of hook_form_alter().
  3.  */
  4. function madebyniki_form_alter($form_id, &$form) {
  5.   //adding stock levels to add to cart drop down

phptemplate css code

  1. function _phptemplate_variables($hook, $vars = array()) {
  2.   switch ($hook) {
  3.     case 'page':
  4.       $css = drupal_add_css('sites/all/themes/madebynikki/cmspros.css', 'theme');

A port of the popular "myform_sample" multiplication forms API

  1. <?php
  2.  
  3.  
  4.  
  5. /**
  6.  
  7. * A small example module of using the form api
  8.  
  9. * to display and process a form
  10.  
  11. * that is not used to extend the basic node content type
  12.  
  13. *
Syndicate content