Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
  #1  
Old 01-03-2003, 07:23 PM
Mr H Mr H is offline
 
Join Date: Jun 2002
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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.
Reply With Quote
  #2  
Old 01-03-2003, 07:46 PM
Kars10's Avatar
Kars10 Kars10 is offline
 
Join Date: Jun 2002
Location: Germany/Franken
Posts: 748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you want them to delete posts just place "admin_shoutbox.php" in the mod-folder.

In mod/index.php

place

PHP Code:
makenavoption("Delete Shouts""admin_shoutbox.php?s=$session[sessionhash]""<br/>"); 
after

PHP Code:
makenavoption("New Posts","moderate.php?action=posts","<br>"); 
That should work..
Reply With Quote
  #3  
Old 01-03-2003, 07:58 PM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Open shoutbox.php

There should be some code below:

Code:
require("./global.php");
It will look vaguely like:
Code:
    $DB_site->query("DELETE FROM shoutbox WHERE shoutid = $shoutid");
    header("Location: $PHP_SELF?s=$sessionhash[sessionid]");
  }
with an "if" line at the beginning...

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
Reply With Quote
  #4  
Old 01-03-2003, 08:09 PM
Logik's Avatar
Logik Logik is offline
 
Join Date: Nov 2002
Location: Tx
Posts: 432
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #5  
Old 01-04-2003, 07:19 AM
Mr H Mr H is offline
 
Join Date: Jun 2002
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Neither works

I even tried enabling access masks and turning them off.

Only the admin has the ability to delete.

Any ideas?
Reply With Quote
  #6  
Old 01-04-2003, 12:57 PM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@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
Reply With Quote
  #7  
Old 01-04-2003, 07:18 PM
Logik's Avatar
Logik Logik is offline
 
Join Date: Nov 2002
Location: Tx
Posts: 432
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

He probably pasted it in the wrong place
Reply With Quote
  #8  
Old 01-04-2003, 08:19 PM
Mr H Mr H is offline
 
Join Date: Jun 2002
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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]");
Yet still no delete ability for mods
Reply With Quote
  #9  
Old 01-23-2003, 01:56 AM
MetroSports82's Avatar
MetroSports82 MetroSports82 is offline
 
Join Date: Nov 2002
Location: NJ
Posts: 89
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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:
if ($bbuserinfo[usergroupid] == 6) {
            eval(
"\$adminoptions = \"".gettemplate("shoutbox_adminoptions",1,0)."\";");
          } 
WITH
PHP Code:
if ($bbuserinfo[usergroupid] == || $bbuserinfo[usergroupid] == || $bbuserinfo[usergroupid] == 7) {
            eval(
"\$adminoptions = \"".gettemplate("shoutbox_adminoptions",1,0)."\";");
          } 
this should do the trick.
Reply With Quote
  #10  
Old 01-24-2003, 08:03 PM
Mr H Mr H is offline
 
Join Date: Jun 2002
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

MetroSports, you're the man!

For a while there I just figured I was out of luck.

Thanks again!,
H
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:10 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04293 seconds
  • Memory Usage 2,256KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (4)bbcode_code
  • (4)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete