Posted on: 08/09/03 06:06am
By: Anonymous (Chris)
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
Re:Any way to hide [Views: 0]?
Posted on: 08/09/03 06:29am
By: Dirk
Remove them from the template files (storytext.thtml
and featuredstorytext.thtml
).
bye, Dirk
Re:Any way to hide [Views: 0]?
Posted on: 08/09/03 07:18am
By: Anonymous (Chris)
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
Re:Any way to hide [Views: 0]?
Posted on: 08/09/03 07:44am
By: Anonymous (Chris)
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.
Re:Any way to hide [Views: 0]?
Posted on: 08/09/03 05:43pm
By: rawdata
Aaaah, the forum ate up my hack. You can see it
here instead.
Re:Any way to hide [Views: 0]?
Posted on: 08/10/03 06:10am
By: Chris-KOF
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?