vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   moderated by... (https://vborg.vbsupport.ru/showthread.php?t=52166)

robflack 04-26-2003 09:40 AM

moderated by...
 
can someone tell me how to remove the moderated column from my list of forums?

Koutaru 04-26-2003 10:09 AM

you have to edit the Forum home and Forum display templates :)

Brad 04-26-2003 11:21 AM

http://www.vbulletintemplates.com/mo...ght=remove+mod

Install that template modification.

code hacking (dont have to do this)

If you want to take all the mod code out to save some processing time or something (hey, if we arent using them why should we have code for them? ;) ). You can do this code hack (not tested).

Open index.php

Find:

PHP Code:

,forumhome_moderator 

Remove it.

Find:

PHP Code:

$imodcache = array();
$mod = array();
$forummoderators=$DB_site->query('SELECT user.userid,user.username,moderator.forumid
                                  FROM moderator
                                  LEFT JOIN user
                                    ON (moderator.userid=user.userid)
                                  ORDER BY user.username'
);
while (
$moderator=$DB_site->fetch_array($forummoderators)) {
  
$imodcache["$moderator[forumid]"][] = $moderator;
  
$mod["$moderator[userid]"] = 1;
}
$DB_site->free_result($forummoderators);
unset(
$moderator); 

Remove it.

Find:

PHP Code:

,$imodcache 

Remove it.

Find:

PHP Code:

$listexploded=","$forum['parentlist']);
        while ( list(
$mkey1,$mval1)=$listexploded) ) {
          if ( !isset(
$imodcache["$mval1"]) ) {
            continue;
          }
          
$imodcache["$mval1"]);
          while ( list(
$mkey2,$moderator)=$imodcache["$mval1"]) ) {
            if ( !isset(
$forum['moderators']) ) {
              eval(
"\$forum['moderators'] = \"".gettemplate('forumhome_moderator')."\";");
            } else {
              eval(
"\$forum['moderators'] .= \", ".gettemplate('forumhome_moderator')."\";");
            }
          }
        } 

Remove it.

Find:

PHP Code:

        if ( !isset($forum['moderators']) ) {
          
$forum['moderators'] = ' ';
        } 

Remove it.

I *think* thats everything, again the code hack isent tested.

Koutaru 04-26-2003 11:49 AM

It works :) Thanks. Even the index.php code removal seems to be fine.

One thing, in 2.3's index.php I could only find this when I was looking for the 2nd to last removal

PHP Code:

        $listexploded=explode(","$forum['parentlist']);
        while ( list(
$mkey1,$mval1)=each($listexploded) ) {
          if ( !isset(
$imodcache["$mval1"]) ) {
            continue;
          }
          
reset($imodcache["$mval1"]);
          while ( list(
$mkey2,$moderator)=each($imodcache["$mval1"]) ) {
            if ( !isset(
$forum['moderators']) ) {
              eval(
"\$forum['moderators'] = \"".gettemplate('forumhome_moderator')."\";");
            } else {
              eval(
"\$forum['moderators'] .= \", ".gettemplate('forumhome_moderator')."\";");
            }
          }
        } 

It should be the same thing

Brad 04-26-2003 12:11 PM

Yea thats correct, I messed up the formatting a bit while pasting it over. Ive edited my post to refelect the correct formatting now. :)

Brad 04-26-2003 12:20 PM

argh! I forgot about sub-forums. To compleatly remove mod list for sub-forums do this:

Open forumdisplay.php

Find:

PHP Code:

,forumhome_moderator 

Remove it.

Find:

PHP Code:

,$imodcache 

Remove it.

Find:

PHP Code:

                unset($forum['moderators']);
        
$listexploded=explode(","$forum['parentlist']);
        while ( list(
$mkey1,$mval1)=each($listexploded) ) {
          if ( !isset(
$imodcache["$mval1"]) ) {
            continue;
          }
          
reset($imodcache["$mval1"]);
          while ( list(
$mkey2,$moderator)=each($imodcache["$mval1"]) ) {
            if ( !isset(
$forum['moderators']) ) {
              eval(
"\$forum['moderators'] = \"".gettemplate('forumhome_moderator')."\";");
            } else {
              eval(
"\$forum['moderators'] .= \", ".gettemplate('forumhome_moderator')."\";");
            }
          }
        }

        if ( !isset(
$forum['moderators']) ) {
          
$forum['moderators'] = ' ';
        } 

Remove it.

Should be it!.

// Note: Only removed template and code in makeforumbit so I wouldent break the parent forums mod list.


All times are GMT. The time now is 11:16 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.01233 seconds
  • Memory Usage 1,763KB
  • 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
  • (9)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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