vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   How do I.. (https://vborg.vbsupport.ru/showthread.php?t=33617)

s o r o k a 12-29-2001 08:24 PM

How do I put the "Moderated by" in the Forum desrciption like on the vb.org forums.

jamesdasher 12-29-2001 10:45 PM

it is actually very simple, not actually a hack, but a template modification...

1. Login to Admin Panel

2. Select "Modify" in the Template Section

3. Expand List

4. Expand "Forum Home Page Templates"

5. Edit/Change Original (depending on previous edit or not) template "forumhome_moderator"

6. Change "forumhome_moderator" (from the default) to

Code:

Moderated By: <a href="member.php?s=$session[sessionhash]&action=getinfo&userid=$moderator[userid]">$moderator[username]</a>
Save Changes

7. Repeat step 5 on "forumhome_forumbit_level2_post"

8. In "forumhome_forumbit_level2_post" find "$forum[description]" after that add

Code:

<br><b>$forum[moderators]</b>
(before the closing smallfont tag) save, alright your done.

James

P.S. looks a bit different from vb.org's layout, to remove the bold print take out the bold tags in the second code segment, and to change the layout of the list (such as to add the [] for example) edit the "forumhome_moderator" template as you wish.

Boofo 05-29-2002 11:48 PM

I did it like that but if you have more then one moderator for a forum, the Moderated By part shows up twice. How can I get it to show up once but with all of the moderator names for that forum?

Chris M 05-30-2002 03:01 PM

I get the same problem...

Plus - How do you make it display a newthread link?

Satan

Chris M 05-30-2002 03:09 PM

@Boofo :

I figured out how to change it...

Keep the "forumhome_moderators" as the default, and edit the "forumhome_forumbit_level2_post"

Do as he says, and find "$forum[description]" after that add :

Code:

<br><b>Moderated by:</b> [$forum[moderators]]
THAT will work with more than one mod...

Now...How do you do the new thread?

Satan

Boofo 05-30-2002 03:19 PM

Quote:

Originally posted by hellsatan
@Boofo :

I figured out how to change it...

Keep the "forumhome_moderators" as the default, and edit the "forumhome_forumbit_level2_post"

Do as he says, and find "$forum[description]" after that add :

Code:

<br><b>Moderated by:</b> [$forum[moderators]]
THAT will work with more than one mod...

Now...How do you do the new thread?

Satan


Won't work like that. Then it will show Moderated By: even when there are no mods for that forum. :) Nick had it fixed once, but I took the code out when he left me with it and started over again. Guess I should have left it in, huh? :)

The new thread thing I haven't played with yet. I will see what I can come up with but it should work just like the hack for the forum titles in the last post column, only in a different place.

Boofo 06-01-2002 12:22 PM

Can anyone please help us here with the Moderated By on forum home? I want to have it only show up when there are moderators for the particular forum and list ALL of the moderators instead of doing a Moderated By for each moderator.

Sparkz 06-01-2002 12:54 PM

Quick and dirty:

in index.php find
PHP Code:

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

replace this with
PHP Code:

        if ( !isset($forum['moderators']) ) {
          
$forum['moderators'] = '';
        } else {
             
$forum['moderators'] = '<b>Moderated by:</b> ' $forum['moderators'];
        } 

Keep forumhome_moderators as the original, and add $forum[moderators] where previously suggested.

Sparkz 06-01-2002 12:56 PM

You'll probably want to repeat the file edit in forumdisplay.php

Boofo 06-01-2002 01:17 PM

This is what I have in my root/index.php:

Code:

if ( !isset($forum['moderators']) ) {
              eval("\$forum['moderators'] = \"".gettemplate('forumhome_moderator')."\";");
            } else {
              eval("\$forum['moderators'] .= \", ".gettemplate('forumhome_moderator')."\";");
            }
          }
        }

        if ( !isset($forum['moderators']) ) {
          eval("\$forum['moderators'] = \"".gettemplate('forumhome_nomoderator')."\";");
        }

What do I do? And also can I get the brackets like this around it?:

[Moderated By: whomever, noone]

Boofo 06-01-2002 01:21 PM

Here's the code I found in forumdisplay.php. I chnaged the one in index.php to match it. Is it supposed to be the same in both:

Code:

if ( !isset($forum['moderators']) ) {
              eval("\$forum['moderators'] = \"".gettemplate('forumhome_moderator')."\";");
            } else {
              eval("\$forum['moderators'] .= \", ".gettemplate('forumhome_moderator')."\";");
            }
          }
        }

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


Sparkz 06-01-2002 01:36 PM

Code:

if ( !isset($forum['moderators']) ) {
          eval("\$forum['moderators'] = \"".gettemplate('forumhome_nomoderator')."\";");
        }

I don't even have that template in my 2.2.6, so it must be from some other hack.

To put [] around it, just put that in your template :)

Boofo 06-01-2002 01:49 PM

I think that code was added by someone who left me hanging with it. Anyway, I changed it to match in both files and all is well. The only problem is I can't use the brackets. If I do it in the moderator template it puts a bracket after each moderator name. If I do in the the forumhome_forumbit_level2_post, it puts the brackets there even when there are no mods. Any ideas how I can get it in there if there are mods and not if there aren't?

Sparkz 06-01-2002 02:05 PM

put it in the php code then.
something like
PHP Code:

$forum['moderators'] = '[<b>Moderated by:</b> ' $forum['moderators'] . ']'


Boofo 06-01-2002 02:11 PM

That did it. Works like a charm. That you very much. :)

Sparkz 06-01-2002 02:17 PM

Glad I could help :)

Boofo 06-01-2002 02:22 PM

Thanks again! :)

I do have one question though...I don't know how hard this would be to do, but is there a way to have the colors of the moderators match the other colors I have for the Admin, Supermods and mods in my site? I mean if I have an Admin listed as a mod, the color of the name would be in red, super mod in brown and mod in green. Can it be done? :) :)

Chris M 06-01-2002 02:59 PM

Looks like you got it working on your site...

Satan

Boofo 06-01-2002 03:01 PM

Thanks to Sparkz! :)


All times are GMT. The time now is 05:03 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.01118 seconds
  • Memory Usage 1,762KB
  • 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
  • (7)bbcode_code_printable
  • (3)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (19)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