Hello everyone,

This is probably a total noob question, but I've only been working with Drupal for a few weeks and can't find the details in the forums (and despite an excellent readme doc, i'm still a bit lost) so here goes. I currently have a working kudos icon in the content area, however I'm attempting to consolidate all of my user-based interactions in my forums into the node/comment footer. I have almost all of the modules down there, but I'm having problems with this one (which is one of the most important).

So as far as I know I need to do 2 steps:
1) "Turn off" the kudo from appearing in the main $content.
2) Plug the kudo into a DIV in the footer.

I thought this would work as far as plugging the kudo into the footer div, and it does display (in duplicate), but I'm also getting errors:

<div class="kudos"><?php print $node->content['kudos_widget']['#value'] . kudos_widget_form($node); ?></div>

Any help would be greatly appreciated...

Thanks in advance!

Comments

socki’s picture

Status: Active » Postponed (maintainer needs more info)

Sorry that this got missed during the holidays and ever since.

Have you made any progress with this... i hope that you were able to figure it out, or get assistance. If you need anything, please let me know.

RikiB’s picture

I could use some help with exactly this. How can we insert kudos into our theme. I was assuming

print kudos_widget_form($node);

would work but I got all kinds of errors when doing that. Is there a trick to be able to insert this into contemplate or our tpl.php pages?

RikiB’s picture

Anyone know how to place this with php? Just a bump :)

socki’s picture

Hey, The code above is close, I believe that what you would want to do is simply:

$block['content'] = kudos_widget_form('node', $node_nid, 'block');

Be sure that the variable $node_nid is the NID of the node. the 'block' value means render the block format of the kudos form.

Let me know how this works out for you.

RikiB’s picture

Ok, I got it to work. Ill post the final code here cause I think it may help a lot of people out.

<?php print $block['content'] = kudos_widget_form('node', $node->nid, 'block'); ?>

I changed $node_nid to $node->nid so it will dynamically pull the current node, and also the print command was needed of course.

Another thing Id like to do is put the users stats in the author pane on my forum. What would code can I use (similar to the code above) to print the users kudos stats?

socki’s picture

Hi. In the next day or so, there should be an updated version of the kudos module which will include integration with views. This will allow you to create whatever sort of block you need to appear on the forum page.

RikiB’s picture

wow, I cant wait, Thanks man!!

socki’s picture

Status: Postponed (maintainer needs more info) » Fixed

I believe the code above, combine with the recent release of the module with Views integration should solve all issues with this ticket. Thx.

Status: Fixed » Closed (fixed)

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