We needed to be able to click up for a vote and then click again to undo the vote. I've created a theme that achieves this. It's not on a public site, so I can't provide an example.
To make it work it needs a modification to vud.theme.inc to add a variable in the vud_widget_proxy function:
$token_reset = drupal_get_token("vote/$type/$cid/0/$tag");
$variables['link_reset'] = url("vote/$type/$cid/0/$tag/$token_reset");
I've attached the theme. We called it campfire because it's our project name. If someone comes up with a better name, feel free.
Jack Sparrow: You know, for all that pirates are clever-called, we are an unimaginative lot when it comes to naming things.
Gibbs: Like?
Jack Sparrow: I once sailed with a geezer lost both his arms and part of his eye.
Gibbs: What did you call him?
Jack Sparrow (after a pause): Larry
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | campfire.tar_.gz | 2.39 KB | jgreep |
| #2 | vote_up_down-DRUPAL-6--2.patch | 1.18 KB | jgreep |
| #2 | campfire.tar_.gz | 3.61 KB | jgreep |
| campfire.tar_.gz | 2.8 KB | jgreep |
Comments
Comment #1
bassam commentedHow can I have this change for 6.2?
thanks
Comment #2
jgreep commentedI've attached the new theme and patch. Let me know how it works for you.
Comment #3
bassam commentedHi,
Thanks for the files. There is one change thought
campfire/campfire.inc:
change function name from
UDCampfire_campfire_vud_widgets
to
vud_campfire_vud_widgets
Comment #4
jgreep commentedThanks. Forgot about that. Here's the update.
Comment #5
marvil07 commentedI'm not sure if we want this feature, but subscribing me to avoid reviewing ti in detail.
btw: please provide patches instead of tarballs to make it easy to review.
moving to 3.x since 2.x is in the process of stabilization.
Comment #6
marvil07 commentedApart from the last patch at #2, from the tarball, I think the only relevant part is at:
Since I'm not too convinced at this request, I'm wondering if we could have a way to modify template values before sending them to the tpl.. actually it can be done on the tpl itself, and the creation of the new widget fits on the idea to customize the behaviour.