<?xml version="1.0" encoding="ISO-8859-1"?>

<product productid="automatic_tagging" active="1">
	<title>Automatic Tagging</title>
	<description>اضافة كلمات دليليه من عنوان الموضوع تلقائياً. تطوير آلزعيم آلروحي</description>
	<version>2.0</version>
	<url>http://www.7lanet.com/vb/u1.html</url>
	<versioncheckurl />
	<apm_releasedate>0</apm_releasedate>
	<apm_author />
	<apm_relatedurl />
	<apm_extrainfo />
	<apm_extraedit />
	<dependencies>
	</dependencies>
	<codes>
	</codes>
	<templates>
	</templates>
	<plugins>
		<plugin active="1" executionorder="5">
			<title>Automatic Tagging</title>
			<hookname>newpost_process</hookname>
			<phpcode><![CDATA[if ($type == 'thread' && !$post['taglist']) {
  $temptags = split('[, "]',$post['title']);
  $newtags = array();
  require(DIR . '/includes/searchwords.php');
  foreach ($temptags as $tagtext) {		
  $patterns = '/(\d+)\\/(\d+)\\/(\d+)/';
  $replace = '$1-$2-$3';
  $tagtext = preg_replace($patterns, $replace, $tagtext);
    if(strlen($tagtext) > $vbulletin->options['tagminlen'] && !in_array(strtolower($tagtext), $badwords))
      array_push($newtags,$tagtext);
  }
  $post['taglist'] = join(',',$newtags);
}]]></phpcode>
		</plugin>
		<plugin active="1" executionorder="5">
			<title>Automatic Tagging</title>
			<hookname>newpost_process</hookname>
			<phpcode><![CDATA[
if ($type == 'thread' && !$post['taglist']) {
  $temptags = split(' ',$post['title']);
  $newtags = array();
  require(DIR . '/includes/searchwords.php');
  foreach ($temptags as $tagtext) {
    if(strlen($tagtext) > $vbulletin->options['tagminlen'] && !in_array(strtolower($tagtext), $badwords))
      array_push($newtags,$tagtext);
  }
  $post['taglist'] = join(',',$newtags);
}]]></phpcode>
		</plugin>
		<plugin active="1" executionorder="5">
			<title>Stopword Finder</title>
			<hookname>search_stopwords</hookname>
			<phpcode><![CDATA[// these words will be included in the Search Index
if ($vbulletin->options['tagbadwords'])
{
	$badwords = preg_split('#[ \r\n\t]+#s', strtolower($vbulletin->options['tagbadwords']), -1, PREG_SPLIT_NO_EMPTY);
}
else
{
	$badwords = array();
}]]></phpcode>
		</plugin>
	</plugins>
	<phrases>
	</phrases>
	<options>
	</options>
	<helptopics>
	</helptopics>
	<cronentries>
	</cronentries>
	<faqentries>
	</faqentries>
</product>
