![]() |
vB Forum Counter v2.1
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:
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! |
prettty cool hack, just a few questions before i install this one...
how does it count. does it count for each click per member and guest? and are you able to reset the stats? |
Works like a charm. Thanks
|
Nice thanks
|
Sorry to ask this, but can you make this for links only? Like redirects since or something?
|
Quote:
|
Zajako made one for the links, :)
|
I think it's just like the normal forum cause the browser must get in forumdisplay.php first anyway right :)
|
I have installed vBadvanced CMPS and I am getting the following error...
Database error in vBulletin 3.0.3: Invalid SQL: SELECT thread.threadid, thread.title, thread.replycount, postusername, postuserid, thread.dateline AS postdateline, IF(views <= thread.replycount, thread.replycount+1, views) AS views, thread.lastposter, thread.lastpost, pollid , thread.iconid AS threadiconid, iconpath AS threadiconpath ,thread.forumid, forum.title AS forumtitle , post.pagetext AS preview , NOT ISNULL(subscribethread.subscribethreadid) AS subscribed FROM thread as thread LEFT JOIN icon USING (iconid) LEFT JOIN forum AS forum ON (thread.forumid = forum.forumid) LEFT JOIN post AS post ON (post.postid = thread.firstpostid) LEFT JOIN deletionlog AS deletionlog ON (thread.threadid = deletionlog.primaryid AND type = 'thread') LEFT JOIN subscribethread AS subscribethread ON (subscribethread.threadid = thread.threadid AND subscribethread.userid = 1) WHERE open <> '10' AND thread.visible = 1 AND deletionlog.primaryid IS NULL ORDER BY lastpost DESC LIMIT 10 mysql error: Column: 'views' in field list is ambiguous |
I am having the exact same problem. I have disabled my CMPS for now, but still need a solution.
Help |
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:
PHP Code:
Open forumdisplay.php Find: PHP Code:
PHP Code:
Open template forumhome_forumbit_level2_post Find PHP Code:
PHP Code:
|
Sweet!! Thank you
|
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.
|
Everytime the file forumdisplay.php loaded, it will count as a hit.
|
Quote:
|
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 |
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 ;) |
Quote:
|
Did you do the one update for your CMPS Portal?
|
Yes, but this error is coming from another site I work on that does not run the cmps.
|
Quote:
|
To bitg - I've just finished the upgrade_to_v2.txt instruction at the first post so I recommend you do it so. Good luck :)
|
Quote:
|
Quote:
|
Thx, works perfectly! :)
|
I really like this, but is there a way to keep the hits you already have, or add them in -
I don't want my hits starting at 1 when I've already got 50,000 - thx |
If you want just start your forum's hits from 50,000 instead of 1 then run this query
[sql]UPDATE forum SET views = 1 WHERE forumid = 34 [/sql] With views = 1, replace 1 with the the number you want it to start at, and forumid = 34 replace 34 with the forum's id you wanna update. Thanks, |
Ha - that's great! thx Anh -
1 final ? - integer doesn't have a comma shows as 10001 - any way to display as 10,001? |
It has to go through a function process llike vb_number_format() to shown as interger with , etc...
You can do it so Open forumroot/includes/functions_forumlist.php Find: Code:
$forum['threadcount'] = vb_number_format($forum['threadcount']); Code:
$forum['views'] = vb_number_format($forum['views']); |
hey - you did it - thx! :up:
|
Quote:
|
nevermind update fixed it
|
For vbadvance cmps shouldnt
Code:
else Code:
else |
Has anyone updgraded to 3.07 with this hack? I just upgraded to vb 3.07 & can't get the views column to appear - it just doesn't show up - do you know what I could check?
|
for anyone using 3.07, I also had to go into includes/functions_diget.php & remove the , views after thread.lastposter, thread.dateline
|
The error you got before means that the 'views' column exist in more then 1 table used in the query. If you don't tell MySQL from which table you want to use that column, it won't have a clue what you are look for.
Solution: Change 'views' into 'thread.views' (Assuming that you are looking for the view count on the threads.) |
Great hack. Would be nice to have a combined install file and not just the upgrade version. I would release the combined version I made but I made changes to it.
|
All times are GMT. The time now is 05:47 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|