+replerinizi esirgemeyin

*******************************
Tagging System
By: vbgamer45
SMFHacks.com
*******************************
Mod Information:
For SMF 1.1.2
A tagging system for SMF.
Features:
Tag Cloud
Tagging of Topics
Thread owner can add and remove tags to the topic.
Tag Admins can tag topics and remove tags.
Clicking a tag returns a list of tagged topics that have that tag.
Mod Linki : ekte mevcut
Türkçe Dil Dosyası : ekte mevcut(Tags.turkish.zip)]
SMF Mod sitesinde yayınlanmamış bir m0d
Not :Modun Hem Türkçesi Hemde Hızlı Cevap Altında Tablo Halinde Görüneni Ekte Paket Şeklinde Verilmiştir...
Modun Manuel Kurulumu :
$languagedir/Modifications.english.php dosyasında
Bul:
?>
Öncesine ekle:
//Begin Tagging System Text Strings
$txt['smftags_menu'] = 'Tags';
$txt['smftags_admin'] = 'Tags Configuration';
$txt['smftags_addtag'] = '[Add Tag]';
$txt['smftags_seperate'] = 'Seperate each tag by a comma';
$txt['smftags_topic'] = 'Tags: ';
$txt['permissiongroup_smftags'] = 'SMF Tags';
$txt['permissionname_smftags_suggest'] = 'Suggest Tags';
$txt['permissionhelp_smftags_suggest'] = 'Users can suggest tags to add';
$txt['cannot_smftags_suggest'] = 'You are not allowed to suggest tags.';
$txt['permissionname_smftags_manage'] = 'Manage Tags';
$txt['permissionhelp_smftags_manage'] = 'Users can modify the tag settings and add and remove tags';
$txt['cannot_smftags_manage'] = 'You are not allowed to manage tags.';
//END  Tagging System Strings
$boarddir/index.php dosyasında
Bul:
'sticky' => array('LockTopic.php', 'Sticky'),
Sonrasına ekle:
		'tags' => array('Tags.php', 'TagsMain'),
$themedir/index.template.php dosyasında
Bul:
$current_action = 'admin';
	if (in_array($context['current_action'], array(
Sonrasına ekle:
'tags',
Bul:
// the [member] list button
	if ($context['allow_memberlist'])
		echo ($current_action == 'mlist' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
				<td valign="top" class="maintab_' , $current_action == 'mlist' ? 'active_back' : 'back' , '">
					<a href="', $scripturl, '?action=mlist">' , $txt[331] , '</a>
				</td>' , $current_action == 'mlist' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';
Sonrasına ekle:
		// the [tags] button
		echo ($current_action == 'tags' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
				<td valign="top" class="maintab_' , $current_action == 'tags' ? 'active_back' : 'back' , '">
					<a href="', $scripturl, '?action=tags">' , $txt['smftags_menu']  , '</a>
				</td>' , $current_action == 'tags' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';
$themedir/Post.template.php dosyasında
Bul:
<input type="text" name="subject"', $context['subject'] == '' ? '' : ' value="' . $context['subject'] . '"', ' tabindex="', $context['tabindex']++, '" size="80" maxlength="80" />
								</td>
							</tr>
Sonrasına ekle:
		';
		//Tagging system Mod
		if(!isset($context['num_replies']))
		{
		echo '
		<tr>
										<td align="right">
											<b>', $txt['smftags_topic'], '</b></td>
										<td>
											<input type="text" name="tags"', ' tabindex="', $context['tabindex']++, '" size="80" maxlength="80" />
											<br /><span class="smalltext">', $txt['smftags_seperate'], '</span>
										</td>
							</tr>';
		}
		//End Tagging system mod
		echo '
$sourcedir/ManagePermissions.php dosyasında
Bul:
'pm' => array(
				'pm_read' => false,
				'pm_send' => false,
			),
Sonrasına ekle:
'smftags' => array(
				'smftags_manage' => false,
			),
$sourcedir/Subs.php dosyasında
Bul:
'edit_settings' => '<a href="' . $scripturl . '?action=serversettings;sesc=' . $sc . '">' . $txt[222] . '</a>',
Sonrasına ekle:
	'tags_settings' => '<a href="' . $scripturl . '?action=tags;sa=admin;sesc=' . $sc . '">' . $txt['smftags_admin'] . '</a>',
$sourcedir/Post.php dosyasında
Bul:
createPost($msgOptions, $topicOptions, $posterOptions);
		if (isset($topicOptions['id']))
			$topic = $topicOptions['id'];
	}
Sonrasına ekle:
//Tagging System
	if(isset($_REQUEST['tags']) && !isset($_REQUEST['num_replies']))
	{
		//Get how many tags there have been for the topic
		$dbresult = db_query("SELECT COUNT(*) as total FROM {$db_prefix}tags_log WHERE ID_TOPIC = " . $topic, __FILE__, __LINE__);
		$row = mysql_fetch_assoc($dbresult);
		$totaltags = $row['total'];
		mysql_free_result($dbresult);
		//Check Tag restrictions
		$tags = explode(',',htmlspecialchars($_REQUEST['tags'],ENT_QUOTES));
		if($totaltags < $modSettings['smftags_set_maxtags'])
		{
			$tagcount = 0;
			foreach($tags as $tag)
			{
				if($tagcount >= $modSettings['smftags_set_maxtags'])
					continue;
				if(empty($tag))
					continue;
				//Check min tag length	
				if(strlen($tag) < $modSettings['smftags_set_mintaglength'])
					continue;
				//Check max tag length
				if(strlen($tag) > $modSettings['smftags_set_maxtaglength'])
					continue;
				//Insert The tag
				$dbresult = db_query("SELECT ID_TAG FROM {$db_prefix}tags WHERE tag = '$tag'", __FILE__, __LINE__);
				if(db_affected_rows() == 0)
				{
					//Insert into Tags table
					db_query("INSERT INTO {$db_prefix}tags
						(tag, approved)
					VALUES ('$tag',1)", __FILE__, __LINE__);	
					$ID_TAG = db_insert_id();
					//Insert into Tags log
					db_query("INSERT INTO {$db_prefix}tags_log
						(ID_TAG,ID_TOPIC, ID_MEMBER)
					VALUES ($ID_TAG,$topic,$ID_MEMBER)", __FILE__, __LINE__);
					$tagcount++;
				}
				else 
				{
					$row = mysql_fetch_assoc($dbresult);
					$ID_TAG = $row['ID_TAG'];
					$dbresult2= db_query("SELECT ID FROM {$db_prefix}tags_log WHERE ID_TAG  =  $ID_TAG  AND ID_TOPIC = $topic", __FILE__, __LINE__);
					if(db_affected_rows() != 0)
					{
						continue;
					}
					mysql_free_result($dbresult2);
					//Insert into Tags log
					db_query("INSERT INTO {$db_prefix}tags_log
						(ID_TAG,ID_TOPIC, ID_MEMBER)
					VALUES ($ID_TAG,$topic,$ID_MEMBER)", __FILE__, __LINE__);
					$tagcount++;
				}
				mysql_free_result($dbresult);
			}
		}
	}
	//End Tagging System
$sourcedir/Display.php dosyasında
Bul:
if (empty($_SESSION['last_read_topic']) || $_SESSION['last_read_topic'] != $topic)
	{
		db_query("
			UPDATE {$db_prefix}topics
			SET numViews = numViews + 1
			WHERE ID_TOPIC = $topic
			LIMIT 1", __FILE__, __LINE__);
		$_SESSION['last_read_topic'] = $topic;
	}
Sonrasına ekle:
	//Tagging System
	$dbresult= db_query("SELECT t.tag,l.ID,t.ID_TAG FROM {$db_prefix}tags_log as l, {$db_prefix}tags as t WHERE t.ID_TAG = l.ID_TAG && l.ID_TOPIC = $topic", __FILE__, __LINE__);
		$context['topic_tags'] = array();
		 while($row = mysql_fetch_assoc($dbresult))
			{
				$context['topic_tags'][] = array(
				'ID' => $row['ID'],
				'ID_TAG' => $row['ID_TAG'],
				'tag' => $row['tag'],
				);
		}
	mysql_free_result($dbresult);
	//End Tagging System
$themedir/Display.template.php dosyasında
Bul:
<a name="lastPost"></a>';
Sonrasına ekle:
		//Tagging System
		echo '<table width="100%" cellpadding="0" cellspacing="0" border="0">
			<tr>
			<td class="windowbg">
			<b>', $txt['smftags_topic'], '</b>';
			foreach ($context['topic_tags'] as $i => $tag)
			{
				echo '<a href="' . $scripturl . '?action=tags;id=' . $tag['ID_TAG']  . '">' . $tag['tag'] . '</a>&nbsp;';
				if(!$context['user']['is_guest'])
				echo '<a href="' . $scripturl . '?action=tags;sa=deletetag;id=' . $tag['ID']  . '"><font color="#FF0000">[X]</font></a>&nbsp;';
			}
			if(!$context['user']['is_guest'])
			echo '
			&nbsp;<a href="' . $scripturl . '?action=tags;sa=addtag;topic=',$context['current_topic'], '">' . $txt['smftags_addtag'] . '</a>
			</td>
		</tr>
		</table>';
		//End Tagging System
Tamamen Türkçe Olması İçin Aşağıdaki İşlemi Yapınız...
Modifications.turkish.php de Aşağıdaki Kodu Bul :
?>
Üstüne Ekle :
//Begin Tagging System Text Strings
$txt['smftags_menu'] = 'Etiket';
$txt['smftags_admin'] = 'Etiket Ayarlari';
$txt['smftags_addtag'] = '[Etiket Ekler]';
$txt['smftags_seperate'] = 'Herbir Etiketi Virgül ( , )Ile Ayiriniz.';
$txt['smftags_topic'] = 'Etiket: ';
$txt['permissiongroup_smftags'] = 'SMF Etiket';
$txt['permissionname_smftags_suggest'] = 'Etiketler Öner';
$txt['permissionhelp_smftags_suggest'] = 'Kullanicilar Eklemek Için Etiketleri Önerebilir';
$txt['cannot_smftags_suggest'] = 'Etiket Önermeye Yetkiniz Bulunmuyor.';
$txt['permissionname_smftags_manage'] = 'Etiketleri Yönet';
$txt['permissionhelp_smftags_manage'] = 'Kullanicilar Etiketleri Ayarlayabilir ve Ekleyip Kaldirabilir.';
$txt['cannot_smftags_manage'] = 'Etiket Yönetmeye Yetkiniz Bulunmuyor.';
//END  Tagging System Strings
Hızlı Cevabın Altında Tablo Şeklinde Görünmesi İçinde Paket Olarak Kurduktan Sonra Aşağıdaki İşlemi Yapınız...

Display.template.php yi Aç Bul ve Sil :
		//Tagging System
		echo '<table width="100%" cellpadding="0" cellspacing="0" border="0">
			<tr>
			<td class="windowbg">
			<b>', $txt['smftags_topic'], '</b>';
			foreach ($context['topic_tags'] as $i => $tag)
			{
				echo '<a href="' . $scripturl . '?action=tags;id=' . $tag['ID_TAG']  . '">' . $tag['tag'] . '</a>&nbsp;';
				if(!$context['user']['is_guest'])
				echo '<a href="' . $scripturl . '?action=tags;sa=deletetag;id=' . $tag['ID']  . '"><font color="#FF0000">[X]</font></a>&nbsp;';
			}
			if(!$context['user']['is_guest'])
			echo '
			&nbsp;<a href="' . $scripturl . '?action=tags;sa=addtag;topic=',$context['current_topic'], '">' . $txt['smftags_addtag'] . '</a>
			</td>
		</tr>
		</table>';
		//End Tagging System
Aşağıdaki Kodu Bul :
}
?>
Yada Aşağıdaki Kodun Altına Ekle :
				<input type="hidden" name="seqnum" value="', $context['form_sequence_number'], '" />
			</form>
		</td>
	</tr>
</table>';
Üstüne Ekle :
		//Tagging System
	echo'
	<div align="center">
<table border="0" cellpadding="7" class="tborder" bgcolor="#C0C0C0" width="100%">
<tr><td height="15px" class="catbg"><center>||| Etiketler |||</center></td></tr>
			<tr>
			<td class="windowbg">';
			foreach ($context['topic_tags'] as $i => $tag)
			{
				echo '<a href="' . $scripturl . '?action=tags;id=' . $tag['ID_TAG']  . '">' . $tag['tag'] . '</a>&nbsp;';
				if(!$context['user']['is_guest'])
				echo '<a href="' . $scripturl . '?action=tags;sa=deletetag;id=' . $tag['ID']  . '"><font color="#FF0000">[X]</font></a>&nbsp;';
			}
			if(!$context['user']['is_guest'])
			echo '
			&nbsp;<a href="' . $scripturl . '?action=tags;sa=addtag;topic=',$context['current_topic'], '">' . $txt['smftags_addtag'] . '</a>
			</td>
		</tr>
		    </table>
                                    </div><br>';
		//End Tagging System
Aşağıdaki Kodu Bul :
</table>';
	}
	if ($context['show_spellchecking'])
		echo '
Aşağıdaki Kod İle Değiştir :

</table><br>';
	}
	if ($context['show_spellchecking'])
		echo '
Son Olarakta Ekteki Dosyayı Temanızın Langue Klasörüne Atın...
maniacgenclik.com ve rengeyik.net e teşekkürler.