Is there a way to print the widget in a panel?
I have been trying for a bit now and can't seem to find it.
These print the actual value but not the widget
print $node->vote_up_down;
print $node->vote_up_down{value];
Is there a way to print the widget in a panel?
I have been trying for a bit now and can't seem to find it.
These print the actual value but not the widget
print $node->vote_up_down;
print $node->vote_up_down{value];
Comments
Comment #1
jared.Homesavvi commentedHey;
For one; I think you meant print $node->vote_up_down['#value']; for that second line there.
Also, one thing you can do is actually print the theming functions for these, so you would do something like;
There is probably a better way to get around this issue, and I am not sure if I am doing this entirely correct, but if someone would please jump in and say something that would be great.
Comment #2
jase951 commentedDoesn't seem to work in 6.x-2.x.
Comment #3
ron williams commentedIssue resolved by http://drupal.org/node/544354#comment-1973482
Comment #4
socialnicheguru commentedBut this is not solved for version 2. The other version just said revert back to version 1.
That is not a fix is it?
Comment #5
marvil07 commentedComment #6
marvil07 commentedyep, duplicate of #544354: How to display voting widget by API for nodes?, there we should get a solution for 2.x
Comment #7
mradcliffeI made a content_type plugin for vote up/down nodes. Are you interested in trying to integrate this into vud itself (along with respective tax. and comment contextual plugins)?
please re-duplicate if not interested or out of scope
Comment #8
marvil07 commented2.x should not have more features, so changing target
I really never coded for panels, so reviews are welcome :-) (after a initial patch)
Comment #9
mradcliffeThank you for the reply. I'll take a look at things in the 3.x branch.
Comment #10
amitaibu@re #7:
In order to add this plugin, one should add in their custom module (replace "foo" with your custom module name):
@mradcliffe:
This is not needed since the node context is required.
If you can finish the @todo, and roll the patch, then we can proceed. Code so far looks good.
Comment #11
henrijs.seso commentedUpdated version of #7. Lot of small changes. Like function names dont need to be in $plugin if standard naming is used, $default value fix in settings form, no need to clone $node, added admin title so widget is shown in pane title, TODO would be to use Name in stead of machine name.
Comment #12
dabeast commentedI'm sorry, I am having some trouble implementing #11. When I implement this as a new module, I get a
Fatal error: Class 'ctools_context_required' not found in /sites/all/modules/ctools/ctools_plugin_example/ctools_plugin_example.module on line 109
that refers to
required context' => new ctools_context_required(t('Node'), 'node'),
in the above code. Could somebody tell me what I am doing wrong?
Thanks
Comment #13
henrijs.seso commented#12 ctools_plugin_example? did you create new module for this code?
Comment #14
dabeast commentedI did include a vudpane.inc file in the plugins directory of a custom module and it works well. Thanks for your reply and for creating this functionality.
Comment #15
codekarate commentedI ran into a similar error encountered in #12 but ended up figuring out how to get it to work. In case anyone else runs into the same problem I wrote up a quick blog post which may be helpful http://codekarate.com/content/build-ctools-plugin-panels
Comment #16
loparr commentedHi,
I followed your blog but I must do something wrong. After enabling the module, it shows
@file * vudwidget.module */ /** * Implementation of hook_ctools_plugin_directory(). */ function vudwidget_ctools_plugin_directory($module, $plugin) { if ($module == 'ctools') { return 'plugins/' . $plugin; } }
in the upper side of my screen.
Moreover, opening new content in panels is not possible.
Maybe I dont understand the directory structure >
Does plugins directory go inside vudwidget directory?
Any advice?
Thank you very much
Comment #17
marvil07 commentedNo more features for 6.x-3.x now that it is the stable branch, moving to 7.x-1.x as postponed until basic port is ready.
Comment #18
csc4 commentedMany thanks to OP and smthomas - works a treat!
Comment #19
nikkwong commentedCan anyone confirm this module is working at all in drupal 7?
Comment #20
marvil07 commented