Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
vB Forum Counter v2.1 Details »»
vB Forum Counter v2.1
Version: 1.00, by AnhTuanCool AnhTuanCool is offline
Developer Last Online: Sep 2006 Show Printable Version Email this Page

Version: 3.0.3 Rating:
Released: 09-28-2004 Last Update: Never Installs: 25
 
No support by the author.

vB Forum Counter

Version: 2.1
vBulletin Version: 3.0.3 (should work with 3.0.0)
Developed by AnhTuanCool
Install difficulty Level: Pretty short


Brief of Description:
vB Forum Counter add an option to have Forum views column on FORUMHOME display forum counter.

Feature:
  • Feature can be turn on/off
  • Option to update intermediately or after an hour
  • Forum counter makes a new column on FORUMHOME
  • Reset Forum Views
Updated:
For vb Advanced users (attachment)
Updated from version 1:
Fix bugs - conflict between table in database
The function update after one hour not really works
Update to version 2.1:
Add Reset feature

Screenshot:
In attachments...

Install:
Attachment also

Don't forget to click install if you use this hack INSTALL

If you got any problem or questions, just post it right here, I'm willing to help

Note: If you have problem with sql error in vb Advanced CMPS, then check out the txt file in attachment below, show how to fix it
There is no uninstall script so if you want to update then just see the updating instruction.

Enjoy!

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 10-01-2004, 08:13 PM
AnhTuanCool's Avatar
AnhTuanCool AnhTuanCool is offline
 
Join Date: Jul 2004
Location: Albuquerque
Posts: 263
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Run this query:
[sql]ALTER TABLE `forum` CHANGE `views` `view` INT( 10 ) UNSIGNED DEFAULT '0' NOT NULL[/sql]
Open file ./includes/functions_forumlist.php

Find:
PHP Code:
    $forumfields 'forum.forumid, views, lastpost, lastposter, lastthread, lastthreadid, lasticonid, threadcount, replycount'
Replace with:
PHP Code:
    $forumfields 'forum.forumid, view, lastpost, lastposter, lastthread, lastthreadid, lasticonid, threadcount, replycount'
Save up.

Open forumdisplay.php

Find:
PHP Code:
// ############################### Forum counter by AnhTuanCool ###############################
if ($vboptions['forumviewslive'])
{
    
// doing it as they happen
    
$DB_site->shutdown_query("
        UPDATE " 
TABLE_PREFIX "forum
        SET views = views + 1
        WHERE forumid = " 
intval($foruminfo['forumid'])
    );
}
else
{
    
// or doing it once an hour
    
$DB_site->shutdown_query("
        INSERT INTO " 
TABLE_PREFIX "views (forumid)
        VALUES (" 
intval($foruminfo['forumid']) . ')'
    
);

Replace with:
PHP Code:
// ############################### Forum counter by AnhTuanCool ###############################
if ($vboptions['forumviewslive'])
{
    
// doing it as they happen
    
$DB_site->shutdown_query("
        UPDATE " 
TABLE_PREFIX "forum
        SET view = view + 1
        WHERE forumid = " 
intval($foruminfo['forumid'])
    );
}
else
{
    
// or doing it once an hour
    
$DB_site->shutdown_query("
        INSERT INTO " 
TABLE_PREFIX "view (forumid)
        VALUES (" 
intval($foruminfo['forumid']) . ')'
    
);

Save up

Open template forumhome_forumbit_level2_post
Find
PHP Code:
$forum[views
Replace with:
PHP Code:
$forum[view
Save up and problem solved
Reply With Quote
  #13  
Old 10-01-2004, 09:55 PM
Holidazed's Avatar
Holidazed Holidazed is offline
 
Join Date: May 2002
Location: Van Nuys, CA
Posts: 713
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sweet!! Thank you
Reply With Quote
  #14  
Old 10-03-2004, 02:45 AM
royals's Avatar
royals royals is offline
 
Join Date: Jul 2004
Location: kansas city
Posts: 52
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If someone has the main forum saved in their favorites, instead of the directory - will it count as a hit? they aren't actually clicking on the link - they are already in the forum.
Reply With Quote
  #15  
Old 10-03-2004, 02:49 AM
AnhTuanCool's Avatar
AnhTuanCool AnhTuanCool is offline
 
Join Date: Jul 2004
Location: Albuquerque
Posts: 263
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Everytime the file forumdisplay.php loaded, it will count as a hit.
Reply With Quote
  #16  
Old 10-03-2004, 04:02 AM
Johnny's Avatar
Johnny Johnny is offline
 
Join Date: Jun 2002
Posts: 290
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by royals
If someone has the main forum saved in their favorites, instead of the directory - will it count as a hit? they aren't actually clicking on the link - they are already in the forum.
thats the whole point is to keep track on how many views your getting to that particular fourms. it basicly works the sameway with your showthread views counter works.
Reply With Quote
  #17  
Old 10-04-2004, 01:58 PM
Holidazed's Avatar
Holidazed Holidazed is offline
 
Join Date: May 2002
Location: Van Nuys, CA
Posts: 713
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Since I installed this hack, I get a database error.
_________________________________
Database error in vBulletin 3.0.3:

Invalid SQL:
SELECT forum.title AS forumtitle, thread.threadid, thread.title, thread.dateline,
thread.lastpost, pollid, open, thread.replycount, postusername, postuserid,
thread.lastposter, thread.dateline, views
FROM forum AS forum
INNER JOIN thread AS thread USING(forumid)
LEFT JOIN deletionlog AS deletionlog ON (thread.threadid = deletionlog.primaryid AND type = 'thread')
WHERE FIND_IN_SET('16', forum.parentlist) AND
thread.lastpost > 1096689607 AND
thread.visible = 1 AND
deletionlog.primaryid IS NULL

mysql error: Column: 'views' in field list is ambiguous

mysql error number: 1052
Reply With Quote
  #18  
Old 10-04-2004, 07:59 PM
AnhTuanCool's Avatar
AnhTuanCool AnhTuanCool is offline
 
Join Date: Jul 2004
Location: Albuquerque
Posts: 263
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmm, where did you get that error report, bitg?

If it said column views is amibguous then you just change the name of the column and change some other things around so answer me the first question, I'll find out next for ya
Reply With Quote
  #19  
Old 10-04-2004, 08:08 PM
Holidazed's Avatar
Holidazed Holidazed is offline
 
Join Date: May 2002
Location: Van Nuys, CA
Posts: 713
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by AnhTuanCOol
Hmm, where did you get that error report, bitg?

If it said column views is amibguous then you just change the name of the column and change some other things around so answer me the first question, I'll find out next for ya
I do not know. it us happening from an unregistered user. It started after I installed this hack.
Reply With Quote
  #20  
Old 10-04-2004, 09:28 PM
AnhTuanCool's Avatar
AnhTuanCool AnhTuanCool is offline
 
Join Date: Jul 2004
Location: Albuquerque
Posts: 263
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Did you do the one update for your CMPS Portal?
Reply With Quote
  #21  
Old 10-04-2004, 09:38 PM
Holidazed's Avatar
Holidazed Holidazed is offline
 
Join Date: May 2002
Location: Van Nuys, CA
Posts: 713
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, but this error is coming from another site I work on that does not run the cmps.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:19 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.04816 seconds
  • Memory Usage 2,324KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (6)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete