Main Stories
Slash Boxes

Slash Open Source Project

Slashcode Log In

Log In

[ Create a new account ]

Article Poll

Poll I found this article to be
Very Helpful
Helpful
Not Helpful
Not Very Helpful
[ Results | Polls ]
Comments:0 | Votes:0

Reads Variable

posted by Krow on 06:46 PM November 5th, 2001   Printer-friendly   Email story
Sandor writes "I have been looking to make some customizations to the blocks on my slash site (CKF Online). I am wondering if anyone knows which variable I would have to add to get the views count into the story_link block for the index.pl in slash. This is a pretty common feature on a lot of the other CMS systems out there and the count shows up in admin.pl so I figured it should be a no brainer but when I add $displaystatus in there nothing happens. Any ideas? Thanks for the advice in advance. Peace, Sandor"
This discussion has been archived. No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login
Loading... please wait.
  • Looking at the Admin plugin, the listStories;admin;default template, it uses stories.hits. That's a column in the stories table in the database, so it's probably what you want.

    I'm going by the current CVS version, so this may only apply to versions 2.1 and 2.2. That's the first place I'd look on older versions, though.

  • Use the field hits in the storiestuff table to count the no of hits of a particular article. and also in index.pl function displayStories which call story_link block , ReadMore .

    Select hits from storiestuff,where sid of that particluar article and display that hits using that linkStory function .