The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Allow Mods to delete Shoutbox posts!
I'm in desperate need of this hack.
The original hack is here: https://vborg.vbsupport.ru/showthrea...threadid=38698 Unfortunately moderators are not able to delete posts and since I'm not on all day and the shoutbox is busy, it can get out of hand. Thanks. |
#2
|
||||
|
||||
If you want them to delete posts just place "admin_shoutbox.php" in the mod-folder.
In mod/index.php place PHP Code:
PHP Code:
|
#3
|
||||
|
||||
Open shoutbox.php
There should be some code below: Code:
require("./global.php"); Code:
$DB_site->query("DELETE FROM shoutbox WHERE shoutid = $shoutid"); header("Location: $PHP_SELF?s=$sessionhash[sessionid]"); } Replace that section with: Code:
if (($bbuserinfo[usergroupid] == 5 || $bbuserinfo[usergroupid] == 6 || $bbuserinfo[usergroupid] == 7) && $action == 'delete' && $shoutid) { $DB_site->query("DELETE FROM shoutbox WHERE shoutid = $shoutid"); header("Location: $PHP_SELF?s=$sessionhash[sessionid]"); } Satan |
#4
|
||||
|
||||
Lord. I need to study more PHP. Cause this is confusing.. . If anyone is wanting to help a poooooor little starter at PHP. AIM me at bacheloring.. Thanks.
|
#5
|
|||
|
|||
Neither works
I even tried enabling access masks and turning them off. Only the admin has the ability to delete. Any ideas? |
#6
|
||||
|
||||
@Mr H - My code should work - Its what I have on my shoutbox, and last time I checked my mods could delete shouts
You would have to remove the "if" line too Satan |
#7
|
||||
|
||||
He probably pasted it in the wrong place
|
#8
|
|||
|
|||
I removed the line that started with "if" and replaced it with this....
Code:
if (($bbuserinfo[usergroupid] == 5 || $bbuserinfo[usergroupid] == 6 || $bbuserinfo[usergroupid] == 7) && $action == 'delete' && $shoutid) { $DB_site->query("DELETE FROM shoutbox WHERE shoutid = $shoutid"); header("Location: $PHP_SELF?s=$sessionhash[sessionid]"); |
#9
|
||||
|
||||
Mr H, I had the same problem as you. I tried doing this, and it worked... give it a try, and let me know if it works for you.
Open shoutbox.php- REPLACE PHP Code:
PHP Code:
|
#10
|
|||
|
|||
MetroSports, you're the man!
For a while there I just figured I was out of luck. Thanks again!, H |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|