cgfeedback always says 0 comments

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
foxi
Forum Members
Forum Members
Posts: 12
Joined: Mon Apr 18, 2011 6:55 pm

cgfeedback always says 0 comments

Post 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.
square
Forum Members
Forum Members
Posts: 51
Joined: Fri Jan 15, 2010 5:02 pm

Re: cgfeedback always says 0 comments

Post by square »

I've got the same problem with my news and CgFeedBack module since last module update
weird0

Re: cgfeedback always says 0 comments

Post 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 :)
heban
New Member
New Member
Posts: 4
Joined: Mon Feb 28, 2011 6:55 pm

Re: cgfeedback always says 0 comments

Post 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.
square
Forum Members
Forum Members
Posts: 51
Joined: Fri Jan 15, 2010 5:02 pm

Re: cgfeedback always says 0 comments

Post by square »

Does it work with the News module too ?
foxi
Forum Members
Forum Members
Posts: 12
Joined: Mon Apr 18, 2011 6:55 pm

Re: cgfeedback always says 0 comments

Post by foxi »

dear weird0

your method totally works! many thanks for you reply.

best,
foxi
Ksya
New Member
New Member
Posts: 4
Joined: Sat Oct 22, 2011 11:00 pm

Re: cgfeedback always says 0 comments

Post 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?
Post Reply

Return to “Modules/Add-Ons”