help with voteup/down

calebm12 - June 18, 2009 - 02:15

hi

i am trying to get vote up/down to work. i am playing around with the garland theme and have not had much luck getting it to appear
1. i have downloaded the module along with the vote api and have enabled them
2. i have configured the up/down module to show on stories
3. i have transfered the vote images form the module image folder to the garland image folder
4. i have added the css from the vote module to the css of the garland folder.

and....nothing....

i understand this isnt a plug and play module so to speak...what do i need to do to get it working!
many thanks
caleb

i think i discovered my

calebm12 - June 18, 2009 - 02:54

i think i discovered my prob...combinin the php template pages.
the garland template has....do i combine the code or just enter the up/down function into the garland template code?

* Override or insert PHPTemplate variables into the templates.
*/

function phptemplate_preprocess_page(&$vars) {
$vars['tabs2'] = menu_secondary_local_tasks();

the up/down has

function _phptemplate_variables($hook, $vars) {
switch ($hook) {
case 'node':
$vars['storylink_url'] = check_url($vars['node']->vote_storylink_url);
if (arg(1) != 'add' && arg(2) != '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]++;
}
break;
}
return $vars;
}

 
 

Drupal is a registered trademark of Dries Buytaert.