vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Only Admins and Mods can reply to SPECIFIC threads... (https://vborg.vbsupport.ru/showthread.php?t=41439)

Chris M 07-23-2002 07:32 PM

Only Admins and Mods can reply to SPECIFIC threads...
 
How would I make it, so that when a thread gets posted in Public, only want Mods/Admins will to be able to reply?

I will want to sometimes post a Thread in public, but only allow Mods, Super Mods and Admins to reply...

Satan

Logician 07-23-2002 08:54 PM

in newreply.php find:

PHP Code:

$threadid=verifyid("thread",$threadid); 

After that you can add:

PHP Code:

// Replace X, Y, Z with the threadid you want only Admins/mods can answer
$spec_threads=array(XYZ);


if (
in_array($threadid$spec_threads) AND ($bbuserinfo[usergroupid]!=AND $bbuserinfo[usergroupid]!=AND $bbuserinfo[usergroupid]!=7))
{
  
show_nopermission(); exit;


Not tested but should work..

It is a little awkward because you need to edit your code everytime you need to add a new special thread, but it's the algorithm and you can use it to build a better user interface..

Xenon 07-23-2002 09:42 PM

there is a much easier method:
just close the thread!

just mods/supermods and admins can reply to closed threads anymore ;)

Chris M 07-24-2002 02:11 PM

Hmmm...

Thanks Logician:)

@Xenon - I never though of that;)

Though sometimes Mods cant reply to closed threads in forums they dont mod, so thats a little tricky...

Satan

Xenon 07-24-2002 02:38 PM

yes, and i think this is good as it is ;)
but you can change it also if ya want:
open newreply.php find:
PHP Code:

if (!$threadinfo[open]) {
  if (!
ismoderator($threadinfo[forumid],"canopenclose")) {
    eval(
"standardredirect(\"".gettemplate("redirect_threadclosed")."\",\"showthread.php?s=$session[sessionhash]&threadid=$threadid\");");
    exit;
  }


and replace it with this:
PHP Code:

if (!$threadinfo[open]) {
  if (!
ismoderator($threadinfo[forumid],"canopenclose") and $bbuserinfo[usergroupid]!=7) {
    eval(
"standardredirect(\"".gettemplate("redirect_threadclosed")."\",\"showthread.php?s=$session[sessionhash]&threadid=$threadid\");");
    exit;
  }


so every mod can reply in every closed thread ;)

Logician 07-24-2002 02:59 PM

Quote:

Originally posted by Xenon
but you can change it also if ya want:

hehe if vb doesnt behave, hack it and it will ;)

himm I should consider this as my new sig lol

Chris M 07-24-2002 06:32 PM

Lol...

Thanks to you both:)

Satan


All times are GMT. The time now is 06:57 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.01204 seconds
  • Memory Usage 1,733KB
  • 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_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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