Welcome to Geeklog, Anonymous Monday, November 25 2024 @ 05:37 pm EST

Geeklog Forums

Any way to hide [Views: 0]?


Chris

Anonymous
Hi, When you have a story that has no \"Body text\", i.e. only an \"Intro text\", the story can never have more than zero views (an admin can bypass that, as has happened on my site). And the line underneath the story says, \" Post a comment  [ Views: 0 ]\". Is there any way to remove the \"[Views: 0]\" text when there is no body text? I have looked in lib-common.php, but the lang_views variable is always output to the $article array via set_var before you get to the part that adds the intro text. Thanks guys, Chris http://www.keeponfighting.net
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Remove them from the template files (storytext.thtml and featuredstorytext.thtml). bye, Dirk
 Quote

Chris

Anonymous
Hi Dirk, I could do that, but I only want to remove them IF there is no body text for that story, as it is silly to show [Views: 0] because it can never change. If I remove them from those two files you mentioned, then they will never show regardless of whether a story has had zero or more views. -- Thanks, Chris http://www.keeponfighting.net
 Quote

Chris

Anonymous
Correction, I meant, to hide the view total when there is no bodytext AND no comments. The story hits won\'t increase unless someone comments on a story without a bodytext. Sorry for the confusion. Chris.
 Quote

Status: offline

rawdata

Forum User
Full Member
Registered: 02/17/03
Posts: 236
Aaaah, the forum ate up my hack. You can see it here instead.
 Quote

Status: offline

Chris-KOF

Forum User
Newbie
Registered: 08/10/03
Posts: 1
Rawdata, that worked beautifully! Thank you. I was wondering if I could set my own variables (as you did with left_bracket etc.), but wasn\'t sure. Perhaps this hack could go into the core code? Dirk?
Chris
 Quote

All times are EST. The time is now 05:37 pm.

  • 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