<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="http://fluxbb.org/forums/extern.php?action=feed&amp;type=rss&amp;tid=2960" rel="self" type="application/rss+xml" />
		<title><![CDATA[FluxBB Forums / Adding an icon beside the usernames of certain usergroups]]></title>
		<link>http://fluxbb.org/forums/viewtopic.php?id=2960</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 1.4.8</generator>
		<item>
			<title><![CDATA[Re: Adding an icon beside the usernames of certain usergroups]]></title>
			<link>http://fluxbb.org/forums/viewtopic.php?pid=23459#p23459</link>
			<description><![CDATA[<p>Thanks a million, guys.</p><p>I&#039;m using class=&quot;group-&lt;?php echo $cur_post[&#039;g_id&#039;] ?&gt;&quot;</p><p>What an elegant solution. <img src="http://fluxbb.org/forums/img/smilies/cool.png" width="15" height="15" alt="cool" /></p>]]></description>
			<author><![CDATA[dummy@example.com (trichome)]]></author>
			<pubDate>Sat, 06 Jun 2009 18:10:46 +0000</pubDate>
			<guid>http://fluxbb.org/forums/viewtopic.php?pid=23459#p23459</guid>
		</item>
		<item>
			<title><![CDATA[Re: Adding an icon beside the usernames of certain usergroups]]></title>
			<link>http://fluxbb.org/forums/viewtopic.php?pid=23457#p23457</link>
			<description><![CDATA[<p>Why not just class=&quot;group-&lt;?php echo $cur_post[&#039;g_id&#039;] ?&gt;&quot;</p><p>Or $group_class = &#039;group-&#039;.$cur_post[&#039;g_id&#039;]; then you can echo group_class in the post wrapper div and set all aspects of the posts style according to group.</p>]]></description>
			<author><![CDATA[dummy@example.com (Paul)]]></author>
			<pubDate>Sat, 06 Jun 2009 15:57:34 +0000</pubDate>
			<guid>http://fluxbb.org/forums/viewtopic.php?pid=23457#p23457</guid>
		</item>
		<item>
			<title><![CDATA[Re: Adding an icon beside the usernames of certain usergroups]]></title>
			<link>http://fluxbb.org/forums/viewtopic.php?pid=23455#p23455</link>
			<description><![CDATA[<p>$cur_post[&#039;g_id&#039;]</p>]]></description>
			<author><![CDATA[dummy@example.com (Smartys)]]></author>
			<pubDate>Sat, 06 Jun 2009 15:18:42 +0000</pubDate>
			<guid>http://fluxbb.org/forums/viewtopic.php?pid=23455#p23455</guid>
		</item>
		<item>
			<title><![CDATA[Re: Adding an icon beside the usernames of certain usergroups]]></title>
			<link>http://fluxbb.org/forums/viewtopic.php?pid=23447#p23447</link>
			<description><![CDATA[<p>Good to hear it&#039;s in the right direction. <img src="http://fluxbb.org/forums/img/smilies/smile.png" width="15" height="15" alt="smile" /></p><p>What would be the correct way to make it take effect depending the usergroup rather than the user&#039;s title?</p><p>Something like</p><div class="codebox"><pre><code>if ($group_id == &#039;2&#039;)</code></pre></div><p>I&#039;m php illiterate. :\</p>]]></description>
			<author><![CDATA[dummy@example.com (trichome)]]></author>
			<pubDate>Sat, 06 Jun 2009 06:38:04 +0000</pubDate>
			<guid>http://fluxbb.org/forums/viewtopic.php?pid=23447#p23447</guid>
		</item>
		<item>
			<title><![CDATA[Re: Adding an icon beside the usernames of certain usergroups]]></title>
			<link>http://fluxbb.org/forums/viewtopic.php?pid=23446#p23446</link>
			<description><![CDATA[<p>Looks good to me</p>]]></description>
			<author><![CDATA[dummy@example.com (Smartys)]]></author>
			<pubDate>Sat, 06 Jun 2009 06:31:54 +0000</pubDate>
			<guid>http://fluxbb.org/forums/viewtopic.php?pid=23446#p23446</guid>
		</item>
		<item>
			<title><![CDATA[Adding an icon beside the usernames of certain usergroups]]></title>
			<link>http://fluxbb.org/forums/viewtopic.php?pid=23445#p23445</link>
			<description><![CDATA[<p>First off, 1.4 is rockin&#039;. Thanks for all the hard work. <img src="http://fluxbb.org/forums/img/smilies/cool.png" width="15" height="15" alt="cool" /></p><p>I&#039;d like to do what the title says. I found a couple mods on punres along the same lines (<a href="http://www.punres.org/files.php?pid=56">http://www.punres.org/files.php?pid=56</a> and <a href="http://www.punres.org/files.php?pid=445">http://www.punres.org/files.php?pid=445</a>) and managed to sort of get something working.</p><p>Basically just editing viewtopic.php, replacing:</p><div class="codebox"><pre><code>&lt;dt&gt;&lt;strong&gt;&lt;?php echo $username ?&gt;&lt;/strong&gt;&lt;/dt&gt;</code></pre></div><p>with</p><div class="codebox"><pre><code>&lt;?php
if ($user_title == $lang_common[&#039;Administrator&#039;]) {
        ?&gt;&lt;dt&gt;&lt;strong class=&quot;admicon&quot;&gt;&lt;?php echo $username ?&gt;&lt;/strong&gt;&lt;/dt&gt;&lt;?php 
}
elseif ($user_title == $lang_common[&#039;Moderator&#039;]) {
        ?&gt;&lt;dt&gt;&lt;strong class=&quot;modicon&quot;&gt;&lt;?php echo $username ?&gt;&lt;/strong&gt;&lt;/dt&gt;&lt;?php
}
else { ?&gt;&lt;dt&gt;&lt;strong&gt;&lt;?php echo $username ?&gt;&lt;/strong&gt;&lt;/dt&gt;&lt;?php }
?&gt;</code></pre></div><p>This of course only works when the the users title is either &#039;Administrator&#039; or &#039;Moderator&#039;.</p><p>I tried to figure it out from examples in existing files but my php is super weak.</p><p>Something with these?</p><div class="codebox"><pre><code>($pun_user[&#039;g_id&#039;] == PUN_ADMIN

($pun_user[&#039;g_moderator&#039;] == &#039;1&#039;</code></pre></div><p>Thanks for any ideas. <img src="http://fluxbb.org/forums/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></description>
			<author><![CDATA[dummy@example.com (trichome)]]></author>
			<pubDate>Sat, 06 Jun 2009 06:26:24 +0000</pubDate>
			<guid>http://fluxbb.org/forums/viewtopic.php?pid=23445#p23445</guid>
		</item>
	</channel>
</rss>

