thank you for this excellent module. in my opinion it is still very useful even with the added support views 2.3 provides for this sort of thing.
what i am trying to do is print the Extra Voting Forms vote up/down + current vote value widget into a view that uses fields.
the php code provided by extra voting forms for printing the widget is this:

print extra_voting_forms_show_form($node,'n' ,3);

this alone does not work in the views custom field field, but the following code does work:

$node = node_load($data->nid);
print extra_voting_forms_show_form($node,'n' ,3); 

this is great, but my concern is that the node_load function is fairly heavy and i was wondering if anyone can think of a more lightweight way to get this extra voting forms widget to print, besides the way i'm currently going about it.

maybe someone knows of a faster way?



casey’s picture

Take a look at the extra_voting_forms_show_form() function to see what fields it needs from the node. Add these to your view and exclude them from displaying (at least the ones you don't want to display) and do the following in your custom field:

$node = new stdClass;
$node->nid = $data->$nid;
$node->uid = $data->author_uid;
// etc
print extra_voting_forms_show_form($node,'n' ,3); 
casey’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

casey’s picture

Title: use of $data vs. node_load » Embedding forms & alternative for node_load()
meba’s picture