stborchert

uc_checkout_pane_payment override

  1. function my_uc_checkout_pane_payment($op, &$arg1, $arg2) {
  2.   switch ($op) {
  3.     case 'review':
  4.       // do custom stuff
  5.     default:
  6.       // back to defaults
  7.       return uc_checkout_pane_payme

view#2

  1. $view = new view;
  2. $view->name = 'paged_view';
  3. $view->description = 'Paged view';
  4. $view->tag = '';
  5. $view->view_php = '';
  6. $view->base_table = 'node';
  7. $view->is_cacheable = FALSE;
  8. $view->api_versi

view#1

  1. $view = new view;
  2. $view->name = 'nodes';
  3. $view->description = 'Nodes';
  4. $view->tag = '';
  5. $view->view_php = '';
  6. $view->base_table = 'node';
  7. $view->is_cacheable = FALSE;
  8. $view->api_version = 2;
  9. $

Term-View

  1. $view = new view;
  2. $view->name = 'terms';
  3. $view->description = '';
  4. $view->tag = '';
  5. $view->view_php = '';
  6. $view->base_table = 'term_data';
  7. $view->is_cacheable = FALSE;
  8. $view->api_version = 2;
  9. $

Node file gallery

  1. $view = new view;
  2. $view->name = 'node_image_gallery';
  3. $view->description = '';
  4. $view->tag = '';
  5. $view->view_php = '';
  6. $view->base_table = 'node';
  7. $view->is_cacheable = FALSE;
  8. $view->api_version

Latest item + title list

  1. $view = new view;
  2. $view->name = 'news_block';
  3. $view->description = '';
  4. $view->tag = '';
  5. $view->view_php = '';
  6. $view->base_table = 'node';
  7. $view->is_cacheable = FALSE;
  8. $view->api_version = 2;
  9. $

Fix for undpaul - ASCII

  1. <!--
  2.                            _|                                _|            _|            
  3.                            _|                                _|            _|            
  4.  _|    _|  

undpaul - ASCII

  1. <!--
  2.                            _|                                _|            _|            
  3.                            _|                                _|            _|            
  4.  _|    _|  

pdf in new window

  1. Drupal.behaviors.pdfNewWindow = function(context) {
  2.   $("a[@href$=pdf]", context).each(function() {
  3.     $(this).attr('target', '_blank');
  4.   });
  5. }

"Show password" for Drupal

  1. /**
  2.  * Add a "Show password" checkbox to each password field.
  3.  */
  4. Drupal.behaviors.showPassword = function (context) {
  5.   // Create the checkbox.
  6.   var showPassword = $('<label><input type="checkb

checkbox

  1. <?php
  2. $checkbox = array(
  3.   '#title' => t('Empty Log'),
  4.   '#value' =>0,
  5.   '#return_value' => 1,
  6.   '#description' => ''
  7. );
  8. $output .= theme_checkbox(array('element' => $checkbox));
  9. ?>

links gefummel

  1. /**
  2.  * Override node template variables.
  3.  */
  4. function mymodule_preprocess_node(&$vars) {
  5.   $node_links = isset($vars['node']->links) ?

Fix for Code

  1. function dingens_preprocess_page(&$vars) {
  2.   if ($vars['node'] && count($vars['node']->taxonomy)) {
  3.     $term_names = array();
  4.     foreach ($vars['node']->taxonomy as $tid => $term) {
  5.       $term_

Code

  1. function dingens_preprocess_page(&$vars) {
  2.   if ($vars['node'] && count($vars['node']->taxonomy)) {
  3.     $term_names = array();
  4.     foreach ($vars['node']->taxonomy as $tid => $term) {
  5.       $term_

user has nodes of type

  1. $count_nodes = db_result(db_query("SELECT COUNT(*) FROM {node} WHERE type = '%s' AND uid = %d", 'story', 5))

Fix for custom logout

  1. <?php
  2. /**
  3.  * Custom logout function to display messages after logout.
  4.  */
  5. function evlka_logout() {
  6.   global $user;
  7.   watchdog('user', 'Session closed for %name.', array('%name' => $user->name))

Code

  1. <?php
  2. /**
  3.  * Custom logout function to display messages after logout.
  4.  */
  5. function evlka_logout() {
  6.   global $user;
  7.   watchdog('user', 'Session closed for %name.', array('%name' => $user->name))

logout

  1. function evlka_logout() {
  2.   global $user;
  3.   watchdog('user', 'Session closed for %name.', array('%name' => $user->name));
  4.   // Save messages.
  5.   $messages = (isset($_SESSION['messages']) ?

modul-Zusatz

  1. /**
  2.  * Check if a user has a registration node and an event-registration node.
  3.  * @param $user
  4.  *   User object to check.
  5.  * @return
  6.  *   TRUE if the user has such nodes, otherwise FALSE.
  7.  */

show/hide fields

  1. /**
  2.  * Conditionally show/hide the group registration upload field.
  3.  */
  4. Drupal.behaviors.evlkaShowUploadField = function () {
  5.   // Initially show/hide the upload field based on the checkbox state.
Syndicate content