Smf benzer konular Related Topics

Başlatan tarantula901, 19 Haz 2014, 00:15

« önceki - sonraki »

0 Üyeler ve 8 Ziyaretçiler konuyu incelemekte.

tarantula901

Modifikasyon Adı   :Related Topics (Benzer konuler)
Yazar                    : niko
Güncel Sürüm       :1.4.1Uyumluluk:2.0, 2.0.2

Download             : http://custom.simplemachines.org/mods/index.php?mod=189

Açıklama              : Bu mod herhangi bir konuda konu ile ilgili konu varsa konunun altında konu başlıklarını gösteren bir moddur.


Manuel kurulumu:

./Sources/Admin.php
Bul
'current_theme' => array(
Öncesine Ekle

'relatedtopics' => array(
'label' => $txt['admin_related_topic'],
'file' => 'RelatedTopics.php',
'function' => 'RelatedTopicsAdmin',
'subsections' => array(
'main' => array($txt['admin_related_topics_information']),
'settings' => array($txt['admin_related_topics_settings']),
'methods' => array($txt['admin_related_topics_methods']),
),
),


Bul

             // Mod Authors for a "ADD AFTER" on this line. Ensure you end your change with a comma. For example:
Sonrasına Ekle
'related' => array($txt['admin_related_topic']),

./Sources/RemoveTopic.php
Bul

// Recycle topics that aren't in the recycle board...
Öncesine Ekle
// Added by Related Topics
require_once($sourcedir . '/Subs-Related.php');
relatedRemoveTopics($topics);
// Related Topics END

./Sources/Subs-Post.php
Bul:

$topicOptions['id'] = $smcFunc['db_insert_id']('{db_prefix}topics', 'id_topic');
Sonrasına Ekle

// Added by Related Topics
global $sourcedir;
require_once($sourcedir . '/Subs-Related.php');
relatedUpdateTopics($topicOptions['id']);
// Related Topics END

Bul:
if ($smcFunc['db_num_rows']($request) == 1)
updateStats('subject', $topicOptions['id'], $msgOptions['subject']);
Değiştir:


if ($smcFunc['db_num_rows']($request) == 1)
{
updateStats('subject', $topicOptions['id'], $msgOptions['subject']);

// Added by Related Topics
global $sourcedir;
require_once($sourcedir . '/Subs-Related.php');
relatedUpdateTopics($topicOptions['id']);
// Related Topics END
}

./Sources/Display.php
Bul
$topicinfo = $smcFunc['db_fetch_assoc']($request);
$smcFunc['db_free_result']($request);
Sonrasına Ekle

// Added by Related Topics
if (!empty($modSettings['relatedTopicsEnabled']))
{
require_once($sourcedir . '/Subs-Related.php');
loadRelated($topic);
}

./Themes/default/Display.template.php
Bul:
if ($context['show_spellchecking'])
echo '
<form action="', $scripturl, '?action=spellcheck" method="post" accept-charset="', $context['character_set'], '" name="spell_form" id="spell_form" target="spellWindow"><input type="hidden" name="spellstring" value="" /></form>
Öncesine Ekle:

// Added by Related Topics
if (!empty($context['related_topics'])) // TODO: Have ability to display no related topics?
{
echo '
<div class="cat_bar">
<h3 class="catbg">', $txt['related_topics'], '</h3>
</div>
<div class="tborder topic_table" id="messageindex">
<table class="table_grid" cellspacing="0">
<thead>
<tr class="catbg">';

// Are there actually any topics to show?
if (!empty($context['related_topics']))
{
echo '
<th scope="col" class="smalltext first_th" width="8%" colspan="2">&nbsp;</th>
<th scope="col" class="smalltext">', $txt['subject'], ' / ', $txt['started_by'], '</th>
<th scope="col" class="smalltext center" width="14%">', $txt['replies'], '</th>
<th scope="col" class="smalltext last_th" width="22%">', $txt['last_post'], '</th>';
}
// No topics.... just say, "sorry bub".
else
echo '
<th scope="col" class="smalltext first_th" width="8%">&nbsp;</th>
<th class="smalltext" colspan="3"><strong>', $txt['msg_alert_none'], '</strong></th>
<th scope="col" class="smalltext last_th" width="8%">&nbsp;</th>';

echo '
</tr>
</thead>
<tbody>';

foreach ($context['related_topics'] as $topic)
{
// Is this topic pending approval, or does it have any posts pending approval?
if ($topic['board']['can_approve_posts'] && $topic['unapproved_posts'])
$color_class = !$topic['approved'] ? 'approvetbg' : 'approvebg';
// We start with locked and sticky topics.
elseif ($topic['is_sticky'] && $topic['is_locked'])
$color_class = 'stickybg locked_sticky';
// Sticky topics should get a different color, too.
elseif ($topic['is_sticky'])
$color_class = 'stickybg';
// Locked topics get special treatment as well.
elseif ($topic['is_locked'])
$color_class = 'lockedbg';
// Last, but not least: regular topics.
else
$color_class = 'windowbg';

// Some columns require a different shade of the color class.
$alternate_class = $color_class . '2';

echo '
<tr>
<td class="icon1 ', $color_class, '">
<img src="', $settings['images_url'], '/topic/', $topic['class'], '.gif" alt="" />
</td>
<td class="icon2 ', $color_class, '">
<img src="', $topic['first_post']['icon_url'], '" alt="" />
</td>
<td class="subject ', $alternate_class, '">
<div ', (!empty($topic['quick_mod']['modify']) ? 'id="topic_' . $topic['first_post']['id'] . '" onmouseout="mouse_on_div = 0;" onmouseover="mouse_on_div = 1;" ondblclick="modify_topic(\'' . $topic['id'] . '\', \'' . $topic['first_post']['id'] . '\', \'' . $context['session_id'] . '\', \'' . $context['session_var'] . '\');"' : ''), '>
', $topic['is_sticky'] ? '<strong>' : '', '<span id="msg_' . $topic['first_post']['id'] . '">', $topic['first_post']['link'], (!$topic['board']['can_approve_posts'] && !$topic['approved'] ? '&nbsp;<em>(' . $txt['awaiting_approval'] . ')</em>' : ''), '</span>', $topic['is_sticky'] ? '</strong>' : '' ;

// Is this topic new? (assuming they are logged in!)
if ($topic['new'] && $context['user']['is_logged'])
echo '
<a href="', $topic['new_href'], '" id="newicon' . $topic['first_post']['id'] . '"><img src="', $settings['lang_images_url'], '/new.gif" alt="', $txt['new'], '" /></a>';

echo '
<p>', $txt['started_by'], ' ', $topic['first_post']['member']['link'], '
<small id="pages' . $topic['first_post']['id'] . '">', $topic['pages'], '</small>
<small>', $topic['board']['link'], '</small>
</p>
</div>
</td>
<td class="stats ', $color_class, '">
', $topic['replies'], ' ', $txt['replies'], '
<br />
', $topic['views'], ' ', $txt['views'], '
</td>
<td class="lastpost ', $alternate_class, '">
<a href="', $topic['last_post']['href'], '"><img src="', $settings['images_url'], '/icons/last_post.gif" alt="', $txt['last_post'], '" title="', $txt['last_post'], '" /></a>
', $topic['last_post']['time'], '<br />
', $txt['by'], ' ', $topic['last_post']['member']['link'], '
</td>
</tr>';
}

echo '
</table>
</div><br />';
}

./index.php
Bul

'register2' => array('Register.php', 'Register2'),
Sonrasına Ekle: [Seç]

'related' => array('Subs-Related.php', 'Related'),

./Themes/default/languages/Modifications.english.php
Bul (Dosyanın en sonunda)

?>
Öncesine Ekle: [Seç]

// Added by Related Topics
$txt['admin_related_topic'] = 'Related Topics';
$txt['admin_related_topics_information'] = 'Information';
$txt['admin_related_topics_settings'] = 'Settings';
$txt['admin_related_topics_methods'] = 'Methods';

$txt['related_topics_admin_title'] = 'Related Topics';
$txt['related_topics_admin_desc'] = '';

$txt['related_latest_news'] = 'Latest News';
$txt['related_news_unable_to_connect'] = 'Unable to connect to <a href="http://www.smfarcade.info">SMFArcade.info</a> for latest news...';
$txt['related_version_info'] = 'Version Information';
$txt['related_installed_version'] = 'Installed Version';
$txt['related_latest_version'] = 'Latest Version';

$txt['related_topics_ignored_boards'] = 'Ignored Boards';

$txt['related_topics_methods_title'] = 'Methods';
$txt['related_topics_methods'] = 'Select methods used for determining Related Topics<div class="smalltext">Rebuild of index is required after changing these settings</div>';

$txt['related_topics_index'] = 'Index';
$txt['related_topics_rebuild'] = 'Rebuild Indexes';
$txt['related_topics_rebuild_desc'] = 'Use this after changing settings or to build initial cache';

$txt['relatedFulltext'] = 'Fulltext';

$txt['related_topics_settings_title'] = 'Related Topics';
$txt['relatedTopicsEnabled'] = 'Enable Related Topics';
$txt['relatedTopicsCount'] = 'How many related topics to show';

$txt['no_methods_selected'] = 'You haven\'t selected which methods to use to determine related topics';

$txt['related_topics'] = 'Related Topics';
// END Added by Related Topics

./Themes/default/languages/Modifications.english-utf8.php
Bul (Dosyanın en sonunda):

?>
Öncesine Ekle: [Seç]

// Added by Related Topics
$txt['admin_related_topic'] = 'Related Topics';
$txt['admin_related_topics_information'] = 'Information';
$txt['admin_related_topics_settings'] = 'Settings';
$txt['admin_related_topics_methods'] = 'Methods';

$txt['related_topics_admin_title'] = 'Related Topics';
$txt['related_topics_admin_desc'] = '';

$txt['related_latest_news'] = 'Latest News';
$txt['related_news_unable_to_connect'] = 'Unable to connect to <a href="http://www.smfarcade.info">SMFArcade.info</a> for latest news...';
$txt['related_version_info'] = 'Version Information';
$txt['related_installed_version'] = 'Installed Version';
$txt['related_latest_version'] = 'Latest Version';

$txt['related_topics_settings_title'] = 'Related Topics';

$txt['related_topics_methods_title'] = 'Methods';
$txt['related_topics_methods'] = 'Select methods used for determining Related Topics<div class="smalltext">Rebuild of index is required after changing these settings</div>';

$txt['related_topics_index'] = 'Index';
$txt['related_topics_rebuild'] = 'Rebuild Indexes';
$txt['related_topics_rebuild_desc'] = 'Use this after changing settings or to build initial cache';

$txt['relatedFulltext'] = 'Fulltext';

$txt['relatedTopicsEnabled'] = 'Enable Related Topics';
$txt['relatedTopicsCount'] = 'How many related topics to show';
$txt['relatedIgnoredboards'] = 'Ignored Boards<div class="smalltext">board ids separated with commas</div>';

$txt['no_methods_selected'] = 'You haven\'t selected which methods to use to determine related topics';

$txt['related_topics'] = 'Related Topics';
// END Added by Related Topics


Kod

SMF-2.0/related_topics.php
Bu dosyayı sunucunuza yükleyerek de çalıştırabilirsiniz.
Dosya Değişiklikleri
Pakette bulunan "SMF-2.0/Sources/RelatedTopics.php" dosyasını "./Sources" dizinine kopyalayın.
Pakette bulunan "SMF-2.0/Sources/Subs-Related.php" dosyasını "./Sources" dizinine kopyalayın.
Pakette bulunan "SMF-2.0/Sources/Subs-RelatedFulltext.php" dosyasını "./Sources" dizinine kopyalayın.
Pakette bulunan "SMF-2.0/Themes/default/RelatedTopicsAdmin.template.php" dosyasını "./Themes/default" dizinine kopyalayın.
Sitenizde işlem yapmadan önce mutlaka yedek alın, yedek alın yedek almayı unutmayın her şeyden önce bu önemli

Pm'den ve Skype'den istenilen destekler ücretlidir. Ücret ödememek için lütfen sitede sorunuzu konu açarak sorabilirsiniz.

Ücretli Smf Destek İçin

Sosyal Öğretmeni

Bu sayfanın altında benzer konular oluşturuyor.
En güzeli mesajın içinde hemen mesajın altında olanı
çünkü ziyaretçinin sayfanın altını gezme ihitmali %20 daha fazla olmaz.
Ama mesajın hemen altında olmuş olsa çok harika olur.
Bunu bir çok sitede gördüm ve bazıları o kadar güzel yapmuşlar ki vBulltein e benzmiş harika bir sonuç ortaya çıkmış
Paylaşımlarınızı bekliyoruz...........

Örneğin bu sitedeki çok harika http://smfdestek.com/index.php?topic=898.0
Herkes göründüğü gibi değil.

tarantula901

Sitenizde işlem yapmadan önce mutlaka yedek alın, yedek alın yedek almayı unutmayın her şeyden önce bu önemli

Pm'den ve Skype'den istenilen destekler ücretlidir. Ücret ödememek için lütfen sitede sorunuzu konu açarak sorabilirsiniz.

Ücretli Smf Destek İçin

Sosyal Öğretmeni

zaten bunu diyordum görsellik eklenince çok harika oluyor...........
Herkes göründüğü gibi değil.

tarantula901

Alıntı yapılan: Sosyal Öğretmeni - 11 Tem 2014, 14:54
zaten bunu diyordum görsellik eklenince çok harika oluyor...........

görsellik olarak nasıl birşey mesela geliştirelim öyle paylaşalım
Sitenizde işlem yapmadan önce mutlaka yedek alın, yedek alın yedek almayı unutmayın her şeyden önce bu önemli

Pm'den ve Skype'den istenilen destekler ücretlidir. Ücret ödememek için lütfen sitede sorunuzu konu açarak sorabilirsiniz.

Ücretli Smf Destek İçin

Sosyal Öğretmeni

mesajın içinin altınınhepsini kapsamasın sadece en uzun konunu boyutuna göre benzer konuları otamatik biçimlendirsin.
Tablo çizgileri görünmesin. Yazı rengi seçeneği olabilir koyu mavi , kalın mavi yazılar olabilir. Vb
Ya aslına bakarsanız bu benzer konualr başlı başına harika görünüyor
Mesala aşağıdaki örnekte olduğu gibi sol alt köşede kırmız başlık koyu mavi konular ve en önemlisi de tablo görünmüyor tablı boyutu otomatikmen konulardaki cümle uzunluklarına göre boyutlandırılıyor.

Benzer Konular


Benzer konular....
Benzer konular........
Benzer konular.................
Benzer konular............ ggg
Benzer konular....gg...g..g.gg.g
Benzer konularngfgf gfgfggggfgfgfgfg
Herkes göründüğü gibi değil.

uyanangenclik

mesajın altına benzer konuları nasıl yapıyoruz.... Manuel anlatacak var mı? 
Bir Damlasıyım Okyanusun... Ama Okyanusum. Uyanan Gençlik

tarantula901

Sitenizde işlem yapmadan önce mutlaka yedek alın, yedek alın yedek almayı unutmayın her şeyden önce bu önemli

Pm'den ve Skype'den istenilen destekler ücretlidir. Ücret ödememek için lütfen sitede sorunuzu konu açarak sorabilirsiniz.

Ücretli Smf Destek İçin

canerildes

#8
Merhabalar,

mod kurulumunu yaparken


./Sources/Display.php
Bul
Kod[Seç]
$topicinfo = $smcFunc['db_fetch_assoc']($request);
$smcFunc['db_free_result']($request);


Sonrasına Ekle

Kod[Seç]
   // Added by Related Topics
if (!empty($modSettings['relatedTopicsEnabled']))
{
require_once($sourcedir . '/Subs-Related.php');
loadRelated($topic);
}

Bu kodu eklemeye çalışıyorum fakat benim sitedeki Display.php aşağıdaki şekilde bunu değiştirmeye çalıştığımda site hata veriyor.

if ($smcFunc['db_num_rows']($request) == 0)
fatal_lang_error('not_a_topic', false);
$topicinfo = $smcFunc['db_fetch_assoc']($request);
$smcFunc['db_free_result']($request);
$context['real_num_replies'] = $context['num_replies'] = $topicinfo['num_replies'];
$context['topic_first_message'] = $topicinfo['id_first_msg'];
$context['topic_last_message'] = $topicinfo['id_last_msg'];

// Add up unapproved replies to get real number of replies...
if ($modSettings['postmod_active'] && allowedTo('approve_posts'))
$context['real_num_replies'] += $topicinfo['unapproved_posts'] - ($topicinfo['approved'] ? 0 : 1);


yardımcı olabilir misiniz. Teşekkürler.

tarantula901

kodu şu sekılde deneyin

if ($smcFunc['db_num_rows']($request) == 0)
fatal_lang_error('not_a_topic', false);
$topicinfo = $smcFunc['db_fetch_assoc']($request);
$smcFunc['db_free_result']($request);
// Added by Related Topics
if (!empty($modSettings['relatedTopicsEnabled']))
{
require_once($sourcedir . '/Subs-Related.php');
loadRelated($topic);
}
$context['real_num_replies'] = $context['num_replies'] = $topicinfo['num_replies'];
$context['topic_first_message'] = $topicinfo['id_first_msg'];
$context['topic_last_message'] = $topicinfo['id_last_msg'];

// Add up unapproved replies to get real number of replies...
if ($modSettings['postmod_active'] && allowedTo('approve_posts'))
$context['real_num_replies'] += $topicinfo['unapproved_posts'] - ($topicinfo['approved'] ? 0 : 1);
Sitenizde işlem yapmadan önce mutlaka yedek alın, yedek alın yedek almayı unutmayın her şeyden önce bu önemli

Pm'den ve Skype'den istenilen destekler ücretlidir. Ücret ödememek için lütfen sitede sorunuzu konu açarak sorabilirsiniz.

Ücretli Smf Destek İçin

canerildes

Maalesef hata vermeye devam ediyor

tarantula901

veren hata mesajını konuya eklermisiniz

ve şu sekilde ekleyin

if ($smcFunc['db_num_rows']($request) == 0)
fatal_lang_error('not_a_topic', false);
$topicinfo = $smcFunc['db_fetch_assoc']($request);
$smcFunc['db_free_result']($request);
$context['real_num_replies'] = $context['num_replies'] = $topicinfo['num_replies'];
$context['topic_first_message'] = $topicinfo['id_first_msg'];
$context['topic_last_message'] = $topicinfo['id_last_msg'];

// Added by Related Topics
if (!empty($modSettings['relatedTopicsEnabled']))
{
require_once($sourcedir . '/Subs-Related.php');
loadRelated($topic);
}

// Add up unapproved replies to get real number of replies...
if ($modSettings['postmod_active'] && allowedTo('approve_posts'))
$context['real_num_replies'] += $topicinfo['unapproved_posts'] - ($topicinfo['approved'] ? 0 : 1);
Sitenizde işlem yapmadan önce mutlaka yedek alın, yedek alın yedek almayı unutmayın her şeyden önce bu önemli

Pm'den ve Skype'den istenilen destekler ücretlidir. Ücret ödememek için lütfen sitede sorunuzu konu açarak sorabilirsiniz.

Ücretli Smf Destek İçin

canerildes

kodu yükledikten sonra sitenin hata verip vermediğini kontrol etmek için explorerdan kontrol ediyorum HTTP500 iç sunucu hatası deyip site açılmıyor.

tarantula901

Son eklediğim kodu eklediniz mi

Sitenizde işlem yapmadan önce mutlaka yedek alın, yedek alın yedek almayı unutmayın her şeyden önce bu önemli

Pm'den ve Skype'den istenilen destekler ücretlidir. Ücret ödememek için lütfen sitede sorunuzu konu açarak sorabilirsiniz.

Ücretli Smf Destek İçin

canerildes