Closed (fixed)
Project:
Vote Up/Down
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
28 Jul 2007 at 19:15 UTC
Updated:
28 Jul 2007 at 21:23 UTC
Hello frjo,
I'm trying to put your widget in my custom theme, though it does not work.
I'm using
<?php print $vote_up_down_widget ?> in my custom node tpl file.
I have also copy pasted your code (which was in the example template.php) into my template.php in my theme folder.
I'm pretty sure everything I did is correct. That's why I believe your module contains a bug, somehow.
Please let me know what I am doing wrong? Or else, it must be a bug, right?
I hope you can help me, thanks in advance.
-Laurent
Comments
Comment #1
Laurentvw commentedOkay so I found your lame bug. Let me paste your template.php code:
As you can see, the widget will only get outputted when 'node' (case) is true. I assume you are checking if the url is indeed a node. But what if someone uses url aliases, thus, no 'node' will be included in the url, which will result in a "FALSE", and consequently the widget will not get displayed.
So, how to make it work? Here's how:
It simply doesn't check if the current page is a node or not.
-Laurent
Comment #2
Laurentvw commentedu kick ass laurent (im so awesome I KNOW laurent :)
Comment #3
prameya commentedwoo.. .now i am awesome^200 i got to use laurent's account :) please kick my ass laurent.. make me that lucky...!!
Comment #4
prameya commentedi guess that looks kinda gay... but your still the man!
oh.. and you suck ass for that stupid bug... i'd say it was okay if it was a mammal... but bug.. not acceptable... but still kudos for the code...!
Comment #5
frjo commented