PDA

View Full Version : calendar event views


robert_2004
03-21-2005, 11:29 PM
this mod would add a simple "event viewed 'x' number of times" when viewing a calendar event.

i was wondering if someone has already modified their board with this, or someone is willing to create the mod?

tnguy3n
03-22-2005, 12:03 AM
it's pretty easy to do. just add a column called hits to keep track on number of event views. :)

Query:
ALTER TABLE event ADD hits INT(7) NOT NULL;

Open calendar.php,
FIND:
if (!empty($eventarray))

ABOVE, ADD:
//event viewing counter by tnguy3n
$DB_site->query("
UPDATE " . TABLE_PREFIX . "event
SET hits=hits+1
WHERE eventid = $eventid
");
// end counter

that's it.

well, if you wish to post it as a hack release, few free to. :)

robert_2004
04-26-2006, 03:36 PM
this has stopped working for vB 3.5.4 - and i can't figure out how to make it work.
i've tried all of the following:
$event
$eventid
$eventinfo['eventid']
$event['eventid']
$vbulletin->GPC['eventid']
but none of them want to output the event's ID.

can someone please help me out :)

robert_2004
09-04-2006, 02:33 AM
okay, this has been updated for 3.5.4, and should work with 3.5.5

it should even work with 3.6
the link to the mod is
https://vborg.vbsupport.ru/showthread.php?p=1067471