PDA

View Full Version : Two quick customisation questions (Who's Online)


Jubei
08-07-2007, 06:42 PM
Q1. How would I move the Who's Online box to the top of the forum, just before the forum list.
Q2. How does one add a key underneath the box to show which usergroup colour represents? I've seen this on a few other forums.

Thanks.

Gray Matter
08-07-2007, 07:28 PM
These are both achieved with template edits to FORUMHOME. For Q1, open the template and move the currently active users section to the top of the forum (you can customize it if you want). For Q2, make a new <tr> under the currently active users section and add the key according to your forum. :)

Jubei
08-07-2007, 07:39 PM
*Edit: Nevermind, I figured it out, thanks.

Now about the second question, I'm afraid you were a little vague. Could you expand on what you said, please?

StrifeX
08-07-2007, 07:50 PM
Q1:

<!-- what's going on box -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<thead>
<tr>
<td class="tcat" colspan="2">$vbphrase[whats_going_on]</td>
</tr>
</thead>
<if condition="$show['loggedinusers']">
<!-- logged-in users -->
<tbody>
<tr>
<td class="thead" colspan="2">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_activeusers')"><img id="collapseimg_forumhome_activeusers" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_activeusers].gif" alt="" border="0" /></a>
<a href="online.php$session[sessionurl_q]" rel="nofollow">$vbphrase[currently_active_users]</a>: $totalonline (<phrase 1="$numberregistered" 2="$numberguest">$vbphrase[x_members_and_y_guests]</phrase>)
</td>
</tr>
</tbody>
<tbody id="collapseobj_forumhome_activeusers" style="$vbcollapse[collapseobj_forumhome_activeusers]">
<tr>
<td class="alt2"><a href="online.php$session[sessionurl_q]" rel="nofollow"><img src="$stylevar[imgdir_misc]/whos_online.gif" alt="$vbphrase[view_whos_online]" border="0" /></a></td>
<td class="alt1" width="100%">
<div class="smallfont">
<div style="white-space: nowrap"><phrase 1="$recordusers" 2="$recorddate" 3="$recordtime">$vbphrase[most_users_ever_online_was_x_y_at_z]</phrase></div>
<div>$activeusers</div>
</div>
</td>
</tr>
</tbody>
<!-- end logged-in users -->
</if>
<tbody>
<tr>
<td class="thead" colspan="2">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_stats')"><img id="collapseimg_forumhome_stats" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_stats].gif" alt="" border="0" /></a>
<phrase 1="$vboptions[bbtitle]">$vbphrase[x_statistics]</phrase>
</td>
</tr>
</tbody>
<tbody id="collapseobj_forumhome_stats" style="$vbcollapse[collapseobj_forumhome_stats]">
<tr>
<td class="alt2"><img src="$stylevar[imgdir_misc]/stats.gif" alt="<phrase 1="$vboptions[bbtitle]">$vbphrase[x_statistics]</phrase>" border="0" /></td>
<td class="alt1" width="100%">
<div class="smallfont">
<div>
$vbphrase[threads]: $totalthreads,
$vbphrase[posts]: $totalposts,
$vbphrase[members]: $numbermembers<if condition="$show['activemembers']">,
<span title="<phrase 1="$vboptions[activememberdays]">$vbphrase[within_the_last_x_days]</phrase>">$vbphrase[active_members]: $activemembers</span>
</if>
</div>
<div><phrase 1="member.php?$session[sessionurl]u=$newuserid" 2="$newusername">$vbphrase[welcome_to_our_newest_member_x]</phrase></div>
</div>
</td>
</tr>
</tbody>
<if condition="$show['birthdays']">
<!-- today's birthdays -->
<tbody>
<tr>
<td class="thead" colspan="2">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_birthdays')"><img id="collapseimg_forumhome_birthdays" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_birthdays].gif" alt="" border="0" /></a>
$vbphrase[todays_birthdays]
</td>
</tr>
</tbody>
<tbody id="collapseobj_forumhome_birthdays" style="$vbcollapse[collapseobj_forumhome_birthdays]">
<tr>
<td class="alt2"><a href="calendar.php?$session[sessionurl]do=getday&amp;day=$today&amp;sb=1"><img src="$stylevar[imgdir_misc]/birthday.gif" alt="$vbphrase[view_birthdays]" border="0" /></a></td>
<td class="alt1" width="100%"><div class="smallfont">$birthdays</div></td>
</tr>
</tbody>
<!-- end today's birthdays -->
</if>
<if condition="$show['upcomingevents']">
<tbody>
<tr>
<td class="thead" colspan="2">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_events')"><img id="collapseimg_forumhome_events" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_events].gif" alt="" border="0" /></a>
<if condition="$show['todaysevents']">$vbphrase[todays_events]<else /><phrase 1="$vboptions[showevents]">$vbphrase[upcoming_events_for_the_next_x_days]</phrase></if>
</td>
</tr>
</tbody>
<tbody id="collapseobj_forumhome_events" style="$vbcollapse[collapseobj_forumhome_events]">
<tr>
<td class="alt2"><a href="calendar.php$session[sessionurl_q]"><img src="$stylevar[imgdir_misc]/calendar.gif" alt="$vbphrase[calendar]" border="0" /></a></td>
<td class="alt1" width="100%"><div class="smallfont">$upcomingevents</div></td>
</tr>
</tbody>
</if>
</table>
<br />
<!-- end what's going on box -->

