Page 1 of 1

cgfeedback always says 0 comments

Posted: Mon Jun 20, 2011 4:29 pm
by foxi
Hi,
Most everything with the CGfeedback module works great, i have it working with the CGBlog The only problem is I cant seem to get it to count the number of comments. There are a lot of great posts about this already but Ive tried everything and nothing helps, so maybe it something specific to the new version, im using 1.9.4.1 faanui

i created a ratings template called count which looks like this:

{strip}
{$stats.count}
{/strip}


And wrote in the CGBlog summary template:

<a class="comments" href="{$entry->detail_url}#comments">Kommentare ({CGFeedback key1="CGBlog" key2=$entry->id action="ratings" ratingstemplate="count"})</a>


My first feeling was that I have the wrong thing entered into the Key1 spot. Have tried loads of different variation tho...so maybe something else.

thanks so much for any help.

Re: cgfeedback always says 0 comments

Posted: Thu Jun 23, 2011 5:53 pm
by square
I've got the same problem with my news and CgFeedBack module since last module update

Re: cgfeedback always says 0 comments

Posted: Wed Jun 29, 2011 12:46 am
by weird0
not saying this is the best way to do it, but it works for me (all modules are up to date)

in the CGBlog template I wrote the following

Code: Select all

<a href="{$entry->detail_url}" title="{$entry->title|escape:htmlall}">{capture assign='commentnumber'}{CGFeedback key1="CGBlog" key2=$entry->id action="summary" summarytemplate="reaction-statistics"}{/capture}
{if empty($commentnumber)}
there are 0{else}
there are {$commentnumber}
{/if}
 reactions</a>

the CGFeedback summarytemplate "reaction-statistics" wich I refer to contains the following smarty

Code: Select all

{strip}
{if isset($stats)}
{foreach from=$stats item='onestat'}
{$onestat.reviews} 
{/foreach}
{/if}
{/strip}
ratings and comments are as far as I know the same, so this code should work for you :)

Re: cgfeedback always says 0 comments

Posted: Wed Jun 29, 2011 3:28 pm
by heban
It's weird but version with $stats.count works if every comment will be manual submited by Admin. I don't know why, maybe this is bug in CGfeedback.

Re: cgfeedback always says 0 comments

Posted: Thu Jun 30, 2011 10:14 am
by square
Does it work with the News module too ?

Re: cgfeedback always says 0 comments

Posted: Tue Aug 09, 2011 5:48 pm
by foxi
dear weird0

your method totally works! many thanks for you reply.

best,
foxi

Re: cgfeedback always says 0 comments

Posted: Sat Mar 03, 2012 3:42 pm
by Ksya
It does not work for me. Also with weird0 method it's always zero.

Is it because I don't use the ratings in the module?