View Full Version : Special post counter system
Dpcows
02-15-2003, 10:00 PM
Version: 0.3
Title: Special post counter system
Requested: [Here] (https://vborg.vbsupport.ru/showthread.php?s=&threadid=48230)
Explanation: You can maintain a special post counter for certain forums, like your offtopic forum.
Features:
Special counter in postbit template
Add special counter to your profile overview
Special counter can be controled from admin panel
Screenshots
Special post counter in postbit template (https://vborg.vbsupport.ru/attachment.php?s=&postid=354573)
Admin settings (https://vborg.vbsupport.ru/attachment.php?s=&postid=354622)
Special posts counter in users profile (https://vborg.vbsupport.ru/attachment.php?s=&postid=354623)
Version 0.3 should be working fine.
i'm not able to test it very well. but it worked for me one 1 board.
my conenction make it almost impossible to upload a file to my server :/
but it should work, and there is no restrinction of the amount of forums..
by the way, i put all this in a nice install file :)
upload that file to your admin dir and run it..
Dpcows
02-16-2003, 09:38 AM
a example of the special post counter:
BaBa2002
02-16-2003, 09:42 AM
wow nice dude
Dpcows
02-16-2003, 09:45 AM
it works ? or you just clicked install for fun ?
Floris
02-16-2003, 11:45 AM
I have made some additions:
You can now turn it on/off in the admin control panel
You can now set the forumid through the admin control panel
And where it says 'Special Posts' - You can now name this whatever you want through the admin control panel too.
All three options are available through acp > vbulletin options > thread options.
I gave you the file, and can't wait for you to implement it in the new version, together with the support for multiple forums and how to delete stuff and update counters, etc.
Nice hack, I might not have a use for it, but if it is complete later on, it starts to look really interesting and fun to play with :)
I have another little feature request.
Would it be possible to extend this to use for threads too?
Special Posts: x
Special Threads: y
Also, maybe extend my add-on to also have option to set the number to count up for the special count, like 1, or 5
And the same for threads,
so we can set posts count each time up with 1
and threads with 2
or 5 and 10 or 100 and 1000 :)
Dpcows
02-16-2003, 12:29 PM
Originally posted by xiphoid
I have another little feature request.
Would it be possible to extend this to use for threads too?
Special Posts: x
Special Threads: y
I guess that is possible..
Originally posted by xiphoid
Also, maybe extend my add-on to also have option to set the number to count up for the special count, like 1, or 5
And the same for threads,
so we can set posts count each time up with 1
and threads with 2
or 5 and 10 or 100 and 1000 :)
what use will that be ? could be done, but i don't see the use :)
btw: implented multiple forums and you addon.
now working on the delete problem.
thx for the help
Xyphen
02-16-2003, 12:51 PM
Nice hack, I might use it sometime but not now..
Dpcows
02-16-2003, 01:24 PM
i've finished the delete part.
check the first post in this thread for a updated version.
i hope the install file is complete.
Dpcows
02-16-2003, 01:58 PM
admin section screenshot
Dpcows
02-16-2003, 02:03 PM
screenshot of specialposts in user profile
Chris M
02-16-2003, 02:22 PM
Interesting Idea:)
Satan
Mike Gaidin
02-16-2003, 03:57 PM
Thanks for doing this Dpcows! :)
It's not working for me though. Now, the new post count is the only one that goes up no matter what forum I post in.
Dpcows
02-16-2003, 04:05 PM
Originally posted by J-OST
Thanks for doing this Dpcows! :)
It's not working for me though. Now, the new post count is the only one that goes up no matter what forum I post in.
did you set the 'Special Post Count' optino to yes ?
and did you sepecify a specific forumid in the admin control ?
you have an url to your board ?
Mike Gaidin
02-16-2003, 04:10 PM
Yes
Yes
http://www.winespringinn.com/forums/index.php
I go by Mike Gaidin there.
Dpcows
02-16-2003, 04:16 PM
hmmmm,
i'll try my hack on a freash install.
might be easy if you get on irc. i'm there
Mike Gaidin
02-16-2003, 04:22 PM
Sorry, I actually don't have any IM programs installed on my pc. I know, it's kind of retarded in this day and age not to, but I just haven't gotten around to it.
Question though. I don't know anything about php, but I was just wondering if there are supposed to be . in front of an = mark?
i.e.,
$forumcheck .= "|| ($foruminfo[forumid] == $specialforums[$i]) ";
Dpcows
02-16-2003, 04:33 PM
yeah it is :)
goto vB chat: [HERE] (http://www.vbulletin.org/chat/index.php?s=)
i'm having problems too, getting it to work on a fresh install :)
all posts i make, are added to the special counter
btw: you shouldn't add this hack to a live board yett.
Dpcows
02-16-2003, 05:04 PM
THIS VERSION IS BUGGED !!
do not use, working on a working on
Mike Gaidin
02-16-2003, 05:20 PM
Ok. :)
*waits patiently for this cool hack*
Dpcows
02-16-2003, 05:37 PM
i located the problem, but don't know how to fix it.
it is so stupid. i don't get why it goes wrong.
my logic sais it should be no problem. but it's not working :/
i'll work later tonight or tomorrow on it :/
Mike Gaidin
02-16-2003, 05:49 PM
Ok, that's cool. I'll wait. Thanks for your effort. :)
How do I remove the parts of my database that were added in the instructions?
*NOTE*
Nevermind, I figured out how to do it. :)
Dpcows
02-16-2003, 08:52 PM
ok, i fixed it.
new release will be out tomorrow.
* Dpcows needs his bed now :)
it only supports up to 5 forums now.
but you can add more if you like, you need to add some code to your files for that.
Mike Gaidin
02-16-2003, 09:28 PM
That's fine. I only need it for 2 forums. :)
* J-OST thanks Dpcows.
Dpcows
02-17-2003, 01:25 PM
remade hack,
check first post for install file.
it isn't tested very well, but i believe it should work fine.
Mike Gaidin
02-17-2003, 08:06 PM
Great! Will check it out. :)
Mike Gaidin
02-17-2003, 08:09 PM
When I double click on the attachment all it does is bring up the old text file, not download a php file.
Dpcows
02-17-2003, 08:13 PM
try this one, it works for me.. but here it is again..
Mike Gaidin
02-17-2003, 08:23 PM
That download worked. Thanks!
Mike Gaidin
02-18-2003, 03:21 AM
tested and it works great!
marcel-ea
02-22-2003, 02:57 AM
the new version does not work by me
OffTopic Posts: 0
by all users
offtopic had id 21
german 22
english 23
option is on
ids insert with comma
but by all users also by the users who post in OT
allways OffTopic Posts: 0
Any Ideas?
VB229
Thx
Dpcows
02-22-2003, 08:45 PM
You used the php file or the "old" text file ?
and when you post, does the normal post couter gets higher or not ?
marcel-ea
02-22-2003, 09:55 PM
I used the php install, make all step to step
But only 0 :( and no the post goes not higher
when i post on a forum that i insert in the acp
Dpcows
02-23-2003, 07:17 AM
your normal post count goes up on normal forums ?
have you tried unstalling and installing again ?
you have more hacks on your forum ?
i could apply the hack my self if you would like
marcel-ea
02-23-2003, 03:17 PM
yes other post work normaly
Other hacks
Quick Post, faqbot
EDIT:
ok now work. I delete your installphp from admindir.
Other problem:
Any Idea how i get the posts from the past in the counter?
the hack count only new posts
Update Counters does not work for this hack
Dpcows
02-23-2003, 04:54 PM
cool,
i'll see if i can work something out.
you have an url from your forums ?
marcel-ea
02-23-2003, 05:15 PM
Its the forum of emule.de
or better jump to www.emuleforum.net
no reg
but only in the german template (standard)
Originally posted by marcel-ea
Other problem:
Any Idea how i get the posts from the past in the counter?
the hack count only new posts
Update Counters does not work for this hack
Have anyone figured out how to do this yet?
Thanks.
Dpcows
02-24-2003, 07:09 AM
i said i'll look into it..
cna't work always on stuff
Originally posted by Dpcows
i said i'll look into it..
Thanks!
lynda
03-03-2003, 09:08 PM
I installed it. Seems to work very well. Easily integratable with the store hack as well. My forum needs something like this. They post about 500 off-topic posts a day just to get their post count up. :)
Dpcows
03-04-2003, 12:21 PM
can i see your forum ?
lynda
03-04-2003, 12:34 PM
It's in my profile (click the www button on the post)
Dpcows
03-05-2003, 07:18 AM
yeah, but i don't see to many forums over there.
you called it Trolls & Gibberish ?
cool :)
lynda
03-05-2003, 01:45 PM
Ohh. The forums are not visible to people who are not registered. It's a clan site for Asheron's Call and the members appreicate their privacy.
:)
FlyingDutchman
03-06-2003, 04:12 AM
it's working great for me...
needed some customizations, but they were easily made :)
(like edit special post count in admin cp user edit ;))
FlyingDutchman
03-06-2003, 04:22 AM
--(for screenshot, see attached file)--
if you want to be able to edit the special posts count of a specific member in the admin cp, do this:
open admin/user.php
-find:
makeinputcode("Number of Posts","posts",$user[posts]);
-just UNDER that, add:
makeinputcode("Number of Special Posts","specialposts",$user[specialposts]);
-find:
if ($posts=="") {
$posts=0;
}
-just UNDER that, add:
if ($specialposts=="") {
$specialposts=0;
}
-find:
$DB_site->query("UPDATE user SET birthday='$birthday',options='$options',usergroupi d='$usergroupid',username='".addslashes(htmlspecialchars($ausername))."'$pwdinclude,email='".addslashes(htmlspecialchars($email))."',styleid='$userstyleid',parentemail='".addslashes(htmlspecialchars($parentemail))."',coppauser=$coppauser,homepage='".addslashes(htmlspecialchars($homepage))."',icq='".addslashes(htmlspecialchars($icq))."',aim='".addslashes(htmlspecialchars($aim))."',yahoo='".addslashes(htmlspecialchars($yahoo))."',signature='".addslashes($signature)."',adminemail=$adminemail,showemail=$showemail,invi sible=$invisible,usertitle='".addslashes($usertitle)."',customtitle=$customtitle,joindate=$joindate,cook ieuser=$cookieuser,nosessionhash=$nosessionhash,da ysprune='$daysprune',lastvisit=$lastvisit,lastacti vity=$lastactivity,lastpost=$lastpost,posts='$post s',timezoneoffset='$timezoneoffset',emailnotificat ion=$emailnotification,receivepm='$receivepm',emai lonpm='$emailonpm',ipaddress='".addslashes($aipaddress)."',pmpopup=IF(pmpopup=2 AND $pmpopup=1,pmpopup,'$pmpopup') WHERE userid=$userid");
-REPLACE that with:
$DB_site->query("UPDATE user SET birthday='$birthday',options='$options',usergroupi d='$usergroupid',username='".addslashes(htmlspecialchars($ausername))."'$pwdinclude,email='".addslashes(htmlspecialchars($email))."',styleid='$userstyleid',parentemail='".addslashes(htmlspecialchars($parentemail))."',coppauser=$coppauser,homepage='".addslashes(htmlspecialchars($homepage))."',icq='".addslashes(htmlspecialchars($icq))."',aim='".addslashes(htmlspecialchars($aim))."',yahoo='".addslashes(htmlspecialchars($yahoo))."',signature='".addslashes($signature)."',adminemail=$adminemail,showemail=$showemail,invi sible=$invisible,usertitle='".addslashes($usertitle)."',customtitle=$customtitle,joindate=$joindate,cook ieuser=$cookieuser,nosessionhash=$nosessionhash,da ysprune='$daysprune',lastvisit=$lastvisit,lastacti vity=$lastactivity,lastpost=$lastpost,posts='$post s',specialposts='$specialposts',timezoneoffset='$t imezoneoffset',emailnotification=$emailnotificatio n,receivepm='$receivepm',emailonpm='$emailonpm',ip address='".addslashes($aipaddress)."',pmpopup=IF(pmpopup=2 AND $pmpopup=1,pmpopup,'$pmpopup') WHERE userid=$userid");
now you can edit a user's special post count from the admin cp...
Mike Gaidin
03-08-2003, 03:00 AM
Is there a way to add the special post count to have it's own option under the memberlist?
If that's unclear, what I mean is have a top special poster option next to the top 10 posters.
Does that make sense?
Dpcows
03-08-2003, 07:53 AM
i think it is possible.
you have to tinker with memberlist.php
gopherhockey
03-08-2003, 07:38 PM
I have a question about this hack, thinking it may help me out with a slightly different issue.
When a user is logged in they see the message:
Members: XX, Threads: YY, Posts: ZZ
I have a forum that is run off the NNTP gateway, so it gets TONS of new posts all the time. I was able to "ignore" the threads in that forum via another individual's code help here... I was also able to exclude the forum from the search and "view new posts" functions... however, I have yet to find a way to stop the post count from going up for this forum.
I'm curious - if I use this hack, turn on special post count and use that forumid, will the post count on the main page NOT show the posts that happen in the "special" forum?
If not, is there a way to do that?
Sorry if this is slightly off topic, but I know others are looking for this functionality as well... this is as close as I've seen to pulling it off.
Thanks..
My users are so tired of seeing the post count in the hundreds I have had to turn off the NNTP gateway, even though they also enjoyed having that forum open.
Dpcows
03-09-2003, 09:34 AM
yes that would be possible.
but it might be easier to set the
"Count posts made in this forum towards user post counts?"
feature on at that specific forum.
tell me if the normal featur isn't good enough. then i'll give you the code to do it with this hack..
gopherhockey
03-09-2003, 01:22 PM
Yea, setting not to count posts in that forum toward users post counts doesn't seem to have any affect on how they are reported to the users - they are still seeing tons of new posts each day... I'd love whatever you could do to help me out - thanks a ton!!
Dpcows
03-09-2003, 04:41 PM
could you explain your problem a bit more specific,
i think i've misunderstood your problem in your first post.
gopherhockey
03-09-2003, 05:05 PM
Sure thing - I'll try to explain this again. I confuse myself sometimes, so hopefully I can get this straight.
The way vb works, as we all know, is that posts in a forum will trigger various affects. A few of which are:
1. Users post count increases (there is a way around this in the admin cp)
2. Total posts on the entire board go up (as displayed on the top of most unedited vb systems as:
Members: XX, Threads: YY, Posts: ZZ
3. There are various scripts & hacks that will show this data on other pages as well, such as vbhome lite which shows it as:
X new articles released
Y new forum threads started
Z new forum posts
4. When looking at the list of all forums, you can see the total number of posts and threads for each forum just before the "Last Post" column.
5. When a user arrives and sees that there are new posts or threads, often times they click on "view new posts" to see a list of what has been posted lately.
All of those are just fine under most circumstances.
I have a specific reason to have a forum never increment those totals. (actually all but #4, but even if it affects #4 above thats ok too).
In my example, the forum is an NNTP gateway (newsgroup). The forum itself can get anywhere from 10-200+ posts/threads in a day. Users coming to my system do not wish to see these show up as new posts, new threads etc. I want to treat it as a resource (special) forum - but not let it act like the others by increasing post totals etc.
I have worked around *most* of this by editing search.php and putting in a statement such as:
wheresql.=" AND thread.open<>10 AND thread.forumid!=50";
(example excluding forum #50 from daily new threads stats)
What I can't fix is the new posts part. You can't just add the AND thread.forumid!=50 to the posts section (you get a SQL error).
What happens now is that people come to my system and in a low traffic day (but high for the newsgroup) they might see:
0 new articles released
0 new forum threads started
201 new forum posts
They click on "view new posts" and get a message that there are no posts since they last visited.
The reason is because that forum is still able to increase the forum post count and total vb system post count.
I have posted this elsewhere on this system (and have had others request the same) - have had many think they knew how to do this, but nobody has been able to do it.
When I ran accross your hack, I thought maybe it found a way to categorize posts in a certain forum differently. However, I think there is still some counter that is affected - some global total post count that many functions hit. I thought maybe if I installed this and set the forum, that the system would stop displaying the post count since last visit for this forum. I think the concept is close, or closer than anything I have seen... but there still must be something missing.
I'm not enough of a programmer to be able to figure out out. Conceptually I would guess if one could edit all places where the post total is increased and exclude a forum it would work. Thats why this hack seemed sooo very close.
I know there are others looking for this kind of functionality. I apologize if this is rather off-topic specifically for what this hack does. Perhaps I should re-post this in the hack requests area. I just feel with this hack, there is probably one simple line of code somewhere that I'm missing to pull this off.
Thanks for your time...
Dpcows
03-11-2003, 07:25 AM
I'm afraid i don't have time to look into this, or even add more features.
gopherhockey: i don't see a fast solution for you problem with this hack. sorry..
gopherhockey
03-11-2003, 12:01 PM
Thats ok, I found an alternate way of doing this that I'll post elsewhere. Thanks for your time though!
Hmm.... is there a way to update this post count in anyway?
And is there a way to make this work with post count off in a forum it suppose to count in?
Thanks in Advance
/me clicks install
Koopa
03-15-2003, 05:53 PM
Good idea, could be useful....
Dpcows
03-16-2003, 01:28 PM
03-12-03 at 04:21 AM Oricon said this in Post #56 (https://vborg.vbsupport.ru/showthread.php?postid=364554#post364554)
Hmm.... is there a way to update this post count in anyway?
And is there a way to make this work with post count off in a forum it suppose to count in?
Thanks in Advance
* Oricon clicks install
Not sure, didn't test that.
if you did, i'd like to know if it works
tinbin
03-27-2003, 02:37 PM
Interesting hack m8!
Would it be hard to code it so that it counts the # of replies people made in the offtopic forum, but DOESN'T count if the users started the thread itself.
So it should count all offtopic replies, not all offtopic posts..
Dpcows or anyone else:
Would that be just a bit of extra code or hard to do ?
Dpcows
03-28-2003, 06:35 AM
Would be pretty easy.
Just don't edit the newthread.php file i guess.
No garantee all still works..
SoBal
05-14-2003, 07:48 AM
Dpcows, good work m8.
Few months has passed since the last post in this thread, and I've installed this great hack a few moments ago. But I have an urgent request, If I may...
I have to re-count old posts and threads, If any1 has any idea how this can be done - plz post it here, or let me know, it's very important to me. I have few users among 12.000 which always used to talk about off-topic thigns, and I have to "downgrade them" :)
SoBal
05-14-2003, 08:33 AM
Small problem, which I hope be able to take care by myself. But I think it shall be reported. After hack installation on 2.3.0 several problems shows up. Avatars and post edit dates - doesn't show up, also all attached graphics are only visible as attachements - not displayed.
Dpcows
05-14-2003, 01:29 PM
you would have to fix something up like, the update couter in the admin panel.
But, i'm not gonna tinker with it
Ryuujin
04-29-2004, 10:53 PM
Hey, could you do one for vb3.0.1 ?
Requested here:
https://vborg.vbsupport.ru/showthread.php?t=64365&highlight=Special+Post+Count
Serph_kun
06-27-2004, 04:25 AM
Thanks man!!
I love this hack :3~~
Dark Zero
08-08-2004, 07:23 AM
Hey, could you do one for vb3.0.1 ?
Requested here:
https://vborg.vbsupport.ru/showthread.php?t=64365&highlight=Special+Post+Count https://vborg.vbsupport.ru/showthread.php?t=68041
:nervous:
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.