A few things...
Firstly, thanks for releasing this

.
Some Questions- How do I sort user groups in a custom order, say id 1, 4, 5, 3, 2 or name A, D, E, C, B? A similar thing is done for user groups in a legend by Cyberntec in his "Visitors in Last X Hours" mod, but not being a coder I can't work it out myself.
- How would I pull a user's age (not DOB), provided they haven't set it to private (Hide Age + DOB, Display Only Day and Month of Birth)? I spent quite a while trying to figure it out, with no joy.
- How would I do the feature that is in ADMIN CP > Forums & Moderators > Show All Moderators, whereby it displays the last online in different colours, based on their last activity? I managed to find the code in forum/admincp/moderator.php;
PHP Code:
if ($supergroup['lastactivity'] >= $unixtoday)
{
$onlinecolor = 'modtoday';
}
else if ($supergroup['lastactivity'] >= ($unixtoday - 86400))
{
$onlinecolor = 'modyesterday';
}
else if ($supergroup['lastactivity'] >= ($unixtoday - 864000))
{
$onlinecolor = 'modlasttendays';
}
else if ($supergroup['lastactivity'] >= ($unixtoday - 2592000))
{
$onlinecolor = 'modsincetendays';
}
else
{
$onlinecolor = 'modsincethirtydays';
}
Which I unsuccessfully tried to convert into;
PHP Code:
<if condition="$user['lastactivity'] >= $unixtoday">$user[lastonline]
<else />
<if condition="$user['lastactivity'] >= ($unixtoday - 86400)"><span style="color:green">$user[lastonline]</span>
<else />
<if condition="$user['lastactivity'] >= ($unixtoday - 864000)"><span style="color:blue">$user[lastonline]</span>
<else />
<if condition="$user['lastactivity'] >= ($unixtoday - 2592000)"><span style="color:orange">$user[lastonline]</span>
<else />
<span style="color:red">$user[lastonline]</span>
</if></if></if></if>
What am I doing wrong?
Some Suggestions
- postbit_onlinestatus is uncached. Opening up showroster.php, and adding the following appears to fix this;
Quote:
// pre-cache templates used by all actions
$globaltemplates = array(
'SHOWROSTER',
'showroster_header',
'showroster_userbits',
'postbit_onlinestatus'
);
|
- Replace all instances of <br> (9) with <br /> for XHTML validation.
- Continuing with XHTML, still in showroster.php change the following line to include;
Quote:
$avatarimage='<img src="'.$avatarurl.'" border="0" alt="" />'; //Use $avatarimage in userbits to display avatars
|
- Also XHTML, in product-showroster.xml, find and edit;
Quote:
Originally Posted by (showroster_header template)
<td class="thead">Avatars</td>
</tr>
$rosterbits
</table>
|
- "Last Online" can be phrased using $vbphrase[last_online].
A Request
Rather than decide who appears/can view a roster via bitfields, would it be possible to do it via a ADMIN CP > vBulletin Options > Edit Settings Option (Similar to Cyb's mod I mentioned earlier)? I have quite a lot of usergroups, and I imagine most people who have clans/guilds use their forums do too, and it's a bit of a pain having to update each user group manually for those permissions, particularly if you use more than one roster. Those options would ideally include;
- "User groups to show in roster" and a input area, where by the user group ids entered would be shown on the roster, in the order entered.
- "User groups who can view roster" where you enter the user groups id that can view it, and where 0 means all groups can view it.
If doing it via that method is a lot of work/you think bit fields is a better way then no worries, I just thought I'd ask

.
----------------------------
Quote:
Originally Posted by michael5472
Done any chance ?
|
I don't know how to enable BB code in the field, and I can't view users profiles without signing up, so don't know what else you use the "Play Monitor" field for, but a possible idea that may you might find suitable is;
- Change your "Play Monitor" description to say "Enter the server IP you wish to track".
- Enter the IP in that field: eg; 217.163.28.224:28960
- In your showroster_userbits template, put this;
Quote:
<if condition="$user[fieldX]"><img src="http://www.gametracker.com/server_info/$user[fieldX]/b_560x95.png" alt="$user[fieldX]" border="0" /><else />No Server Tracked</if>
|
If that's not of any use to you then I'm afraid you'll have to wait for someone else to reply regarding enabling BB code, as I can't help you.