tags: music


template.php

For overriding various theme functions.

<?php
/***
* template.php
*
* This file contains functions for over-riding the default theme functions
* in Drupal core and modules (look at the API documentation for more info).
* The functions don't actually _do_ anything, except pass the variables
* available to phptemplate for use in the *.tpl.php files.
*
* Add similar 'stub' functions to override other default theme functions.
*/

  // variables for fixing topics to 'on_topic' only:
function _phptemplate_variables($hook, $vars) {
 
// if ($hook == 'page') {
  // }
 
if ($hook == 'node') {
  }
  if (
module_exist('taxonomy') && $vars['node']->nid) {
    foreach (
taxonomy_node_get_terms($vars['node']->nid) as $term) {

     
// Change '123' with the vocabulary id.
     
if ($term->vid == '1') {
       
$vars['node_terms'] = $vars['node_terms'] . eregi_replace('[^a-z0-9]', '-', $term->name);
      }
    }
  }
 
// enable me to add service links to templates:
 
if (module_exist('service_links')) {
       
$vars['service_links'] = theme('links', service_links_render($vars['node']));
  }
  return
$vars;
}

 
// move rss icon to centre and give it css class:
function skipMain_feed_icon($url) {
  return
_phptemplate_callback('feedicon', array('url' => $url));
}

function
skipMain_xml_icon($url) {
  return
_phptemplate_callback('feedicon', array('url' => $url));
}

// Quotes module formatting:
function skipMain_quotes_quote($node) {
  return
_phptemplate_callback('quotes', array('node' => $node));
}

// Today's Music title
function flexinode_form_alter($form_id, & $form) {
  if (isset (
$form['type']) && $form['type']['#value'] === 'flexinode-4' && $form['type']['#value'] . '_node_form' == $form_id) {
    global
$user;
           
$form['title']['#default_value'] = t('Today\'s Music') . " " . date('d-m-Y');
  }
}

// upcoming event item
function skipMain_event_upcoming_item($node) {
  return
_phptemplate_callback('event-item', array('node' => $node));
}

//next - prev links (for 'listenings' nodes)
function next_prev($current_nid, $type, $button_type, $label, $class) {
  
$tid = db_result(db_query(db_rewrite_sql("SELECT tid FROM {term_node} WHERE nid = $current_nid;")));
   if (empty(
$tid)){
    return
'';
   }

   switch (
$button_type) {
     case
'next':
      
$sort= 'DESC';
      
$case = '< ';
       break;
     case
'prev':
      
$sort = 'ASC';
      
$case = '> ';
       break;
     case
'parent':
      
$name = db_result(db_query(db_rewrite_sql("SELECT name FROM {term_data} WHERE tid = $tid;")));
       return
l($label.'up', "$name", array('title' => $name, 'class' => $class));
       break;
     case
'last':
      
$sql  = "SELECT n.nid, n.title FROM node n INNER JOIN term_node t ON n.nid = t.nid";
      
$sql .= " INNER JOIN term_data r ON t.tid = r.tid WHERE n.type = '". $type ."'";
      
$sql .= " AND r.tid = $tid AND n.status = 1 ORDER BY nid ASC LIMIT 0 , 1";
      
$result = db_fetch_array(db_query(db_rewrite_sql($sql)));
       return
l($label, 'node/'. $result['nid'], array('title' => $result['title'], 'class' => $class));
       break;
     case
'first':
      
$sql  = "SELECT n.nid, n.title FROM node n INNER JOIN term_node t ON n.nid = t.nid";
      
$sql .= " INNER JOIN term_data r ON t.tid = r.tid WHERE n.type = '" .$type. "'";
      
$sql .= " AND r.tid = $tid AND n.status = 1 ORDER BY nid DESC LIMIT 0 , 1";
      
$result = db_fetch_array(db_query(db_rewrite_sql($sql)));
       return
l($label, 'node/'. $result['nid'], array('title' => $result['title'], 'class' => $class));
       break;
     default:
       return
NULL;
       break;
   }
  
$sql = "SELECT n.nid, n.title FROM {node} n INNER JOIN {term_node} t ON n.nid = t.nid ";
  
$sql .= "INNER JOIN {term_data} r ON t.tid = r.tid WHERE n.type = '". $type ."' AND n.nid ". $case;
  
$sql .= $current_nid ." AND r.tid = ". $tid ." AND n.status = 1 ORDER BY nid ". $sort;
  
$result = db_fetch_array(db_query(db_rewrite_sql($sql)));
   if (!
$result) {
     return
NULL;
     return
l($label.$name, "$type/tid/$tid", array('title' => $name, 'class' => $class));
   } else {
     return
l($label, 'node/'. $result['nid'], array('title' => $result['title'], 'class' => $class));
   }
}
?>






Sue Ashby and Lynn Heraud

Some of you may know of this already - here is a little bit of history and an extremely rare treat!  ...read more »

Albums: 




Electric Mayhem Band - "'Zat You, Santa Claus?"





Prologue, Part 2

The Neuros sensed the Hunter's imminent mental collapse and responded quickly by feeding a gentle melody into the earbuds, Schumann's Traumerei played gently on a beautiful Bösendorfer to a hushed Festival Hall. Once it would have soothed him, helped him to focus his mind but tonight, it reverberated cruelly around his skull, mocking the dreaful seriousness of the situation. The Shadow was closer and more oppressive than it had ever been.  ...read more »





Prologue, Part 1

The staccato bursts of the girl's rifle firing up the staircase faded as the Hunter ran quietly out of the old building. It took all his willpower to resist the urge to look back, to stay and help the girl. He knew she was good enough not to let the horror of the sudden and quite unexpected destruction of their tight-knit little unit get in the way of finishing the job they had started. She would keep the bastard pinned down and distracted for a while. Long enough for him to find another route up there.  ...read more »