![]() |
Someone mentioned this in the other forum (I think it was Castel). It's hardly a hack, as it consists of commenting out 3 lines, but here's how to do it:
In functions.php (in the /admin directory) find Code:
// ###################### Start delete thread ####################### Code:
if ($countposts) { Code:
// if ($countposts) { Code:
// ###################### Start delete post ####################### Code:
if ($countposts) { Code:
// if ($countposts) { |
Whoa that's actually pretty good, I wonder if it's possible to do the same with the board's post count?
|
Oh btw I have another question, does the counter still work when you delete a thread? I mean if you delete a thread will it reduce that user's post count?
|
With this hack, any time a post is deleted (be it via Pruning or by the user himself or the moderator of the forum, and whether you are deleting an individual post or a whole thread), the user's post count is *not* affected. So this makes his count truly a full count of the total number of posts he has made since registering. The reason it works this way is all the different ways to delete a post - pruning, moderator deleting, user deleting, thread being deleted - rely on these two functions to work. Once you remove the reduce count functionality from these two places, no matter how a post is deleted, the user's count stays the same.
|
I see, the only drawback would be if a user spammed the board intentionaly to raise his or her post count, and then deleted his threads.
I guess if you don't allow users to delete their threads, but only to edit them you kinda solve this problem! Nice hack indeed man! |
I guess I'm the only person that likes it the way it is now. I like the fact that when a post is deleted, the post count goes down.
Messages are only deleted on my board for one main reason: The user accidentally double-posted. When I see a double post, I delete one. It makes things look nicer. And I don't think someone should get positive credit for a mistake, even if a genuine, simple mistake. Now we have a very progressive moderating attitude on my board. We will allow a lot of stuff to go by, as long as people are not attacking each other, etc. But when situations do come up, I prefer to edit or censor, rather than deleting the message. By editing the message, and putting an explanation in the edited message, the person who posted the offending message will see right away that what he did was not acceptable, and will have an explanation. This is preferable, in my opinion, that the person coming back and seeing his message missing, and not knowing what is going on. So deleting a post is not normally done on my board, and only as a very last resort. So if something is deleted, it was because it was very, very bad, and once again, I do not feel someone should continue to get positive credit, to keep credit for that post, if it was so bad that it had to be deleted. Now I have things set so nobody can delete their own messages or threads, so we do not have a situation of innocent people getting their counts lowered because someone deleted the first post. |
You might want to read what I wrote here at the bottom:
http://vbulletin.com/forum/showthrea...threadid=12189 This entire hack is redundent. Instead of so many code lines, you can achieve exactly the same result by changing in functions.php: Code:
function deletethread($threadid,$countposts=1) Code:
function deletethread($threadid,$countposts=0) and if you want post count not to change when specific posts are deleted as well, then in function.php change: Code:
function deletepost($postid,$countposts=1,$threadid=0) Code:
function deletepost($postid,$countposts=0,$threadid=0) |
hmm, bira's version of the hack does not work in vB 2.0 final and tubedogg`s first replacement is not anywhere in the funcions.php of the final release.
Can you help me? Edit: forgotten the word "not" :rolleyes: |
Quote:
|
Quote:
I have forgotten the little word "not". Bira's version of the hack does not work, too. |
If you change $countposts=1 to $countposts=0 then there is no way on earth that the post count will change for the user when you delete.
it WILL change if you run "update counters", because that operation is a simple COUNT query of the database. So, if you don't want your users' post count to ever change, then change $countpost to equal 0, and never run "update counters" :D |
sorry bira but I've too tried your hack and it didnt work. :(
|
this isn't my "hack" and I don't support it, nor use it myself so I'm sorry if this comes off rude, but I don't really care :D ;)
|
Does anyone know which lines to modify in 2.0?
Here are the functions: Code:
// ###################### Start delete thread ####################### |
here Christian i done this and it worked fine for me
// if ($countposts) { // if (!isset($userpostcount["$post[userid]"])) { // $userpostcount["$post[userid]"] = -1; // } else { // $userpostcount["$post[userid]"]--; // } // } |
I still get errors, does any1 know which functions to modify?
Thnx i a Michael OK, found out myself: In functions.php search for: // ###################### Start delete thread ####################### function deletethread($threadid,$countposts=1) { global $DB_site; // decrement users post counts if ($threadinfo=getthreadinfo($threadid)) { $postids=""; $attachmentids=""; $posts=$DB_site->query("SELECT userid,attachmentid,postid FROM post WHERE threadid='$threadid'"); while ($post=$DB_site->fetch_array($posts)) { if ($countposts) { if (!isset($userpostcount["$post[userid]"])) { +++OLD+++ $userpostcount["$post[userid]"] = -1; +++OLD+++ $userpostcount["$post[userid]"]--; } else { $userpostcount["$post[userid]"]--; } So all you have to do is change $userpostcount["$post[userid]"] = -1; to $userpostcount["$post[userid]"]--; This was for deleting threads, deleting posts works as shown by tubedogg Hope I could help some1 with that... Cya Michael |
i get these errors when following the above directions..... i have 2.0.1
Parse error: parse error, expecting `T_VARIABLE' or `'$'' in MY LOCATION (EDITED OUT)functions.php on line 1554 Warning: Cannot add header information - headers already sent by (output started at MY LOCATION (EDITED OUT)functions.php:1554) in MY LOCATION (EDITED OUT)functions.php on line 1183 Fatal error: Call to undefined function: makelogincode() in MY LOCATION (EDITED OUT)global.php on line 299 Warning: Unable to call doshutdown() - function does not exist in Unknown on line 0 |
Cant get this hack to work with VBBFinal??? Can someone help me
|
Ok. I got the threads one to work now because of the new hack posted..
whenever i try to use tubedogg's hack about the deleted posts one, it always gives me errors... Something wrong?? |
Is there a clean set of instructions for not reducing member or board counts on delete for 2.0.3?
Thanks!!! :D |
Yeah a version for 2.0.3 would be great please
|
Could someone post the whole modded fuctions.php doc for us newbies?:D
|
You can not post source code.
|
Could you email me the page or send it over PM or something? All my info is in my profile. I would do it myself but for some reason my whole fuctions.php (and others) file is all thrown together. It's not laid out all nice and neat.
Email is Fool1515@mediaone.net |
Quote:
Thanks bro :) |
come on someone must have worked this out please post how i hate to revert my functions template back to older version to use this
|
I've been waiting for a definitive answer myself :(
|
need a definitive answer for version 2.03 still
|
HELP!!!!!!!
I tried this and it totally mucked my boards post counts up. Can someone please say what I need to do for the latest version of Vbulletin??? |
First of all, there are many ways of doing this hack, and tubedogs hack, for no decrease in the posting numbers is the best way that I can think of. There are other ways, but to be honest, the way I combined my idea, with tubedog's works just fine.
I will not support this for anybody, because i realize this hack has already received its share of complaints, so keep in mind these simple rules, before taking my advice. 1) Tubedog had origionally created this hack. I'm just adding on to it. 2) all changes, are user responsibility. Backup your functions.php file, and if there are errors, than either figure them out on your own, or go back to your old backed up script, because support is something that I truely tried to provide early on in this game, however, most people are here on a take it and run basis, so I provide this information, on the same premise. 3) Do not Pm me, aol me, icq me, yahoo me, or email me concerning the price of cheese on this hack. respond to this thread if you would like any type of support, which as earlier written, sparse if any. 4) Its a simple hack, so for God's sake read what is written, and all will be ok. :) Here are the changes. you will find these script lines in your functions.php script(functions.php is found in your admin folder) Find on line 1837, (or around there) to start in the correct area of the needed changes: PHP Code:
PHP Code:
1) completely take the script out, which is what i did 2) comment out the script such as below. PHP Code:
Secondly, Thanks to Tubedog, make these modifications. (the line numbers, and some variables may of changed, but the basic principle remains). Find on line 1886 (or around there) this line, to start in the correct area of the needed changes: PHP Code:
PHP Code:
PHP Code:
NOTE!!!: i did not comment out: PHP Code:
PHP Code:
:) |
Bringing this hack back, I am using 2.2.0 and when I install the hack, and go to Prune... I tell it to prune 50 days (had the board since Sept) and it comes up with nothing. It doesn't display one post...
However, when I delete threads/posts individually, users keep their post count... so it works on an "individual basis"... Any ideas? Thanks... Andrew Tatum |
Excuse the intrusion, probably in a wrong place, but nobody answered here
I have the opposite problem: when a mod moves a post/thread from a forum with $countposts=1 to another with $countposts=0 (for example the RecycleBin or a chit-chat area which doesn't count against the membership awards given by post-counter), that number is not decreased. Infact in postings.php, action move, nowhere is any instruction to decrease the counter (or check if necessary) like it is in the delete thread/post sections. I don't agree with this policy, but that isn't the problem: infact, if I do a complete post recount, unpredictably this user count remains the same, even that user post is ONLY into the $countposts=0 forum.... What's up ? Thanks P.S.: I would like very much to bugfix the 'move' code to do this check, but can't figure how... |
you guys should really read this thread from beginning to end. Alot of your questions are answered within it.
|
Quote:
Thnx |
Yes this is updated.. I remeber the old one that was made *memories*.. but the code has changed. So here it is in living color.
I thought this would be usefull since a few people have asked about it. ##### In admin/function.php find ( around line 1967) ##### PHP Code:
PHP Code:
##### now shortly under it find ( around line 1996 ) ##### PHP Code:
PHP Code:
Enjoy. |
Just an add: WHAT ABOUT moved threads ?
I saw the post count of each user isn't updated when I move a thread from a forum (with countposts=1) to another (with countposts=0) ... ??? I also put a message in bugfix section of vb.com, but it doesn't seem being recognized as a bug... :( How could I recount posts -ONLY- for each members affected by a particular thread ? Thanks |
work perfectly on 2.2.4
|
|
thanx neo, works great :) .
|
thnax neo that worked easily and fast.
|
All times are GMT. The time now is 04:44 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|