<?xml version='1.0' encoding='UTF-8'?>
<rss version='2.0'>
	<channel>
		<title>cotonti.com : Grup color Core hack how can do ?</title>
		<link>https://www.cotonti.com</link>
		<description>Neueste Themenbeiträge</description>
		<generator>Cotonti</generator>
		<language>en</language>
		<pubDate>Fri, 15 May 2026 19:02:39 -0000</pubDate>

		<item>
			<title>Kilandor</title>
			<description><![CDATA[<p>The current best solution that exists with no need for any core hacks would be to simply in any spot/area that shows or uses cot_build_user. Hook into that area, and overwrite the default tag by running it again and using the 3rd paramater to add a class.</p>

<p>Here is just an example file of how you could add a class to the username of forum posts which would result in a class of group# # being their main group. You would need to hook into every area that displays tags and fix them though.</p>

<pre class="brush:php;">
&lt;?PHP
/**
 * Example Plugin
 *
 * @package example
 * @version 1.0.0
 * @author Jason Booth (Kilandor)
 * @copyright Copyright (c) 2014 Jason Booth (Kilandor)
 * @license BSD
 */
/* ====================
[BEGIN_COT_EXT]
Hooks=forums.posts.loop
[END_COT_EXT]
==================== */

if (!defined('COT_CODE') { die('Wrong URL.'); }

$t-&gt;assign(array(
	'FORUMS_POSTS_ROW_POSTERNAME' =&gt; cot_build_user($row['fp_posterid'], htmlspecialchars($row['fp_postername']), array('class' =&gt; 'group'.$row['user_maingrp'])),
	));</pre>

<p> </p>

<p>On another note, this is a long desired feature. I have just pushed a new commit to allow for custom function to be used.</p>

<p><a href="https://github.com/Cotonti/Cotonti/commit/4cc7943c2769039ab03d8026baf3b0cb6142a60d" rel="nofollow">Added the ability to override cot_build_user with cot_build_user_custom</a></p>

<p><span style="line-height:1.6em;">This will allow a plugin to create a custom system to do anything group colors, images, any style changes you want. Or for simple changes you can simply enable custom function file in your config and add a new function cot_build_user_custom and then do whatever you want. This is of course what a plugin would/could do.</span></p>
]]></description>
			<pubDate>Di, 09 Sep 2014 16:57:18 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/de/forums?m=posts&q=7785&d=0#post39859]]></link>
		</item>
		<item>
			<title>Gökhan YILDIZ</title>
			<description><![CDATA[<blockquote><a href="https://www.cotonti.com/forums?m=posts&amp;q=7785&amp;d=1#39856">#39856</a> <strong>Macik: </strong>
<blockquote><a href="https://www.cotonti.com/forums?m=posts&amp;q=7785&amp;d=1#39853">#39853</a> <strong>Gökhan YILDIZ:</strong>
<p>He's want to this solution</p>

<p><span style="font-size:13px;line-height:1.6em;">supposed to appear everywhere</span></p>
</blockquote>

<p>I understand it. But there are no universal workaround (without corehack) for «everywhere», but for some paces it can be done with TPL or small plugin. </p>
</blockquote>

<p>it is a temporary solution. soon I'll make a plugin.</p>
]]></description>
			<pubDate>Di, 09 Sep 2014 13:36:19 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/de/forums?m=posts&q=7785&d=0#post39857]]></link>
		</item>
		<item>
			<title>Macik</title>
			<description><![CDATA[<blockquote><a href="https://www.cotonti.com/forums?m=posts&amp;q=7785&amp;d=1#39853">#39853</a> <strong>Gökhan YILDIZ:</strong>
<p>He's want to this solution</p>

<p><span style="font-size:13px;line-height:1.6em;">supposed to appear everywhere</span></p>
</blockquote>

<p>I understand it. But there are no universal workaround (without corehack) for «everywhere», but for some paces it can be done with TPL or small plugin. </p>
]]></description>
			<pubDate>Di, 09 Sep 2014 13:23:34 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/de/forums?m=posts&q=7785&d=0#post39856]]></link>
		</item>
		<item>
			<title>Gökhan YILDIZ</title>
			<description><![CDATA[<blockquote> </blockquote>

<blockquote><a href="https://www.cotonti.com/forums?m=posts&amp;q=7785&amp;d=1#39851">#39851</a> <strong>Macik: </strong>

<p>Core hack it's not a good solution anyway and a bad practice. I think it may be solved other way.</p>

<p>So I repeat my question once more: from what part of the site you call this funciton or what template use it?</p>
</blockquote>

<p>He's want to this solution</p>

<p><img alt="" src="http://www.vbulletin.com/forum/filedata/fetch?id=3720238&amp;d=1372866839&amp;type=full" style="width:958px;height:326px;" /></p>

<p>supposed to appear everywhere</p>
]]></description>
			<pubDate>Di, 09 Sep 2014 09:51:39 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/de/forums?m=posts&q=7785&d=0#post39853]]></link>
		</item>
		<item>
			<title>Macik</title>
			<description><![CDATA[<p>Core hack it's not a good solution anyway and a bad practice. I think it may be solved other way.</p>

<p>So I repeat my question once more: from what part of the site you call this funciton or what template use it?</p>
]]></description>
			<pubDate>Di, 09 Sep 2014 09:28:18 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/de/forums?m=posts&q=7785&d=0#post39851]]></link>
		</item>
		<item>
			<title>Gökhan YILDIZ</title>
			<description><![CDATA[<p>Rica ederim kolay gelsin</p>
]]></description>
			<pubDate>Mo, 08 Sep 2014 20:23:38 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/de/forums?m=posts&q=7785&d=0#post39840]]></link>
		</item>
		<item>
			<title>Lover</title>
			<description><![CDATA[<p>Gökhan usta adamın dibisin ! ham maddesisin adamlığın bir fabrikası var ise ilk çıkan patentli ürünüsün teşekkür ederim</p>
]]></description>
			<pubDate>Mo, 08 Sep 2014 20:15:35 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/de/forums?m=posts&q=7785&d=0#post39839]]></link>
		</item>
		<item>
			<title>Gökhan YILDIZ</title>
			<description><![CDATA[<p>change your function:</p>

<pre class="brush:php;">
function cot_build_user($id, $user, $extra_attrs = '')
{
	global $db;
	if (!$id)
	{
		return empty($user) ? '' : $user;
	}
	else
	{
		$gdata = $db-&gt;query("SELECT gru_groupid FROM cot_groups_users WHERE gru_userid = $id LIMIT 1");
		$row = $gdata-&gt;fetch();
		return empty($user) ? '?' : $link='&lt;a href="'.cot_url('users', 'm=details&amp;id='.$id.'&amp;u='.$user).'" class="group'.$row["gru_groupid"].'"&gt;'.$user.'&lt;/a&gt;';
	}
}</pre>

<p>open your css file and add anywhere:</p>

<p> </p>

<pre class="brush:css;">
a.group5{
	color:#FF0000;
	font-weight:bold;
}
a.group4{
	color:#000;
	font-weight:bold;
}
a.group3{
	color:#CC0;
	font-weight:bold;
}
a.group2{
	color:#ddd;
	font-weight:bold;
}
a.group1{
	color:#ccc;
	font-weight:bold;
}</pre>

<p> </p>
]]></description>
			<pubDate>Mo, 08 Sep 2014 19:41:42 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/de/forums?m=posts&q=7785&d=0#post39837]]></link>
		</item>
		<item>
			<title>Lover</title>
			<description><![CDATA[<p>Siena last version <strong>/system/functions.php  Open it !!!</strong></p>

<p><strong>i know wtih this code zone can core hack and we can do grup color</strong></p>

<p> </p>

<p><strong>For example it was im using Genoa version ! and this code for me working , but with Siena its not working any :) Macik how can we do this ?</strong></p>

<pre class="brush:php;">
function sed_build_user($id, $user)
{
global $cfg;

if (($id==0 &amp;&amp; !empty($user)))
{ $result = $user; }
elseif ($id==0)
{ $result = ''; }
else
{ $result = (!empty($user)) ? $user : '?'; }

$sql = sed_sql_query("SELECT gru_groupid FROM sed_groups_users WHERE gru_userid='$id' LIMIT 1");
$row = sed_sql_fetcharray($sql);

if ($row['gru_groupid']==5)
{
$result = "&lt;img src=https://www.cotonti.com/\"images/admin.png\"&gt;&lt;a href=https://www.cotonti.com/\"users.php?m=details&amp;id=".$id."\"&gt;&lt;font style=\"color:#bf0707;font-weight:bold;font-size: 9pt;\"&gt;".$result."&lt;/font&gt;&lt;/a&gt;";
}
elseif ($row['gru_groupid']==4)
{
$result = "&lt;a href=https://www.cotonti.com/\"users.php?m=details&amp;id=".$id."\"&gt;&lt;font style=\"color:#a0a0a0;\"&gt;".$result."&lt;/font&gt;&lt;/a&gt;";
}
elseif ($row['gru_groupid']==6)
{
$result = "&lt;a href=https://www.cotonti.com/\"users.php?m=details&amp;id=".$id."\"&gt;&lt;font style=\"color:#0000FF\"&gt;".$result."&lt;/font&gt;&lt;/a&gt;";
}
elseif ($row['gru_groupid']==7)
{
$result = "&lt;a href=https://www.cotonti.com/\"users.php?m=details&amp;id=".$id."\"&gt;&lt;font style=\"color:#FF0000;font-weight:bold\"&gt;".$result."&lt;/font&gt;&lt;/a&gt;";
}
else
{
$result = "&lt;a href=https://www.cotonti.com/\"users.php?m=details&amp;amp;id=".$id."&amp;amp;u='.$user.'\"&gt;".$user."&lt;/a&gt;";

}
return($result);
}</pre>

<p> </p>
]]></description>
			<pubDate>Mo, 08 Sep 2014 18:47:05 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/de/forums?m=posts&q=7785&d=0#post39836]]></link>
		</item>
		<item>
			<title>Macik</title>
			<description><![CDATA[<p>In what plugin and what template you are using this function? What place of the site?</p>
]]></description>
			<pubDate>Mo, 08 Sep 2014 16:06:12 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/de/forums?m=posts&q=7785&d=0#post39835]]></link>
		</item>
		<item>
			<title>Lover</title>
			<description><![CDATA[<p>How can i do Group color ? with functions.php core hack ?</p>

<p> </p>

<p><strong>For do this critic zone code.</strong></p>

<pre class="brush:php;">
function cot_build_user($id, $user, $extra_attrs = '')
{
	if (!$id)
	{
		return empty($user) ? '' : $user;
	}
	else
	{
		return empty($user) ? '?' : cot_rc_link(cot_url('users', 'm=details&amp;id='.$id.'&amp;u='.$user), $user, $extra_attrs);
	}
}</pre>

<p> </p>

<p>im thinking some magic touch enough , and i hope somena can do this :)</p>
]]></description>
			<pubDate>Mo, 08 Sep 2014 14:06:40 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/de/forums?m=posts&q=7785&d=0#post39834]]></link>
		</item>
	</channel>
</rss>