<?xml version="1.0" encoding="ISO-8859-1"?>

<product productid="last10" active="1">
	<title>عرض اخر عشر مواضيع</title>
	<description>last10 </description>
	<version>v.4</version>
	<url />
	<versioncheckurl />
	<dependencies>
	</dependencies>
	<codes>
	</codes>
	<templates>
		<template name="last10_thread" templatetype="template" date="1123667588" username="Drk7le" version="v.4"><![CDATA[
<a href="showthread.php?$session[sessionurl]goto=newpost&t=$last_thread[threadid]">
<strong style="font-weight: 400">$last_thread[title]</strong></a>&nbsp;(اخر 
مشاركة : $last_thread[lastposter] - عددالردود : $last_thread[replycount] - عددالزوار : $last_thread[views] ) </a> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; » &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;]]></template>
	</templates>
	<plugins>
		<plugin active="1" executionorder="5">
			<title>last10_threads_by_cresttal</title>
			<hookname>global_start</hookname>
			<phpcode><![CDATA[$displayrecords = "10"; // عدد المشاركات 
$excludedforums = "38,39,40,40,41"; // الاقسام المخفية ..افصل بين كل رقم قسم بفاصلة
$threadchars = "70"; // عدد حروف عنوان المشاركة


// filter out deletion notices if can't be seen
$forumperms = fetch_permissions($forumid);

$last_threads = $db->query_read("
SELECT thread.threadid, thread.title, thread.lastpost, thread.forumid, thread.replycount, thread.lastposter, thread.dateline, IF(views<=replycount, replycount+1, views) AS views, thread.visible, user.username, user.userid 
$delquery
		FROM " . TABLE_PREFIX . "thread AS thread
		LEFT JOIN  " . TABLE_PREFIX . "user AS user ON (user.username = thread.lastposter)
$deljoin
WHERE thread.forumid NOT IN ($excludedforums)
$delthreadlimit
ORDER BY thread.lastpost DESC LIMIT 0, $displayrecords");

while ($last_thread = $db->fetch_array($last_threads))
{
	$last_thread[title] = unhtmlspecialchars($last_thread[title]);
	if (strlen($last_thread[title]) > $threadchars)
	{		
		$last_thread[titletrimmed] = substr($last_thread[title], 0, strrpos(substr($last_thread[title], 0, $threadchars), ' ')) . '...';
	}
	eval('$last10_threads .= "' . fetch_template('last10_thread') . '";');
}]]></phpcode>
		</plugin>
	</plugins>
	<phrases>
	</phrases>
	<options>
	</options>
	<helptopics>
	</helptopics>
	<cronentries>
	</cronentries>
	<faqentries>
	</faqentries>
</product>
