Closed (fixed)
Project:
Voting
Version:
master
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
4 Aug 2005 at 20:59 UTC
Updated:
9 Sep 2005 at 19:07 UTC
I wanted to be able to set the background color of the embedded voting blocks to match the background color of whatever page I'm using. So in other words, to set 'bgcolor' as flexibly as changing the 'prompt' and 'confirmation' text.
So I just added the following line to 'voting.module':
function theme_voting_control_flash($content_type, $content_id, $attributes = array()) {
[snip]
// optional variables
[snip]
$txt_after_vote = urlencode(($attributes['confirmation']) ? $attributes['confirmation'] : variable_get('voting_txt_after_vote', 'My Vote:'));
// START ADDED -- 03AUG2005
$bgcolor = urlencode(($attributes['bgcolor']) ? $attributes['bgcolor'] : variable_get('voting_bgcolor', '0xffffff'));
// END ADDED -- 03AUG2005
Now, in my own pages, when I add the $output line, I can use a third variable for 'bgcolor' immediately after 'prompt' and 'confirmation', like:
$output .= voting_control_generic('pagevote', $node->nid, array('prompt' => 'Do you like it?', 'confirmation' => 'Vote saved!', 'bgcolor' => '0xffffff'));
Comments
Comment #1
benshell commentedThanks, I added this to the CVS and 4.6 versions today.