Smf Benzer konular modu

Başlatan snrj, 19 May 2014 00:21

« önceki - sonraki »

0 Üye ve 1 Ziyaretçi konuyu incelemekte.

*

  1. 3,084

  2. 584

  3. 973
19 May 2014 00:21 Son düzenlenme: 18 Oca 2015 02:35 snrj


Modifikasyon Adı: Related Topics
Modifikasyon link: http://custom.simplemachines.org/mods/index.php?mod=189


manuel kurulum
./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.



  1. 632

  2. 251
bunun türkçesi yok sanırım.



  1. 632

  2. 251
Konu içinde göstermek için hangi dosyaya eklememiz gerekli?

*

  1. 1,131

  2. 105

  3. 331

Alıntı yapılan: zafer - 10 Ara 2015 15:02Konu içinde göstermek için hangi dosyaya eklememiz gerekli?
Display.template.php zatende tam :) nereye ne istiyorsunuz



  1. 632

  2. 251
İlk mesajda daha önceleri  kullanıyordum,bir süre forumla ilgilenemedim,hata vermiş arkadaşımda dosyaları yeniden yükleyince modlar gitmiş :)

*

  1. 1,131

  2. 105

  3. 331
Tamamen modlar gıtmısse modları tekrar kurabılırsın eger temayı degıstırmıssenız temada degısıklık yapman gerrekıyor


MENU ×