HI there, I'm trying to add a new section to my template.php files. But the messages error I get is this:
Fatal error: Cannot redeclare _phptemplate_variables() (previously declared in /homepages/46/d117124046/htdocs/jedebogue/www/chiens/themes/chien3col/template.php:2) in /homepages/46/d117124046/htdocs/jedebogue/www/chiens/themes/chien3col/template.php on line 137
So it's true that the function is already declared, and the new function i'm trying to add is the following:
<?php
// $Id: template.php,v 1.4 2006/08/02 11:18:12 frjo Exp $
function _phptemplate_variables($hook, $vars) {
switch($hook) {
case 'node':
$vars['storylink_url'] = check_url($vars['node']->vote_storylink_url);
if (arg(1) != 'add' && arg(1) != 'edit') {
$style = variable_get('vote_up_down_widget_style_node', 0) == 1 ? '_alt' : '';
$vars['vote_up_down_widget'] = theme("vote_up_down_widget$style", $vars['node']->nid, 'node');
$vars['vote_up_down_points'] = theme("vote_up_down_points$style", $vars['node']->nid, 'node');
}
$vars['vote_storylink_via'] = theme('vote_storylink_via', $vars['node']->vote_storylink_url);
if (arg(1) == 'top') {
static $count;
$count = is_array($count) ? $count : array();
$count[$hook] = is_int($count[$hook]) ? $count[$hook] : 1;
$vars['seqid'] = $count[$hook]++;
}