Welcome to Geeklog, Anonymous Sunday, December 22 2024 @ 04:36 am EST

Geeklog Forums

Story comments counter


ismael

Anonymous
Hi,

i need to show a comment counter inside the story. Exists something like this?

Thank you,
ismael
 Quote

Status: Banned

machinari

Forum User
Full Member
Registered: 03/22/04
Posts: 1512
Have a look at your storytext.thtml (also featuredstorytext.thtml, and archivestorytext.thtml). The variable for your comment count is {comments_with_count} and is already there. You can place it anywhere you like by editing that file.

Another variable that you could try that just has the count is {comments_count}.
 Quote

Status: offline

geiss

Forum User
Full Member
Registered: 02/10/04
Posts: 176
Location:Boise, Idaho
happy
machinari,

What other variables do you know of that aren't used in a standard GL 141 install?

I would like to do some theme stuff where {comments_count} would make a big difference on how I lay out the story footer. I'm sure there are other things I am missing as well.

Thx!

-Eric
Synergy - Stability - Style --- Visit us at glfusion.org
 Quote

Status: Banned

machinari

Forum User
Full Member
Registered: 03/22/04
Posts: 1512
oh Dude! there are tons of variables not used in the current professional theme.
But they are useful and used in someone's theme to be sure.

Some may ask why have more than one variable for the same thing.. Well, at times there are in fact more than one variable doing the same thing. This could be an accommodation of an older theme standard where the new standard uses a simplified/different/more straightforward naming convention for variables--or something like that.

Most often the variables not in use are created for the sake of convenience to theme designers like yourself to use when you want to display only a piece of the total data presented by the current variable. Or perhaps the variable presents a different filter applied to the content.

E.g., the {menu_elements} variable in the header presents, as the name suggests, the menuitems, which includes plugin items. There is, however, another not often used variable, {allowed_menu_elements}, which filters the items appearing in the menu according to whether the user is logged in or not. Using the latter variable avoids the page that says, "You must be logged in to view this page" by simply filtering out the link from the list of menu items.

For a comprehensive list of variables used or not in a particular theme, well, I dunno how you would compile that except by manually comparing your core with the .thtml files to see which vars are being set and which are being utilized. I remember a small theming guide a few years ago in the documentation that included a minor list of the most important variables and what template files they were used in, but I haven't looked at documentation of any kind for so long I couldn't say where it is now.

(Search your core for "set_var" to find what variables are being set.)
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
http://www.geeklog.net/docs/themevars.html should cover most the variables that can be used in the header and in the story templates.

bye, Dirk
 Quote

ismael

Anonymous
Sorry for my poor english.

Thats i need isn't comments counter. I need a counter id relative to the story. That is to make replies with an id.

example:
---------------------------------------------------------------
comment #1:

bla bla bla.....
--------------------------------------------------------------
comment #2:

as #1 say ....
--------------------------------------------------------------
 Quote

Status: Banned

machinari

Forum User
Full Member
Registered: 03/22/04
Posts: 1512
hmmm... That sounds like a comment autotag. Does this even exist? That might be an interesting idea. I think you may have to do this manually for now though--copy and paste.
 Quote

All times are EST. The time is now 04:36 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content