<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[FluxBB.org Forums - Adding an icon beside the usernames of certain usergroups]]></title>
		<link>http://fluxbb.org/forums/topic/2960/adding-an-icon-beside-the-usernames-of-certain-usergroups/</link>
		<description><![CDATA[The most recent posts in Adding an icon beside the usernames of certain usergroups.]]></description>
		<lastBuildDate>Sat, 06 Jun 2009 18:10:46 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: Adding an icon beside the usernames of certain usergroups]]></title>
			<link>http://fluxbb.org/forums/post/23459/#p23459</link>
			<description><![CDATA[Thanks a million, guys.

I'm using class="group-<?php echo $cur_post['g_id'] ?>"

What an elegant solution. :cool:]]></description>
			<author><![CDATA[dummy@example.com (trichome)]]></author>
			<pubDate>Sat, 06 Jun 2009 18:10:46 +0000</pubDate>
			<guid>http://fluxbb.org/forums/post/23459/#p23459</guid>
		</item>
		<item>
			<title><![CDATA[Re: Adding an icon beside the usernames of certain usergroups]]></title>
			<link>http://fluxbb.org/forums/post/23457/#p23457</link>
			<description><![CDATA[Why not just class="group-<?php echo $cur_post['g_id'] ?>"

Or $group_class = 'group-'.$cur_post['g_id']; then you can echo group_class in the post wrapper div and set all aspects of the posts style according to group.]]></description>
			<author><![CDATA[dummy@example.com (Paul)]]></author>
			<pubDate>Sat, 06 Jun 2009 15:57:34 +0000</pubDate>
			<guid>http://fluxbb.org/forums/post/23457/#p23457</guid>
		</item>
		<item>
			<title><![CDATA[Re: Adding an icon beside the usernames of certain usergroups]]></title>
			<link>http://fluxbb.org/forums/post/23455/#p23455</link>
			<description><![CDATA[$cur_post['g_id']]]></description>
			<author><![CDATA[dummy@example.com (Smartys)]]></author>
			<pubDate>Sat, 06 Jun 2009 15:18:42 +0000</pubDate>
			<guid>http://fluxbb.org/forums/post/23455/#p23455</guid>
		</item>
		<item>
			<title><![CDATA[Re: Adding an icon beside the usernames of certain usergroups]]></title>
			<link>http://fluxbb.org/forums/post/23447/#p23447</link>
			<description><![CDATA[Good to hear it's in the right direction. :)

What would be the correct way to make it take effect depending the usergroup rather than the user's title?

Something like

[code]

if ($group_id == '2')

[/code]

I'm php illiterate. :\]]></description>
			<author><![CDATA[dummy@example.com (trichome)]]></author>
			<pubDate>Sat, 06 Jun 2009 06:38:04 +0000</pubDate>
			<guid>http://fluxbb.org/forums/post/23447/#p23447</guid>
		</item>
		<item>
			<title><![CDATA[Re: Adding an icon beside the usernames of certain usergroups]]></title>
			<link>http://fluxbb.org/forums/post/23446/#p23446</link>
			<description><![CDATA[Looks good to me]]></description>
			<author><![CDATA[dummy@example.com (Smartys)]]></author>
			<pubDate>Sat, 06 Jun 2009 06:31:54 +0000</pubDate>
			<guid>http://fluxbb.org/forums/post/23446/#p23446</guid>
		</item>
		<item>
			<title><![CDATA[Adding an icon beside the usernames of certain usergroups]]></title>
			<link>http://fluxbb.org/forums/post/23445/#p23445</link>
			<description><![CDATA[First off, 1.4 is rockin'. Thanks for all the hard work. :cool:

I'd like to do what the title says. I found a couple mods on punres along the same lines ([url]http://www.punres.org/files.php?pid=56[/url] and [url]http://www.punres.org/files.php?pid=445[/url]) and managed to sort of get something working.

Basically just editing viewtopic.php, replacing:

[code]<dt><strong><?php echo $username ?></strong></dt>[/code]

with

[code]
<?php
if ($user_title == $lang_common['Administrator']) {
        ?><dt><strong class="admicon"><?php echo $username ?></strong></dt><?php 
}
elseif ($user_title == $lang_common['Moderator']) {
        ?><dt><strong class="modicon"><?php echo $username ?></strong></dt><?php
}
else { ?><dt><strong><?php echo $username ?></strong></dt><?php }
?>
[/code]

This of course only works when the the users title is either 'Administrator' or 'Moderator'.

I tried to figure it out from examples in existing files but my php is super weak.

Something with these?

[code]($pun_user['g_id'] == PUN_ADMIN

($pun_user['g_moderator'] == '1'[/code]

Thanks for any ideas. :)]]></description>
			<author><![CDATA[dummy@example.com (trichome)]]></author>
			<pubDate>Sat, 06 Jun 2009 06:26:24 +0000</pubDate>
			<guid>http://fluxbb.org/forums/post/23445/#p23445</guid>
		</item>
	</channel>
</rss>