Add that wherever you want the What's going on box to appear (don't forget to remove the original one).

Q2:

It's a hack that is available on this forum, search for usergroup legend.

Jubei
08-07-2007, 07:59 PM
Thanks, I've installed it without a problem. So how would I edit it so that the Usergroup listing is underneath instead of on-top, and divided by a ruler?

StrifeX
08-07-2007, 08:01 PM
I'm a bit confused, correct me if I'm wrong, you only want a certain part of the what's going on box above the forums, and another section to stay on the bottom (seperated from the forums by a line/divider?)

Jubei
08-07-2007, 08:09 PM
At the moment I have it as:

Most users ever online was 2, 08-05-2007 at 04:19 PM.

• Administrator • Super Moderators • Moderator • Member

MyUsername


I want:

Most users ever online was 2, 08-05-2007 at 04:19 PM.
MyUsername
______________________________________________
• Administrator • Super Moderators • Moderator • Member

StrifeX
08-07-2007, 08:37 PM
Insert an <hr /> in the XHTML where you want it to be seperated. Also, let me see a screenshot of your what's going on box (please PNG, this internet makes GIF and JPEG look horrible :(.)

Jubei
08-07-2007, 08:53 PM
I have no idea where to put that <hr />

Also, I don't want 'Member' to be bold.

StrifeX
08-07-2007, 08:59 PM
Try reuploading the image to imageshack as a .png, the quality of the image is reduced to suit this horrid 56k internet :(.

Also, i forgot if the legend is a hack or not :p (Please remind me lol.)

Jubei
08-07-2007, 09:00 PM
Here you go:
http://img112.imageshack.us/img112/5003/l8ghflm7.png

StrifeX
08-07-2007, 09:02 PM
Never mind, just give me a little while to figure out how this hack works...

theFAILURE
08-07-2007, 09:18 PM
this is what I have on my forum:

https://vborg.vbsupport.ru/external/2007/08/18.jpg

If you like that, here is the code, change it accordingly in your forumhome template:

$vbphrase[most_users_ever_online_was_x_y_at_z]&nbsp; </phrase>
</b></div>
<div>
<if condition="$show['loggedinusers']">
[<b><font color="#FF0000">Administrator</font></b>] [<b><font color="#00CC00">Moderator</font></b>]
[<font color="#000080"><b>ScamBaiter</b></font>] [<b><font color="#FF00FF">Team Pink</font></b>]
[<font color="#E1981D"><b>SpamHater</b></font>] [<i><font color="#003300"><b>Audio
OGA</b></font></i>] [<font color="#000080">Member</font>]
[<font color="#000080"><strike>F*ckFace</strike></font>]<br></if>
$activeusers

StrifeX
08-07-2007, 09:21 PM
Got it.

Go to Plugins & Products > Plugin Manager > Find "Usergroup Color Bar" product and click edit on the only plugin > Replace the code in the textbox with the following:

if (THIS_SCRIPT == "index" and $vbulletin->options['ugcb_onoff'])
{
$activeusers2 .= '<hr />';
$userbuls = split(',', $vbulletin->options['sirala']);
foreach($userbuls AS $userbul) {

$activeusers2 .= $vbulletin->usergroupcache["$userbul"]['opentag'] . '• '.$vbulletin->usergroupcache["$userbul"]['title'] . $vbulletin->usergroupcache["$userbul"]['closetag'].' ';
}
$activeusers = $activeusers . '<b>'.$activeusers2 .'</b><br />';
}

Add <br /> around the red section if you want another space between the users online and the legend (like you showed me before.)

Jubei
08-07-2007, 09:52 PM
Thank you both for your help. Really.

I went for theFAILURE's method in the end.

StrifeX
08-07-2007, 10:03 PM
That's pretty much what you had in the beginning with the hack, but wtvr it's up to you what you want :p

reptor
08-07-2007, 10:16 PM
chak this:

in forumhome
add

<tr><td class="thead" colspan="2">legend</td></tr>
<tr><td class="alt1" colspan="2" ><span class="smallfont">$legend</span></td></tr
</tbody>


before

<!-- end logged-in users -->