Applying to Theme Templates

RikiB - September 27, 2009 - 19:48
Project:Kudos
Version:6.x-1.7
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Description

Thanks for the recent views integration great work with that :)

I am posting this to request integrating this into the advanced forum. I don't have any blocks on my forum, so I would rather put all the information inside the php.tlp file so it will be integrated into the forum itself.

So currently I am putting

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

into the bottom of each node and comment by inserting it into advf-forum-post.tpl.php

Id like to do the same exact thing with the other blocks you provide, but not have them in the block but inside the posts.
So I'm basically just looking for the php code to insert into my advanced forum theme and print out the following information you provide in block:

Kudos Content Summary =

<?php
print ???
?>

Kudos User Summary =

<?php
print ???
?>

Kudos Node Stats =

<?php
print ???
?>

Kudos Node User Stats =

<?php
print ???
?>

Kudos Node Form =

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

Thanks for all the help and a great module!

#1

RikiB - October 5, 2009 - 21:09

Can I safely assume this is not possible?

#2

socki - November 12, 2009 - 21:15

This should be possible using the following function calls.

Kudos Node Stats =

$content = kudos_content_stats('node', $nid);

Kudos Node User Stats =

$content = kudos_account_stats($uid);

Kudos Content Summary =

//$a1 = 'node' or 'user'
//$period = 'all' would be the default

$content = kudos_content_summary($a1, $period);

Kudos User Summary =

//$period = 'all' would be the default

$content = kudos_account_summary($period);

#3

RikiB - November 16, 2009 - 21:52

Thanks for your time, but I cant get any of these to work. I dont know php and all Im doing is this:

<?php
print $content = kudos_content_stats('node', $nid);
?>

Yet nothing prints, is there anything else I need to do to simply print out this information?

#4

socki - November 17, 2009 - 16:32

Have you made sure that the stats are updating? I just noticed that I must have changed a default setting in the admin area. Please be sure that the stats are being updated in real-time. This is quite important. Don't have it go on cron as that's not as accurate, and its actually less efficient. I'm going to remove that as an option in an upcoming release. This setting is on admin/settings/kudos.

AttachmentSize
kudo.jpg 45.49 KB
 
 

Drupal is a registered trademark of Dries Buytaert.