vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Allow Mods to delete Shoutbox posts! (https://vborg.vbsupport.ru/showthread.php?t=47338)

Mr H 01-03-2003 07:23 PM

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.

Kars10 01-03-2003 07:46 PM

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.. ;)

Chris M 01-03-2003 07:58 PM

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

Logik 01-03-2003 08:09 PM

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.

Mr H 01-04-2003 07:19 AM

Neither works :(

I even tried enabling access masks and turning them off.

Only the admin has the ability to delete.

Any ideas?

Chris M 01-04-2003 12:57 PM

@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

Logik 01-04-2003 07:18 PM

He probably pasted it in the wrong place ;)

Mr H 01-04-2003 08:19 PM

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 :(

MetroSports82 01-23-2003 01:56 AM

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. :)

Mr H 01-24-2003 08:03 PM

MetroSports, you're the man! :D

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

Thanks again!,
H


All times are GMT. The time now is 07:32 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02120 seconds
  • Memory Usage 1,739KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (4)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete