The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Doublepost = Not counted in user's post count Details »» | |||||||||||||||||||||||||||
Doublepost = Not counted in user's post count
Developer Last Online: Oct 2005
We all know that sometimes there is a need to post a couple times in a row, whether it be multiple attachments, posting updates, etc. This hack will make it so that the double/triple/whatever post is not added to the user's post count, but still shown and updated in the forum and thread count. I kow at some boards there is a lot of competition in post counts, and although doubleposting is not looked highly upon in most forums, this would ensure that the user isn't getting any benefit out of it. Plus people could use it for bumping topics, etc, etc, etc. This hack will also make it so if that doublepost is deleted, it will not subtract from the user's postcount. Since it was never added in the first place, it shouldn't be a problem .
--------------------------------------------------------------------- NOTE: I did use (with permission) the query and if statement from Xenon's Prevent Doubleposting hack. --------------------------------------------------------------------- This is a simple hack which only involves 2 file edits (editpost.php and newreply.php). And it does work with the QRB =P. If you have any questions, etc, post them here. DOESN'T WORK. Show Your Support
|
Comments |
#12
|
||||
|
||||
So, Then, is this the whole code that will make the hack work right?
Code:
Doublepost = Not counted Hack File edits: 2 (editpost.php, newreply.php) ################################################# Step 1 ################################################# -------------------------- In editpost.php, find: -------------------------- deletepost($postid,$foruminfo[countposts],$threadinfo[threadid]); -------------------------- Replace it with: -------------------------- // doublepost = no count hack $lastpost = $DB_site->query_first("SELECT * FROM post WHERE threadid = '$threadid' AND postid<$postid ORDER BY postid DESC"); if($lastpost[userid]!=$bbuserinfo[userid] || (time()-$lastpost[dateline])>3600 || ($attachmentid and !$foruminfo[moderateattach])) { deletepost($postid,$foruminfo[countposts],$threadinfo[threadid]); } else { deletepost($postid,$countposts=0,$threadinfo[threadid]); } // end doublepost = no count hack -------------------------- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= ################################################# Step 2 ################################################# -------------------------- In newreply.php, find: -------------------------- ".iif ($foruminfo[countposts],"posts=posts+1,","")." -------------------------- Replace it with -------------------------- // doublepost = no count hack ".iif ($foruminfo[countposts],"posts=posts+'".iif($threadinfo[lastposter] == "$bbuserinfo[username]",'0','1')."',","")." // end doublepost = nocount hack -------------------------- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Upload the two files and you're done. Enjoy =P. |
#13
|
||||
|
||||
i won't use it now boofo, it's not really tested...
i can think of two more bugs in it i try to found out now |
#14
|
||||
|
||||
ok this is one of another bug in editpost.php, i post just the correct code :
PHP Code:
ok i think with this editpost.php should work perfect now... |
#15
|
||||
|
||||
Ok, when you have something to test, let me know and I will try it out.
|
#16
|
||||
|
||||
And the newreply part is ok?
|
#17
|
||||
|
||||
you can try the delete function when having a lot of doubleposts
nope, the newreply part is just ok, when you don't use attachments, and regard every doublepost from a user as a real doublepost. (There is no timespan in it that marks a post as real doublepost as it should...) |
#18
|
||||
|
||||
Do you mean the newreply part from Austin Deas code or the newpreply part from g-force2k2?
|
#19
|
||||
|
||||
I have 2 instances of this code in the editpost.php. Do I replace both of them?
Code:
deletepost($postid,$foruminfo[countposts],$threadinfo[threadid]); |
#20
|
||||
|
||||
??
i just have one instance.... i mean g-forces part has this problems, austins didn't work at all as i know ^^ |
#21
|
||||
|
||||
Here is the code I have that has 2 instances of it in the editpost.php.
Code:
if ($action=="deletepost") { // +++++++ Start Checking Delete Post Permissions [ Start ] +++++++ $perms=getpermissions(); if(!$perms[candeleteposts]) { eval("standarderror(\"".gettemplate("error_cantdeleteposts")."\");"); exit; } // +++++++ Start Checking Delete Post Permissions [ End ] +++++++ if ($deletepost=="yes") { //get first post in thread $getfirst=$DB_site->query_first("SELECT postid,dateline FROM post WHERE threadid='$threadid' ORDER BY dateline LIMIT 1"); if ($getfirst[postid]==$postid) { // delete thread if ($getperms[candeletethread]) { deletethread($threadinfo[threadid],$foruminfo[countposts]); updateforumcount($threadinfo[forumid]); eval("standardredirect(\"".gettemplate("redirect_deletethread")."\",\"forumdisplay.php?s=$session[sessionhash]&forumid=$threadinfo[forumid]\");"); } else { show_nopermission(); } } else { //delete just this post $foruminfo=getforuminfo($threadinfo[forumid]); deletepost($postid,$foruminfo[countposts],$threadinfo[threadid]); updatethreadcount($threadinfo[threadid]); updateforumcount($threadinfo[forumid]); eval("standardredirect(\"".gettemplate("redirect_deletepost")."\",\"showthread.php?s=$session[sessionhash]&threadid=$threadinfo[threadid]\");"); } } else { eval("standardredirect(\"".gettemplate("redirect_nodelete")."\",\"showthread.php?s=$session[sessionhash]&postid=$postid#post$postid\");"); } } if ($action=="deletethispost") { $firstpost=$DB_site->query_first("SELECT postid,dateline FROM post WHERE threadid='$threadid' ORDER BY dateline LIMIT 1"); if ($postid==$firstpost[postid]) { if ($getperms[candeletethread]) { deletethread($threadinfo[threadid],$foruminfo[countposts]); updateforumcount($threadinfo[forumid]); $url="forumdisplay.php?s=$session[sessionhash]&forumid=$threadinfo[forumid]"; eval("standardredirect(\"".gettemplate("redirect_deletethread")."\",\"$url\");"); } else { show_nopermission(); } } else { $foruminfo=getforuminfo($threadinfo[forumid]); deletepost($postid,$foruminfo[countposts],$threadinfo[threadid]); updatethreadcount($threadinfo[threadid]); updateforumcount($threadinfo[forumid]); $url="showthread.php?s=$session[sessionhash]&threadid=$threadinfo[threadid]"; eval("standardredirect(\"".gettemplate("redirect_deletepost")."\",\"$url\");"); } } ?> |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|