PDA

View Full Version : How do I..


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

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

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

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

<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

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


replace this with

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:

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:

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

$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! :)