<?xml version='1.0' encoding='UTF-8'?>
<rss version='2.0'>
	<channel>
		<title>cotonti.com : MVC in comments</title>
		<link>https://www.cotonti.com</link>
		<description>Laatste forum onderwerpen</description>
		<generator>Cotonti</generator>
		<language>en</language>
		<pubDate>Thu, 16 Apr 2026 00:35:45 -0000</pubDate>

		<item>
			<title>pieter</title>
			<description><![CDATA[<p>What do you want to do?</p>
]]></description>
			<pubDate>Thu, 19 Feb 2015 10:20:47 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/nl/forums?m=posts&q=5288&d=0#post40587]]></link>
		</item>
		<item>
			<title>smithjon</title>
			<description><![CDATA[<p><span style="color:rgb(68,68,68);font-family:sans-serif;line-height:16.0030002593994px;background-color:rgb(238,238,238);"> I only want to show a picture and a comment count, this sed_build_comments() is overkill.</span><br style="color:rgb(68,68,68);font-family:sans-serif;line-height:16.0030002593994px;background-color:rgb(238,238,238);" /><span style="color:rgb(68,68,68);font-family:sans-serif;line-height:16.0030002593994px;background-color:rgb(238,238,238);">e.g. In the news plugin (we could use a lighter function for just getting af gsdfgvsd f</span></p>
]]></description>
			<pubDate>Thu, 19 Feb 2015 09:16:23 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/nl/forums?m=posts&q=5288&d=0#post40586]]></link>
		</item>
		<item>
			<title>ez</title>
			<description><![CDATA[I have been playing with sprites for a few days now, there are a few good articles about it.<br />
BUT, you are right, you have to know how those Sprites work.<br />
Still it improves performance.<br />
<br />
Here are some documents (for the interested) <br />
<br />
Articles:<br />
<a href="http://www.alistapart.com/articles/sprites/" rel="nofollow">http://www.alistapart.com/articles/sprites/</a><br />
<a href="http://www.websiteoptimization.com/speed/tweak/css-sprites/" rel="nofollow">http://www.websiteoptimization.com/speed/tweak/css-sprites/</a><br />
<br />
General website optimizing: <br />
<a href="http://developer.yahoo.com/performance/rules.html" rel="nofollow">http://developer.yahoo.com/performance/rules.html</a>]]></description>
			<pubDate>Za, 13 Feb 2010 02:51:32 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/nl/forums?m=posts&q=5288&d=0#post22866]]></link>
		</item>
		<item>
			<title>Trustmaster</title>
			<description><![CDATA[Sprites are quite hard to maintain, especially for non-designers.]]></description>
			<pubDate>Vr, 12 Feb 2010 23:13:57 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/nl/forums?m=posts&q=5288&d=0#post22860]]></link>
		</item>
		<item>
			<title>ez</title>
			<description><![CDATA[Can I make a suggestion for the resources.... Use CSS Sprites for icon thingies !<br />
I am working on that right now.. (That's how i came to the hardcoded comments link  <img class="aux smiley" src="https://www.cotonti.com/./images/smilies/sad.gif" alt=":(" />  )<br />
<br />
It reduces the number off request to the server !! (And thats a good thing)]]></description>
			<pubDate>Vr, 12 Feb 2010 20:29:48 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/nl/forums?m=posts&q=5288&d=0#post22859]]></link>
		</item>
		<item>
			<title>Trustmaster</title>
			<description><![CDATA[Icons are moved to <a href="http://www.cotonti.com/docs/en/developer/resource_strings">customizable resource files</a> in Siena.<br />
<br />
Yes, current coments/ratings is rubbish. In Siena we are going to make them plugins, with TPL files.]]></description>
			<pubDate>Vr, 12 Feb 2010 20:21:41 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/nl/forums?m=posts&q=5288&d=0#post22857]]></link>
		</item>
		<item>
			<title>ez</title>
			<description><![CDATA[Hi There,<br />
<br />
functions.php::sed_build_comments()<br />
<br />
<div class="highlight"><pre class="php">	$res = '&lt;a href=https://www.cotonti.com/&quot;' . $url . '#comments&quot; class=&quot;comments_link&quot;&gt;&lt;img src=https://www.cotonti.com/&quot;skins/' . $usr&#091;'skin'&#093;
		. '/img/system/icon-comment.gif&quot; alt=&quot;&quot; /&gt;';
</pre></div>
<br />
I think this should be in a TPL, not hardcoded...<br />
Please remove it from the low level functions...<br />
<br />
thnx,<br />
Leo<br />
<br />
p.s. What a monster function is this one...<br />
<br />
If I only want to show a picture and a comment count, this sed_build_comments() is overkill.<br />
e.g. In the news plugin (we could use a lighter function for just getting a count.<br />
<br />
And the function below is Lightweight and also TPL friendly (<strong>this is just an idea</strong>)<br />
<br />
<div class="highlight"><pre class="php">function sed_get_comments_count($code)
{
	global $db_com, $cfg, $usr;
	list($usr&#091;'auth_read_com'&#093;, $usr&#091;'auth_write_com'&#093;, $usr&#091;'isadmin_com'&#093;) = sed_auth('comments', 'a');
	sed_block($usr&#091;'auth_read_com'&#093;);
	if ($cfg&#091;'disable_comments'&#093; || !$usr&#091;'auth_read_com'&#093;) return (&quot;&quot;);
	$ret=&quot;&quot;;
	if ($cfg&#091;'countcomments'&#093;)
	{
		if (isset($totalitems)) $nbcomment = $totalitems;
		else $nbcomment = sed_sql_result(sed_sql_query(&quot;SELECT COUNT(*) FROM $db_com where com_code='$code'&quot;), 0, 0);
		$ret = (string)$nbcomment;
	}

	return($ret);
}</pre></div><br /><br /><b>Added 1 hour 4 minutes later:</b><br /><br />I have made this for the NEWS plugin on a test site, and it works like a charm.. also<br />
this is more MVC, because I can do everything in the TPL's.<br />
<br />
And I think the speed is better (must test this somewhat further)<br />
<br />
Hope you all think about implementing this.... <img class="aux smiley" src="https://www.cotonti.com/./images/smilies/smile.gif" alt=":)" />]]></description>
			<pubDate>Vr, 12 Feb 2010 16:54:02 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/nl/forums?m=posts&q=5288&d=0#post22854]]></link>
		</item>
	</channel>
</rss>