merhaba arkadaşlar yukarıdaki modu bir türlü siteme kuramadım yardımcı olabilecek arkadaş varmı?
Eklenmesi Gereken Kod Buymuş
Ancak bir türlü yerleştiremedim hata veriyor durmadan.
Benim displaytheme:
/**
* Simple Machines Forum (SMF)
*
* @package SMF
* @author Simple Machines
* @copyright 2011 Simple Machines
* @license http://www.simplemachines.org/about/smf/license.php BSD
*
* @version 2.0
*/
function template_main()
{
global $context, $settings, $options, $txt, $scripturl, $modSettings;
// Let them know, if their report was a success!
if ($context['report_sent'])
{
echo '
', $txt['report_sent'], '
';
}
// Show the anchor for the top and for the first message. If the first message is new, say so.
echo '
', $context['first_new_message'] ? '' : '';
// Is this topic also a poll?
if ($context['is_poll'])
{
echo '
', $context['poll']['question'], '
';
// Are they not allowed to vote but allowed to view the options?
if ($context['poll']['show_results'] || !$context['allow_vote'])
{
echo '
';
if ($context['allow_poll_view'])
echo '
', $txt['poll_total_voters'], ': ', $context['poll']['total_votes'], '
';
}
// They are allowed to vote! Go to it!
else
{
echo '
';
}
// Is the clock ticking?
if (!empty($context['poll']['expire_time']))
echo '
', ($context['poll']['is_expired'] ? $txt['poll_expired_on'] : $txt['poll_expires_on']), ': ', $context['poll']['expire_time'], '
';
echo '
';
// Build the poll moderation button array.
$poll_buttons = array(
'vote' => array('test' => 'allow_return_vote', 'text' => 'poll_return_vote', 'image' => 'poll_options.gif', 'lang' => true, 'url' => $scripturl . '?topic=' . $context['current_topic'] . '.' . $context['start']),
'results' => array('test' => 'show_view_results_button', 'text' => 'poll_results', 'image' => 'poll_results.gif', 'lang' => true, 'url' => $scripturl . '?topic=' . $context['current_topic'] . '.' . $context['start'] . ';viewresults'),
'change_vote' => array('test' => 'allow_change_vote', 'text' => 'poll_change_vote', 'image' => 'poll_change_vote.gif', 'lang' => true, 'url' => $scripturl . '?action=vote;topic=' . $context['current_topic'] . '.' . $context['start'] . ';poll=' . $context['poll']['id'] . ';' . $context['session_var'] . '=' . $context['session_id']),
'lock' => array('test' => 'allow_lock_poll', 'text' => (!$context['poll']['is_locked'] ? 'poll_lock' : 'poll_unlock'), 'image' => 'poll_lock.gif', 'lang' => true, 'url' => $scripturl . '?action=lockvoting;topic=' . $context['current_topic'] . '.' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id']),
'edit' => array('test' => 'allow_edit_poll', 'text' => 'poll_edit', 'image' => 'poll_edit.gif', 'lang' => true, 'url' => $scripturl . '?action=editpoll;topic=' . $context['current_topic'] . '.' . $context['start']),
'remove_poll' => array('test' => 'can_remove_poll', 'text' => 'poll_remove', 'image' => 'admin_remove_poll.gif', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . $txt['poll_remove_warn'] . '\');"', 'url' => $scripturl . '?action=removepoll;topic=' . $context['current_topic'] . '.' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id']),
);
template_button_strip($poll_buttons);
echo '
';
}
// Does this topic have some events linked to it?
if (!empty($context['linked_calendar_events']))
{
echo '
';
foreach ($context['linked_calendar_events'] as $event)
echo '
-
', ($event['can_edit'] ? ' ' : ''), '', $event['title'], ': ', $event['start_date'], ($event['start_date'] != $event['end_date'] ? ' - ' . $event['end_date'] : ''), '
';
echo '
';
}
// Build the normal button array.
$normal_buttons = array(
'reply' => array('test' => 'can_reply', 'text' => 'reply', 'image' => 'reply.gif', 'lang' => true, 'url' => $scripturl . '?action=post;topic=' . $context['current_topic'] . '.' . $context['start'] . ';last_msg=' . $context['topic_last_message'], 'active' => true),
'add_poll' => array('test' => 'can_add_poll', 'text' => 'add_poll', 'image' => 'add_poll.gif', 'lang' => true, 'url' => $scripturl . '?action=editpoll;add;topic=' . $context['current_topic'] . '.' . $context['start']),
'notify' => array('test' => 'can_mark_notify', 'text' => $context['is_marked_notify'] ? 'unnotify' : 'notify', 'image' => ($context['is_marked_notify'] ? 'un' : '') . 'notify.gif', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . ($context['is_marked_notify'] ? $txt['notification_disable_topic'] : $txt['notification_enable_topic']) . '\');"', 'url' => $scripturl . '?action=notify;sa=' . ($context['is_marked_notify'] ? 'off' : 'on') . ';topic=' . $context['current_topic'] . '.' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id']),
'mark_unread' => array('test' => 'can_mark_unread', 'text' => 'mark_unread', 'image' => 'markunread.gif', 'lang' => true, 'url' => $scripturl . '?action=markasread;sa=topic;t=' . $context['mark_unread_time'] . ';topic=' . $context['current_topic'] . '.' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id']),
'send' => array('test' => 'can_send_topic', 'text' => 'send_topic', 'image' => 'sendtopic.gif', 'lang' => true, 'url' => $scripturl . '?action=emailuser;sa=sendtopic;topic=' . $context['current_topic'] . '.0'),
'print' => array('text' => 'print', 'image' => 'print.gif', 'lang' => true, 'custom' => 'rel="new_win nofollow"', 'url' => $scripturl . '?action=printpage;topic=' . $context['current_topic'] . '.0'),
);
// Allow adding new buttons easily.
call_integration_hook('integrate_display_buttons', array(&$normal_buttons));
// Show the page index... "Pages: [1]".
echo '
', $context['previous_next'], '', template_button_strip($normal_buttons, 'right'), '
', $txt['pages'], ': ', $context['page_index'], !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . ' ' . $txt['go_down'] . '' : '', '
';
// Show the topic information - icon, subject, etc.
echo '
';
if (!empty($settings['display_who_viewing']))
{
echo '
';
// Show just numbers...?
if ($settings['display_who_viewing'] == 1)
echo count($context['view_members']), ' ', count($context['view_members']) == 1 ? $txt['who_member'] : $txt['members'];
// Or show the actual people viewing the topic?
else
echo empty($context['view_members_list']) ? '0 ' . $txt['members'] : implode(', ', $context['view_members_list']) . ((empty($context['view_num_hidden']) || $context['can_moderate_forum']) ? '' : ' (+ ' . $context['view_num_hidden'] . ' ' . $txt['hidden'] . ')');
// Now show how many guests are here too.
echo $txt['who_and'], $context['view_num_guests'], ' ', $context['view_num_guests'] == 1 ? $txt['guest'] : $txt['guests'], $txt['who_viewing_topic'], '
';
}
echo '
';
// Show the page index... "Pages: [1]".
echo '
', template_button_strip($normal_buttons, 'right'), '
', $txt['pages'], ': ', $context['page_index'], !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . ' ' . $txt['go_up'] . '' : '', '
', $context['previous_next'], '
';
// Seo4Smf
echo seo4smf_social_bookmarks();
// Show the lower breadcrumbs.
theme_linktree();
$mod_buttons = array(
'move' => array('test' => 'can_move', 'text' => 'move_topic', 'image' => 'admin_move.gif', 'lang' => true, 'url' => $scripturl . '?action=movetopic;topic=' . $context['current_topic'] . '.0'),
'delete' => array('test' => 'can_delete', 'text' => 'remove_topic', 'image' => 'admin_rem.gif', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . $txt['are_sure_remove_topic'] . '\');"', 'url' => $scripturl . '?action=removetopic2;topic=' . $context['current_topic'] . '.0;' . $context['session_var'] . '=' . $context['session_id']),
'lock' => array('test' => 'can_lock', 'text' => empty($context['is_locked']) ? 'set_lock' : 'set_unlock', 'image' => 'admin_lock.gif', 'lang' => true, 'url' => $scripturl . '?action=lock;topic=' . $context['current_topic'] . '.' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id']),
'sticky' => array('test' => 'can_sticky', 'text' => empty($context['is_sticky']) ? 'set_sticky' : 'set_nonsticky', 'image' => 'admin_sticky.gif', 'lang' => true, 'url' => $scripturl . '?action=sticky;topic=' . $context['current_topic'] . '.' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id']),
'merge' => array('test' => 'can_merge', 'text' => 'merge', 'image' => 'merge.gif', 'lang' => true, 'url' => $scripturl . '?action=mergetopics;board=' . $context['current_board'] . '.0;from=' . $context['current_topic']),
'calendar' => array('test' => 'calendar_post', 'text' => 'calendar_link', 'image' => 'linktocal.gif', 'lang' => true, 'url' => $scripturl . '?action=post;calendar;msg=' . $context['topic_first_message'] . ';topic=' . $context['current_topic'] . '.0'),
);
// Restore topic. eh? No monkey business.
if ($context['can_restore_topic'])
$mod_buttons[] = array('text' => 'restore_topic', 'image' => '', 'lang' => true, 'url' => $scripturl . '?action=restoretopic;topics=' . $context['current_topic'] . ';' . $context['session_var'] . '=' . $context['session_id']);
// Allow adding new mod buttons easily.
call_integration_hook('integrate_mod_buttons', array(&$mod_buttons));
echo '
';
// Show the jumpto box, or actually...let Javascript do it.
echo '
';
if ($context['can_reply'] && !empty($options['display_quick_reply']))
{
echo '
';
}
else
echo '
';
if ($context['show_spellchecking'])
echo '
<script></script>';
echo '
<script></script>
<script>
if (!empty($options['display_quick_reply']))
echo '
var oQuickReply = new QuickReply({
bDefaultCollapsed: ', !empty($options['display_quick_reply']) && $options['display_quick_reply'] == 2 ? 'false' : 'true', ',
iTopicId: ', $context['current_topic'], ',
iStart: ', $context['start'], ',
sScriptUrl: smf_scripturl,
sImagesUrl: "', $settings['images_url'], '",
sContainerId: "quickReplyOptions",
sImageId: "quickReplyExpand",
sImageCollapsed: "collapse.gif",
sImageExpanded: "expand.gif",
sJumpAnchor: "quickreply"
});';
if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && $context['can_remove_post'])
echo '
var oInTopicModeration = new InTopicModeration({
sSelf: \'oInTopicModeration\',
sCheckboxContainerMask: \'in_topic_mod_check_\',
aMessageIds: [\'', implode('\', \'', $removableMessageIDs), '\'],
sSessionId: \'', $context['session_id'], '\',
sSessionVar: \'', $context['session_var'], '\',
sButtonStrip: \'moderationbuttons\',
sButtonStripDisplay: \'moderationbuttons_strip\',
bUseImageButton: false,
bCanRemove: ', $context['can_remove_post'] ? 'true' : 'false', ',
sRemoveButtonLabel: \'', $txt['quickmod_delete_selected'], '\',
sRemoveButtonImage: \'delete_selected.gif\',
sRemoveButtonConfirm: \'', $txt['quickmod_confirm'], '\',
bCanRestore: ', $context['can_restore_msg'] ? 'true' : 'false', ',
sRestoreButtonLabel: \'', $txt['quick_mod_restore'], '\',
sRestoreButtonImage: \'restore_selected.gif\',
sRestoreButtonConfirm: \'', $txt['quickmod_confirm'], '\',
sFormId: \'quickModForm\'
});';
echo '
if (\'XMLHttpRequest\' in window)
{
var oQuickModify = new QuickModify({
sScriptUrl: smf_scripturl,
bShowModify: ', $settings['show_modify'] ? 'true' : 'false', ',
iTopicId: ', $context['current_topic'], ',
sTemplateBodyEdit: ', JavaScriptEscape('
' . ($context['show_spellchecking'] ? ' ' : '') . '
'), ',
sTemplateSubjectEdit: ', JavaScriptEscape(''), ',
sTemplateBodyNormal: ', JavaScriptEscape('%body%'), ',
sTemplateSubjectNormal: ', JavaScriptEscape('%subject%'), ',
sTemplateTopSubject: ', JavaScriptEscape($txt['topic'] . ': %subject% (' . $txt['read'] . ' ' . $context['num_views'] . ' ' . $txt['times'] . ')'), ',
sErrorBorderStyle: ', JavaScriptEscape('1px solid red'), '
});
aJumpTo[aJumpTo.length] = new JumpTo({
sContainerId: "display_jump_to",
sJumpToTemplate: "