PDA

View Full Version : Event Views Counter


robert_2004
04 Sep 2006, 04:20
This addon allows you to display the number of hits/views a calendar event has received.
It also inserts the eventid into the user's session, so they cannot refresh multiple times to boost the view count.

Thanks to tnguy3n (http://www.vbulletin.org/forum/member.php?u=35159) with his post here (http://www.vbulletin.org/forum/showthread.php?t=78527)

STEP 1 - MySQL modification:


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------


STEP 2 - calendar.php
FIND [line 134]


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------


BELOW, ADD:


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------


Save and upload.


STEP 3 - template modification
edit template "calendar_showeventsbit"

FIND:


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------


BEFORE THIS, ADD:


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------


so it should look like:


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------


and that *should* be everything - i can't think of anything else that was needed.

if you use - please click INSTALL

hugh_
04 Sep 2006, 12:41
Can we see a screenshot or example?

Thanks...

hugh

robert_2004
05 Sep 2006, 05:13
screenshot added to orginal post.
It doesn't help much - as my event listing template is modified a great deal.

finn snor
06 Sep 2006, 08:17
Great have been looking for this for a long time..Can it be made conditional so only admin can see views ?

robert_2004
06 Sep 2006, 18:08
Yes, to only allow certain usergroups, use the following code:

usergroups 6 and 5 are admin and super moderators, respectively.




Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------