<?xml version='1.0' encoding='UTF-8'?>
<rss version='2.0'>
	<channel>
		<title>cotonti.com : latesttopics category id problem</title>
		<link>https://www.cotonti.com</link>
		<description>Останні повідомлення в темі</description>
		<generator>Cotonti</generator>
		<language>en</language>
		<pubDate>Fri, 01 May 2026 20:42:21 -0000</pubDate>

		<item>
			<title>Gökhan YILDIZ</title>
			<description><![CDATA[The last issue appearing in the category of plug-latesttopics id tried to adjust but does not happen. How can I do?<br />
<br />
<pre class="code">&lt;?PHP
/* ====================
&#091;BEGIN_SED_EXTPLUGIN&#093;
Code=recentitems
Part=main
File=recentitems.id
Hooks=index.tags
Tags=index.tpl:{PLUGIN_LATESTPAGESID},{PLUGIN_LATESTTOPICSID}
Order=10
&#091;END_SED_EXTPLUGIN&#093;
==================== */

/**
 * Recent pages and topics in forums
 *
 * @package Cotonti
 * @version 0.0.3
 * @author Neocrome, Cotonti Team
 * @copyright Copyright (c) Cotonti Team 2008-2009
 * @license BSD
 */

defined('SED_CODE') or die('Wrong URL');

/* ============ MASKS FOR THE HTML OUTPUTS =========== */

$recentitems = new XTemplate(sed_skinfile('recentitems', true));

$plu_empty = $L&#091;'None'&#093;.&quot;&lt;br /&gt;&quot;;
if(empty($cfg&#091;'plugin'&#093;&#091;'recentitems'&#093;&#091;'redundancy'&#093;))
{
	$cfg&#091;'plugin'&#093;&#091;'recentitems'&#093;&#091;'redundancy'&#093; = 2;
}

/* ================== FUNCTIONS ================== */

if($cfg&#091;'plugin'&#093;&#091;'recentitems'&#093;&#091;'maxpages'&#093; &gt; 0 &amp;&amp; !$cfg&#091;'disable_page'&#093;)
{
	$limit = $cfg&#091;'plugin'&#093;&#091;'recentitems'&#093;&#091;'maxpages'&#093;;
	$l = $limit * $cfg&#091;'plugin'&#093;&#091;'recentitems'&#093;&#091;'redundancy'&#093;;

	$sql = sed_sql_query(&quot;SELECT page_id, page_alias, page_cat, page_title, page_date FROM $db_pages WHERE page_state=0 AND page_cat NOT LIKE 'system' ORDER by page_date DESC LIMIT $l&quot;);

	$i = 0;
	while($i &lt; $limit &amp;&amp; $row = sed_sql_fetcharray($sql))
	{
		if(sed_auth('page', $row&#091;'page_cat'&#093;, 'R'))
		{
			$row&#091;'page_pageurl'&#093; = (empty($row&#091;'page_alias'&#093;)) ? sed_url('page', 'id='.$row&#091;'page_id'&#093;) : sed_url('page', 'al='.$row&#091;'page_alias'&#093;);

			$recentitems -&gt; assign(array(
					&quot;RI_DATE&quot; =&gt; date($cfg&#091;'formatyearmonthday'&#093;, $row&#091;'page_date'&#093; + $usr&#091;'timezone'&#093; * 3600),
					&quot;RI_CAT&quot; =&gt; &quot;&lt;a href=https://www.cotonti.com/\&quot;&quot;.sed_url('list', 'c='.$row&#091;'page_cat'&#093;).&quot;\&quot;&gt;&quot;.$sed_cat&#091;$row&#091;'page_cat'&#093;&#093;&#091;'title'&#093;.&quot;&lt;/a&gt;&quot;,
					&quot;RI_NAME&quot; =&gt; &quot;&lt;a href=https://www.cotonti.com/\&quot;&quot;.$row&#091;'page_pageurl'&#093;.&quot;\&quot; title=\&quot;&quot;.htmlspecialchars(stripslashes($row&#091;'page_title'&#093;)).&quot;\&quot;&gt;&quot;.htmlspecialchars(sed_cutstring(stripslashes($row&#091;'page_title'&#093;), 36)).&quot;&lt;/a&gt;&quot;,
			));
			$recentitems -&gt; parse(&quot;RECENTPAGES.RECENTPAGE&quot;);
			$i++;
		}
	}

	$recentitems -&gt; parse(&quot;RECENTPAGES&quot;);
	$res = $recentitems -&gt; text(&quot;RECENTPAGES&quot;);

	$res = (empty($res)) ? $plu_empty : $res;

	$latestpages = $res;
}

/* ------------------ */

if($cfg&#091;'plugin'&#093;&#091;'recentitems'&#093;&#091;'maxtopics'&#093; &gt; 0 &amp;&amp; !$cfg&#091;'disable_forums'&#093;)
{
	$limit = $cfg&#091;'plugin'&#093;&#091;'recentitems'&#093;&#091;'maxtopics'&#093;;
	$l = $limit * $cfg&#091;'plugin'&#093;&#091;'recentitems'&#093;&#091;'redundancy'&#093;;

	if($cfg&#091;'plugin'&#093;&#091;'recentitems'&#093;&#091;'fd'&#093; == 'Standard')
	{
		$sql = sed_sql_query(&quot;SELECT t.ft_id, t.ft_sectionid, t.ft_title, t.ft_updated, t.ft_postcount, s.fs_id, s.fs_title, s.fs_category
		FROM $db_forum_topics t,$db_forum_sections s
		WHERE t.ft_sectionid='54'
		AND t.ft_movedto=0 AND t.ft_mode=0
		ORDER by t.ft_updated DESC LIMIT $l&quot;);
	}
	/*===Every category the topic attended to. Very detailed, but it looks huge===*/
	elseif($cfg&#091;'plugin'&#093;&#091;'recentitems'&#093;&#091;'fd'&#093; == 'Subforums with Master Forums')
	{
		$sql = sed_sql_query(&quot;SELECT t.ft_id, t.ft_sectionid, t.ft_title, t.ft_updated, t.ft_postcount, s.fs_id, s.fs_masterid, s.fs_mastername, s.fs_title, s.fs_category
		FROM $db_forum_topics t,$db_forum_sections s
		WHERE t.ft_sectionid='54'
		AND t.ft_movedto=0 AND t.ft_mode=0
		ORDER by t.ft_updated DESC LIMIT $l&quot;);
	}
	/*===Only the category which topic has been posted===*/
	elseif($cfg&#091;'plugin'&#093;&#091;'recentitems'&#093;&#091;'fd'&#093; == 'Parent only')
	{
		$sql = sed_sql_query(&quot;SELECT t.ft_id, t.ft_sectionid, t.ft_title, t.ft_updated, t.ft_postcount, s.fs_id, s.fs_title
		FROM $db_forum_topics t,$db_forum_sections s
		WHERE t.ft_sectionid='54'
		AND t.ft_movedto=0 AND t.ft_mode=0
		ORDER by t.ft_updated DESC LIMIT $l&quot;);
	}
	/*===Modern style, only topic, date and postcount===*/
	else
	{
		$sql = sed_sql_query(&quot;SELECT t.ft_id, t.ft_title, t.ft_updated, t.ft_postcount, s.fs_id
		FROM $db_forum_topics t,$db_forum_sections s
		WHERE t.ft_sectionid='54'
		AND t.ft_movedto=0 AND t.ft_mode=0
		ORDER by t.ft_updated DESC LIMIT $l&quot;);
	}

	$i = 0;
	while($i &lt; $limit &amp;&amp; $row = sed_sql_fetcharray($sql))
	{
		if(sed_auth('forums', $row&#091;'fs_id'&#093;, 'R'))
		{
			$img = ($usr&#091;'id'&#093;&gt;0 &amp;&amp; $row&#091;'ft_updated'&#093;&gt;$usr&#091;'lastvisit'&#093;) ? &quot;&lt;a href=https://www.cotonti.com/\&quot;&quot;.sed_url('forums', 'm=posts&amp;q='.$row&#091;'ft_id'&#093;.'&amp;n=unread', '#unread').&quot;\&quot;&gt;&lt;img src=https://www.cotonti.com/\&quot;skins/$skin/img/system/arrow-unread.gif\&quot; alt=\&quot;\&quot; /&gt;&lt;/a&gt;&quot; : &quot;&lt;a href=https://www.cotonti.com/\&quot;&quot;.sed_url('forums', 'm=posts&amp;q='.$row&#091;'ft_id'&#093;.'&amp;n=last', '#bottom').&quot;\&quot;&gt;&lt;img src=https://www.cotonti.com/\&quot;skins/$skin/img/system/arrow-follow.gif\&quot; alt=\&quot;\&quot; /&gt;&lt;/a&gt; &quot;;

			if($cfg&#091;'plugin'&#093;&#091;'recentitems'&#093;&#091;'fd'&#093; == 'Standard')
			{
				$build_forum=sed_build_forums($row&#091;'fs_id'&#093;, sed_cutstring($row&#091;'fs_title'&#093;,24), sed_cutstring($row&#091;'fs_category'&#093;,16));
			}
			elseif($cfg&#091;'plugin'&#093;&#091;'recentitems'&#093;&#091;'fd'&#093; == 'Subforums with Master Forums')
			{
				$build_forum=sed_build_forums($row&#091;'fs_id'&#093;, sed_cutstring($row&#091;'fs_title'&#093;,24), sed_cutstring($row&#091;'fs_category'&#093;,16), true, array($row&#091;'fs_masterid'&#093;,$row&#091;'fs_mastername'&#093;));
			}
			elseif($cfg&#091;'plugin'&#093;&#091;'recentitems'&#093;&#091;'fd'&#093; == 'Parent only')
			{
				$build_forum=&quot;&lt;a href=https://www.cotonti.com/\&quot;&quot;.sed_url('forums', 'm=topics&amp;s='.$row&#091;'fs_id'&#093;).'&quot;&gt;'.htmlspecialchars(sed_cutstring(stripslashes($row&#091;'fs_title'&#093;),16)).&quot;&lt;/a&gt;&quot;;
			}
			else
			{
				$build_forum=&quot;&quot;;
			}

			$recentitems -&gt; assign(array(
				&quot;RI_DATE&quot; =&gt; date($cfg&#091;'formatmonthdayhourmin'&#093;, $row&#091;'ft_updated'&#093; + $usr&#091;'timezone'&#093; * 3600),
				&quot;RI_IMG&quot; =&gt; $img,
				&quot;RI_CAT&quot; =&gt; $build_forum,
				&quot;RI_NAME&quot; =&gt; &quot;&lt;a href=https://www.cotonti.com/\&quot;&quot;.sed_url('forums', 'm=posts&amp;q='.$row&#091;'ft_id'&#093;.'&amp;n=last', '#bottom').'&quot; title=&quot;'.htmlspecialchars(stripslashes($row&#091;'ft_title'&#093;)).'&quot;&gt;'.htmlspecialchars(sed_cutstring(stripslashes($row&#091;'ft_title'&#093;),25)).&quot;&lt;/a&gt;&quot;,
				&quot;RI_COUNT&quot; =&gt; $row&#091;'ft_postcount'&#093;-1,
			));
			$recentitems -&gt; parse(&quot;RECENTFORUMS.RECENTFORUM&quot;);

			$i++;
		}
	}
	$recentitems -&gt; parse(&quot;RECENTFORUMS&quot;);
	$res = $recentitems -&gt; text(&quot;RECENTFORUMS&quot;);

	$res = (empty($res)) ? $plu_empty : $res;

	$latesttopics = $res;
}

/* ------------------ */

$t-&gt; assign(array(
	&quot;PLUGIN_LATESTPAGESID&quot; =&gt; $latestpages,
	&quot;PLUGIN_LATESTTOPICSID&quot; =&gt; $latesttopics,
));

?&gt;</pre>]]></description>
			<pubDate>Thu, 11 Лют 2010 06:22:03 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/ua/forums?m=posts&q=5285&d=0#post22831]]></link>
		</item>
	</channel>
</rss>