Version: 1.2.1, by Xenon
Developer Last Online: Oct 2023
Version: 3.0.6
Rating:
Released: 02-09-2004
Last Update: 06-01-2005
Installs: 119
No support by the author.
Ok, another one of my vb2 Hacks has been ported over and Optimized
This hack allows mods and Admins to restrict the edit permissions on a levelbased system.
Admins can disallow everyone to edit that post, while mods just can restrict editing by the author. Supermods can restrict editing by normal moderators as well.
Admins also have additional features:
- Editing the Timestamp of that Post
- Editing the Author
- Editing the IP
Nothing more to explain i think, look at the screenies if you need more infos.
Please don't forget to click install
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
Nice hack, just wanted to mention that it installed fine on vBulletin 3.0.3.
Had a little problem with another hack but I managed to fix it. I fyou have the quick edit hack installed and tried to quick edit a post, all the options get reset like IP, userid and name, the date and so on.
If anyone else has this problem heres a quick fix, in the template "showthread_quickedit" find:
if ($_POST['do'] == 'updatepost' AND $bbuserinfo['editlevel'] > $editlevel['author'])
and change it to:
PHP Code:
if ($_POST['do'] == 'updatepost' AND $bbuserinfo['editlevel'] > $editlevel['author'] AND !$_POST['quickedit'])
and that should solve that problem.
Also I notice a small problem with this hack, if you change the user of the post, the original poster count doesn't decrese and the new user post count doesn't increase so you would have to update the counters to get them accurate again. Other then that, its a good hack.
Might this have some relation to the issue I was mentioning about the info being lost if SuperMods edit a post ?
As for the postcount, yes i know, will have to add that in my next update (when i find the time to add what i want to add ^^)
Didn't notice that post.
I made some changes to your hack that fixed up a couple things, one is corectly setting the users pos count and the other is updating the forum last poster and first poster info if you change the user.
After you install this hack, find:
PHP Code:
// now do changes to thread, if logged in user is an admin and changed the dateline if ($bbuserinfo['editlevel'] == $editlevel['admin'] AND $postinfo['dateline'] != $newpost['dateline']) { require_once('./includes/functions_databuild.php'); build_thread_counters($postinfo['threadid']); }
Replace it with:
PHP Code:
//------------------------------------------------------------ if($postinfo['userid']!=$newpost['userid'] && $foruminfo['countposts']) { if ($postinfo['userid'] > 0) { $DB_site->query(" UPDATE " . TABLE_PREFIX . "user SET posts=posts-1 WHERE userid = $postinfo[userid] "); } if ($newpost[userid] > 0) { $DB_site->query(" UPDATE " . TABLE_PREFIX . "user SET posts=posts+1 WHERE userid = $newpost[userid] "); } } //------------------------------------------------------------
// now do changes to thread, if logged in user is an admin and changed the dateline if ($bbuserinfo['editlevel'] == $editlevel['admin'] AND $postinfo['dateline'] != $newpost['dateline'] OR $postinfo['userid']!=$newpost['userid']) { require_once('./includes/functions_databuild.php'); build_thread_counters($postinfo['threadid']); }
Now in includes/function_datastore.php find:
PHP Code:
// ###################### Start updatethreadcount ####################### function build_thread_counters($threadid) { global $DB_site, $threadcache;
and change it to:
PHP Code:
// ###################### Start updatethreadcount ####################### function build_thread_counters($threadid) { global $DB_site, $threadcache, $vbphrase;
Thats all, now the posts will show Guest instead of nothing when you enter in a blank field. Also it will now update the post count of those who you change the post to and from.
i might add, that your code for the postcounts isn't correct 100%
if you have forums where post's aren't counted, then of course you would not have to change the postcount
but i'm sure a lot can use this, until i can come up with the next version (which hopefully has all of that implemented and the special additions i want to have )
i might add, that your code for the postcounts isn't correct 100%
if you have forums where post's aren't counted, then of course you would not have to change the postcount
but i'm sure a lot can use this, until i can come up with the next version (which hopefully has all of that implemented and the special additions i want to have )
Thanks for bringing that to me attention, fixed it by adding:
&& $foruminfo['countposts']
To the If statement.
The only problem now is updating the user's usertitle if they gain/lose enough posts for a different one.