Closed (fixed)
Project:
Rate
Version:
6.x-1.0-beta1
Component:
User interface
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
20 Jul 2010 at 07:33 UTC
Updated:
3 Jan 2014 at 01:42 UTC
Jump to comment: Most recent
Comments
Comment #1
mauritsl commentedYou have to change the node template in order to let the widget show up. Please see section 3 of the readme file for more information. Please let me know if that works for you.
Comment #2
summit commentedSo it makes no sense to copy the rate-widget.tpl.php to the theme folder. At least I do not see a result. Could you may be add a pre-fabricated node.tpl.php?
Thanks a lot in advance for considering.
greetings,
Martijn
Comment #3
mauritsl commentedYou may use the following code in you node template:
Replace "up_down" by the widget name. Alternatively, you may use the following code to print all rate available widgets:
I'm working on ways to make the rate module more easy to use. I.e., to enable adminstrators to choose a position for the widget in the admin (like fivestar does). Some sample theming will also be included in the future.
Comment #5
seventyfive commentedI love the module and was able to implement and theme it perfectly. This saved me hours over my previous attempt to them 5star. Thank you so much for building.
Unfortunately, I'm unable to use
print $node->content['rate_up_down'];in my node.tpl.php to call the widget. My widget's name is left_right so I tried using the commandprint $node->content['rate_left_right'];but nothing shows up. I currently have the Rate Node Display option set to "do not add automatically".I know the widget itself is working because I have the results outputting to a debug box; however, i can't make the actual widget show up. Do I need to preprocess something? I'm kinda stuck.
Oh, in order to clarify, I'm adding it to the node.tpl.php section so that I can keep it from showing up on the teaser by using if($teaser). If you know another way to keep it from showing up on the teaser I'm open to any ideas. ;)
Thank you
Comment #6
mauritsl commentedAh that part is indeed missing in the readme... Will add it soon.
When you choose not to add it automatically, the widget is:
And when added automatically:
An option to decide if the widget is showing op at the teaser will be added in the future.
Note that you can see the widgets on node/123/devel/render if you have the devel module installed.
Comment #7
seventyfive commentedTHANK YOU THANK YOU THANK YOU THANK YOU.
I used the first option and just renamed rate_up_down to rate_left_right where "left_right" is my widget name. Works perfectly!
Thank you for your fast response and this great module.
Comment #8
fadgadget commentedHello mauritsl. I thought Flag Module was great till i saw this. Ideal for what i have been after and even though i havent looked at it further im sure there will be a solution to that aged old problem of multi axis voting with Fivestar. Anyhow...i really am struggling to make the widget appear in nodes. No problems with Comments. Everything works out the box for me there. I am presumming its my node.tpl thats the bugger.
I have tried both examples in #6. My widget is Emotion named 'moods'. I have tried various combinations of the Display Options along with-
it is showing in my dev render.
content (Array, 7 elements)
--#weight (Integer) 50-body (Array, 2 elements)
-#pre_render (Array, 1 element)
-#content_extra_fields (Array, 9 elements)
-rate_moods (Array, 2 elements)
--#value (String, 831 characters )
Ive been at it for nearly two hours and just can't seem to get it to show in my nodes. A node can be viewed here-
http://onlinebanter.com/test/test-oist
I don't know how opening issues on drupal.orh works so i wont open it. I didnt want to start a new issue when all the information might be here already.
Does anyone know where i could be going wrong? Ive updated to the latest dev version and the recommended Voting API version.
thanks
Comment #9
fadgadget commentedAye it seems it was my 'frankensteined' node tpl. It's an awful mess. Ive slowly chipped away at the original one and ive got IF and ELSE statements and other things i don;t understand all over the place :\ For the record i deleted a load of fields and just added
<?php print $content ?>in my node tpl. It's gonna cause me probs elsewhere but its all a learning process. Hopefully i wont have to return to this thread.
Comment #10
fadgadget commentedspoke too soon. The way my node.tpl is set up means i can't use the print content code. (due to the image in the sidebar) All i have in my node template now is-
That should make the Emotions widget appear on my ddblock_news_item content type shouldnt it?
Comment #11
fadgadget commentedComment #12
mauritsl commentedYou are missing a "print" there:
Turn:
into:
Comment #13
fadgadget commentedA brilliant mauritsl thanks :) Working perfect. I suppose it makes sense now. I'll get a hang of all this yet in my lifetime i think.