ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Total Comments

November 23, 2008 4:29pm

Subscribe [3]
  • #1 / Nov 23, 2008 4:29pm

    Jason Bullard

    55 posts

    My question never got answered so I am opening a new thread.  The main question here is why would {total_comments} only return the total number of comments when the user is logged in?  I have ran into this issue because my statistics won’t show correctly unless the user is logged in.

    Thanks for any help,
    Jason


    This question may be related to a resolved thread.

  • #2 / Nov 23, 2008 5:09pm

    Greg Aker

    6022 posts

    Sorry about that Jason.

    Your code was chopped off in the other thread, so how are you using this?  Within the exp:comment:entries tag pair, or the stats module?

    Also, what version/build are you running?  both values can be found in the footer of the CP.

    -greg

  • #3 / Nov 23, 2008 7:46pm

    Jason Bullard

    55 posts

    I am currently running 1.6.6 and just was using it within a template.  For instance, it would display like the default EE theme at the bottom - except I don’t think it has the total comment count there.  However, the {total_comments} tag is a global tag so therefore should work without being nested in anything else - unless I grabbed the wrong one.

    But again unless I am logged in it will show 0 comments but when logged in it will show the correct amount.  Unfortunately I am doing this on a laptop so I don’t have a live version yet to show what I am talking about.

    This is what I am using Docs

  • #4 / Nov 23, 2008 8:37pm

    Greg Aker

    6022 posts

    In the docs page you linked to, it says:  “The total number of comments posted by the currently logged-in user.”  So if you are logged out, it’s not going to show anything.

    If you are wanting to show the total number of comments that have been made on the site, like in the footer of the default templates, look at the {total_comments} variable in the stats module

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases