Mod BilgileriMod İsmi: Tagging System For Topics - SMF Tag (Etiket ) Sistemi
Yapımcı: vbgamer45
Uyumluluk: 1.1.x
Görünüm:

----------

Ben SMFTags.rar dosyasında hangi dosyayı nereye atacağınızı klasör olarak belirttim.açınca görürsünüz zaten.
tagsql.php dosyasını forum dizinine atıp tarayıcınızın adres satırına
http://www.siteadi.com/tagsql.php veya forumunuz bir alt klasördeyse
http://www.siteadi.com/forum klasörünün adı/tagsql.php
yazıp entera tıklayın.sonra bu dosyayı silin...
Dil dosyalarınız xxx.turkish.php şeklinde ise Tags.turkish.php dosyasını,
xxx.turkish-utf8.php ise Tags.turkish-utf8.php dosyasını,languages klasörüne atın.
* Tags.php dosyası $sourcedir hedefine kopyalanacaktır
* Tags.template.php $themedir hedefine kopyalanacaktır
* Tags.turkish.php $themedir/languages hedefine kopyalanacaktır
* Tags.turkish-utf8.php dosyası $themedir/languages hedefine kopyalanacaktır.
$languagedir/Modifications.turkish.php dosyasında
Bul:?>Öncesine 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 $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 . '"> </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 . '"> </td>' : '';Sonrasına ekle:
// the [tags] button
echo ($current_action == 'tags' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </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 . '"> </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> ';
if(!$context['user']['is_guest'])
echo '<a href="' . $scripturl . '?action=tags;sa=deletetag;id=' . $tag['ID'] . '"><font color="#FF0000">[X]</font></a> ';
}
if(!$context['user']['is_guest'])
echo '
<a href="' . $scripturl . '?action=tags;sa=addtag;topic=',$context['current_topic'], '">' . $txt['smftags_addtag'] . '</a>
</td>
</tr>
</table>';
//End Tagging SystemHızlı cevabın altında görünsün diyorsanı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> ';
if(!$context['user']['is_guest'])
echo '<a href="' . $scripturl . '?action=tags;sa=deletetag;id=' . $tag['ID'] . '"><font color="#FF0000">[X]</font></a> ';
}
if(!$context['user']['is_guest'])
echo '
<a href="' . $scripturl . '?action=tags;sa=addtag;topic=',$context['current_topic'], '">' . $txt['smftags_addtag'] . '</a>
</td>
</tr>
</table>';
//End Tagging SystemAşağıdaki Kodu Bul :
}
?>Ü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> ';
if(!$context['user']['is_guest'])
echo '<a href="' . $scripturl . '?action=tags;sa=deletetag;id=' . $tag['ID'] . '"><font color="#FF0000">[X]</font></a> ';
}
if(!$context['user']['is_guest'])
echo '
<a href="' . $scripturl . '?action=tags;sa=addtag;topic=',$context['current_topic'], '">' . $txt['smftags_addtag'] . '</a>
</td>
</tr>
</table>
</div><br>';
//End Tagging SystemAşağıdaki Kodu Bul :
</table>';
}
if ($context['show_spellchecking'])
echo 'Değiştir:
</table><br>';
}
if ($context['show_spellchecking'])
echo '