Scoop -- the swiss army chainsaw of content management
Front Page · Everything · News · Code · Help! · Wishlist · Project · Scoop Sites · Dev Notes · Latest CVS changes · Development Activities
Makeshift Counters for Stories Feature Requests
By Defect , Section Wishlist []
Posted on Fri Nov 02, 2001 at 12:00:00 PM PST
Now that scoop tracks registered users and which stories they've accessed recently with the viewed_stories table, then it would take very little effort to use that data as a sort of counter for how many views stories have gotten. This would only count how many registered users have visited a story, but it's better than nothing, and maybe could be visible only to the author and admins as just to squelch a simple curiousity.

If i understand correctly, and i very well might not as i'm only looking at the db structure and haven't actually played with scoop in well over 6 months, then you'd just need to query 'select count(uid) from viewed_stories where sid=$story_sid' and you've got a simple running count of the how many users have checked out a story.

It wouldn't serve much use for everyone to see that information, which is why i suggested it be available to authors and admins only. And on that note, i think authors should be able to see more information about the stories they post anyway, be it who voted what or at least stats on votes, and, well, i can't think of anything else but surely there must be some information that authors might like to know.

pseudo code for my idea follows just because i'm bored:

if($this_uid==$authors_uid or u_b_an_admin){
    ($rv,$sth)=db_select({
            what    => 'count(uid)',
            from    => 'viewed_stories',
            where   => "sid=$this_sid"});
    $num_views=$sth->fetchrow();   # and there you go
    $sth->finish();
}


easy as pie. whatever that means.
< Inconsistant URL handling | Sumballo >

Menu
· create account
· faq
· search
· report bugs
· Scoop Administrators Guide
· Scoop Box Exchange

Login
Make a new account
Username:
Password:

Poll
Hi
· This is a good idea 100%
· This is a bad idea 0%
· This just won't work 0%
· Hi! 0%

Votes: 2
Results | Other Polls

Related Links
· Scoop
· More on Feature Requests
· Also by Defect

Story Views
  40 Scoop users have viewed this story.

Display: Sort:
Makeshift Counters for Stories | 27 comments (27 topical, 0 hidden)
pffft (none / 0) (#1)
by Defect on Fri Nov 02, 2001 at 10:38:15 AM PST

Also add some handling of vars in the pseudo code to take into account whether or not the current scoop config actually does track new comments.



I like it. (none / 0) (#2)
by hurstdog on Fri Nov 02, 2001 at 11:42:40 AM PST

I'll put it into op=activity when I finish my first round of homework today :)

-hurstdog


Done. (none / 0) (#4)
by hurstdog on Fri Nov 02, 2001 at 01:58:36 PM PST

You'll see it in the column of boxes on the right. It doesn't do any caching right now, so its only fit for small sites. I'm going to have to play with it a bit to make it work well with kuro5hin. It'll probly be only viewable to admins there...



-hurstdog


Well, viewed_stories isn't really viewed stories (none / 0) (#6)
by panner on Fri Nov 02, 2001 at 02:17:27 PM PST

While it may seem strange, viewed_stories doesn't always reflect that someone has viewed a story. It really should be viewed_comments_on_stories or something, because it's updated when a user views any comment attached to a story. However, more than likely a user will have viewed a story if they viewed a comment (I know there are exceptions), and this is more than enough for this purpose.



--
Keith Smiley



great (none / 0) (#14)
by rozirose124 on Sun Sep 13, 2020 at 05:17:41 PM PST

Mmm.. estimable to be here in your report or notify, whatever, I repute I should moreover process strong for my have website want I play some salubrious further updated busy in your location. 룸알바



great (none / 0) (#15)
by rozirose124 on Tue Sep 15, 2020 at 07:04:04 AM PST

I prefer merely excellent resources - you will see these people in: 안전놀이터



great (none / 0) (#16)
by rozirose124 on Wed Sep 16, 2020 at 07:23:28 AM PST

At this point you'll find out what is important, it all gives a url to the appealing page: 홀짝게임



great (none / 0) (#17)
by rozirose124 on Wed Sep 16, 2020 at 09:21:49 AM PST

Can nicely write on similar topics! Welcome to here you'll find out how it should look. 토토사이트



great (none / 0) (#18)
by rozirose124 on Thu Sep 17, 2020 at 06:32:06 AM PST

I really appreciate this wonderful post that you have provided for us. I assure this would be beneficial for most of the people. contact lens cases



great (none / 0) (#19)
by rozirose124 on Thu Sep 17, 2020 at 06:40:55 AM PST

In this particular article, you will see a summary, satisfy browse this post. хотели пампорово



great (none / 0) (#20)
by rozirose124 on Thu Sep 17, 2020 at 07:06:29 AM PST

Amazing, this is great as you want to learn more, I invite to This is my page. работни обувки



great (none / 0) (#21)
by rozirose124 on Thu Sep 17, 2020 at 07:10:22 AM PST

This is very interesting, but it is necessary to click on this link: мебели софия



great (none / 0) (#22)
by rozirose124 on Thu Sep 17, 2020 at 07:18:35 AM PST

Actually I read it yesterday but I had some thoughts about it and today I wanted to read it again because it is very well written. принтери варна



great (none / 0) (#23)
by rozirose124 on Thu Sep 17, 2020 at 07:22:44 AM PST

Initial You got a awesome blog .I determination be involved in plus uniform minutes. i view you got truly very functional matters , i determination be always checking your blog blesss. сайт за тениски



great (none / 0) (#24)
by rozirose124 on Thu Sep 17, 2020 at 07:29:00 AM PST

In this case you will begin it is important, it again produces a web site a strong significant internet site: подарък за мъж



great (none / 0) (#25)
by rozirose124 on Thu Sep 17, 2020 at 12:36:12 PM PST

Very interesting information, worth recommending. However, I recommend this: 카지노사이트



great (none / 0) (#26)
by rozirose124 on Sat Sep 19, 2020 at 02:02:58 PM PST

I was very pleased to find this site.I wanted to thank you for this great read!! I definitely enjoying every little bit of it and I have you bookmarked to check out new stuff you post. 바카라사이트



great (none / 0) (#27)
by rozirose124 on Wed Sep 30, 2020 at 02:41:52 AM PST

Beaver says I also have such interest, you can read my profile here: 파워볼사이트



Makeshift Counters for Stories | 27 comments (27 topical, 0 hidden)
Display: Sort:

Hosted by ScoopHost.com Powered by Scoop
All trademarks and copyrights on this page are owned by their respective companies. Comments are owned by the Poster. The Rest © 1999 The Management

create account | faq | search