vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   calendar event views (https://vborg.vbsupport.ru/showthread.php?t=78527)

robert_2004 03-21-2005 11:29 PM

calendar event views
 
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:
Code:

ALTER TABLE event ADD hits INT(7) NOT NULL;
Open calendar.php,
FIND:
PHP Code:

    if (!empty($eventarray)) 

ABOVE, ADD:
PHP Code:

    //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


All times are GMT. The time now is 10:38 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01278 seconds
  • Memory Usage 1,724KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete