remove some unused commented out code

This commit is contained in:
Aleksei Miheev
2012-07-14 16:09:05 +03:00
parent b3751b302c
commit e52cf25d8b

View File

@@ -29,7 +29,7 @@ function template_main()
if (!empty($context['related_topics']))
{
echo '
<div id="related-topics" style="margin-top: 1em;">
<div id="related-topics">
<span class="b">',$txt['related_topics'],'</span><br />';
foreach($context['related_topics'] as $rt)
{
@@ -312,71 +312,33 @@ function template_main()
echo '
', /*$context['can_send_pm'] ? '<a href="' . $message['member']['online']['href'] . '" title="' . $message['member']['online']['label'] . '">' : '', $settings['use_image_buttons'] ? '<img src="' . $message['member']['online']['image_href'] . '" alt="' . $message['member']['online']['text'] . '" border="0" align="middle" />' : $message['member']['online']['text'], $context['can_send_pm'] ? '</a>' : '', $settings['use_image_buttons'] ?*/ '<span class="online"> ' . $message['member']['online']['text'] . '</span>' /*: ''*/, ' - ';
// Show how many posts they have made.
// echo '
// ', $txt[26], ': ', $message['member']['posts'], '<br />
// <br />';
// This shows the popular messaging icons.
/* echo '
', $message['member']['icq']['link'], '
', $message['member']['msn']['link'], '
', $message['member']['aim']['link'], '
', $message['member']['yim']['link'], '<br />';
*/
// Show the profile, website, email address, and personal message buttons.
if ($settings['show_profile_buttons'])
{
// Don't show the profile button if you're not allowed to view the profile.
if ($message['member']['can_view_profile'])
echo '
<a class="karma" href="', $message['member']['href'], '">', (/*$settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/icons/profile_sm.gif" alt="' . $txt[27] . '" title="' . $txt[27] . '" border="0" />' : */$txt[27]), '</a>';
/*
// Don't show an icon if they haven't specified a website.
if ($message['member']['website']['url'] != '')
echo '
<a href="', $message['member']['website']['url'], '" title="' . $message['member']['website']['title'] . '" target="_blank">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/www_sm.gif" alt="' . $txt[515] . '" border="0" />' : $txt[515]), '</a>';
<a class="karma" href="', $message['member']['href'], '">', $txt[27], '</a>';
// Don't show the email address if they want it hidden.
if (empty($message['member']['hide_email']))
echo '
<a href="mailto:', $message['member']['email'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/email_sm.gif" alt="' . $txt[69] . '" title="' . $txt[69] . '" border="0" />' : $txt[69]), '</a>';
*/
// Since we know this person isn't a guest, you *can* message them.
if ($context['can_send_pm'])
echo ' - <a class="karma" href="', $scripturl, '?action=pm;sa=send;u=', $message['member']['id'], '" title="', $message['member']['online']['label'], '">', /*$settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/im_' . ($message['member']['online']['is_online'] ? 'on' : 'off') . '.gif" alt="' . $message['member']['online']['label'] . '" border="0" />' : $message['member']['online']['label'],*/ $txt['online4'], '</a>';
echo ' - <a class="karma" href="', $scripturl, '?action=pm;sa=send;u=', $message['member']['id'], '" title="', $message['member']['online']['label'], '">', $txt['online4'], '</a>';
}
/* }
// Otherwise, show the guest's email.
else
echo '
<br />
<br />
<a href="mailto:', $message['member']['email'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/email_sm.gif" alt="' . $txt[69] . '" title="' . $txt[69] . '" border="0" />' : $txt[69]), '</a>';
*/
// Is karma display enabled? Total or +/-?
if ($modSettings['karmaMode'] == '1' AND $modSettings['karmadescmod'] == 1)
echo '
<br /><a href="',$scripturl,'?action=ownkarma;u=', $message['member']['id'],'" class="karma">', $modSettings['karmaLabel'], '</a> '/*, '<br />'*/;
elseif ($modSettings['karmaMode'] == '1' AND $modSettings['karmadescmod'] == 0)
echo '
<br />', $modSettings['karmaLabel'], ' ';
/*elseif ($modSettings['karmaMode'] == '2')
echo '
<br />
', $modSettings['karmaLabel'], ' +', $message['member']['karma']['good'], '/-', $message['member']['karma']['bad'], '<br />';*/
// Is karma display enabled? Total or +/-?
if ($modSettings['karmaMode'] == '1' AND $modSettings['karmadescmod'] == 1)
echo '
<br /><a href="',$scripturl,'?action=ownkarma;u=', $message['member']['id'],'" class="karma">', $modSettings['karmaLabel'], '</a> ';
// Is this user allowed to modify this member's karma?
if ($message['member']['karma']['allow'])
echo '&nbsp;
<a href="', $scripturl, '?action=modifykarma;sa=applaud;uid=', $message['member']['id'], ';topic=', $context['current_topic'], '.' . $context['start'], ';m=', $message['id'], '"><img src="', $settings['images_url'],'/icons/rep_plus.gif" alt="+" border="0" /></a> [ ', $message['member']['karma']['good'] - $message['member']['karma']['bad'],' ] <a href="', $scripturl, '?action=modifykarma;sa=smite;uid=', $message['member']['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';m=', $message['id'], '"><img src="', $settings['images_url'],'/icons/rep_minus.gif" alt="-" border="0" /></a><br />';
else
echo $message['member']['karma']['good'] - $message['member']['karma']['bad'], '<br />';
// Is this user allowed to modify this member's karma?
if ($message['member']['karma']['allow'])
echo '&nbsp;
<a href="', $scripturl, '?action=modifykarma;sa=applaud;uid=', $message['member']['id'], ';topic=', $context['current_topic'], '.' . $context['start'], ';m=', $message['id'], '"><img src="', $settings['images_url'],'/icons/rep_plus.gif" alt="+" border="0" /></a> [ ', $message['member']['karma']['good'] - $message['member']['karma']['bad'],' ] <a href="', $scripturl, '?action=modifykarma;sa=smite;uid=', $message['member']['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';m=', $message['id'], '"><img src="', $settings['images_url'],'/icons/rep_minus.gif" alt="-" border="0" /></a><br />';
else
echo $message['member']['karma']['good'] - $message['member']['karma']['bad'], '<br />';
// Show how many posts they have made.
// Show how many posts they have made.
echo '
<br />', $txt[26], ': ', $message['member']['posts'], '
<br />';
@@ -394,7 +356,7 @@ function template_main()
// If this is the first post, (#0) just say when it was posted - otherwise give the reply #.
echo '
<span class="smalltext">', /*!($message['id'] == $context['topic_first_message']) ? '#'.$message['counter'] : '', ' ',*/ $message['time'], '</span>';
<span class="smalltext">', $message['time'], '</span>';
if ($message['id']==$context['topic_first_message']) {
echo '<script type="text/javascript" src="//yandex.st/share/share.js" charset="utf-8"></script><div class="yashare-auto-init" data-yashareL10n="ru" data-yashareType="button" data-yashareQuickServices="yaru,vkontakte,facebook,twitter,odnoklassniki,moimir,lj"></div>';
@@ -450,16 +412,6 @@ function template_main()
</tr></table>
<hr width="100%" size="1" class="hrcolor" />
<div style="overflow: auto; width: 100%;">', $message['body'];
/*if($modSettings['nowplayingEnabled'] && $message['nowplaying'] != '')
{
if(isset($modSettings['nowplaying_image']) && $modSettings['nowplaying_image'] != '')
$nowplayingstring = '<img src="'. $settings['images_url'] . '/'. $modSettings['nowplaying_image'] . '" alt="" border="0" />';
else
$nowplayingstring = '<img src="'. $settings['images_url'] . '/cddisc.gif" alt="" border="0" />';
if(isset($modSettings['nowplaying_text']) && $modSettings['nowplaying_text'] != '')
$nowplayingstring .= '&nbsp;' . $modSettings['nowplaying_text'];
echo '<br /><br />', $nowplayingstring, '&nbsp;<b>', $message['nowplaying'], '</b>';
}*/
echo '</div>';
echo '
</td>
@@ -538,31 +490,21 @@ function template_main()
echo '
<a href="', $scripturl, '?action=reporttm;topic=', $context['current_topic'], '.', $message['counter'], ';msg=', $message['id'], '">', $txt['rtm1'], '</a> &nbsp;';
/*echo '
<img src="', $settings['images_url'], '/ip.gif" alt="" border="0" />';*/
// Show the IP to this user for this post - because you can moderate?
if ($context['can_moderate_forum'] && !empty($message['member']['ip']))
echo '
<a href="', $scripturl, '?action=trackip;searchip=', $message['member']['ip'], '">', $message['member']['ip'], '</a>';
// Or, should we show it because this is you?
elseif (false and $message['can_see_ip'])
if (false and $message['can_see_ip'])
echo '
<a href="', $scripturl, '?action=helpadmin;help=see_member_ip" onclick="return reqWin(this.href);" class="help">', $message['member']['ip'], '</a>';
// Okay, are you at least logged in? Then we can show something about why IPs are logged...
/* elseif (!$context['user']['is_guest'])
echo '
<a href="', $scripturl, '?action=helpadmin;help=see_member_ip" onclick="return reqWin(this.href);" class="help">', $txt[511], '</a>';*/
// Otherwise, you see NOTHING!
else
echo '
'/*, $txt[511]*/;
}
echo '
</td>
</tr></table>';
// Show the member's signature?
if (! $ignore && /*empty($context['user']['is_guest']) &&*/
if (! $ignore && empty($context['user']['is_guest']) &&
!empty($message['member']['signature']) &&
empty($options['show_no_signatures']))
echo '
@@ -926,134 +868,6 @@ function template_enhanced_quick_reply()
$context['disabled_tags'][trim($tag)] = true;
}
// Assuming BBC code is enabled then print the buttons and some javascript to handle it.
if (0 and !empty($modSettings['enableBBC']) && !empty($settings['show_bbc']))
{
echo '
<tr>
<td align="right"></td>
<td valign="middle">
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
function bbc_highlight(something, mode)
{
something.style.backgroundImage = "url(" + smf_images_url + (mode ? "/bbc/bbc_hoverbg.gif)" : "/bbc/bbc_bg.gif)");
}
// ]]></script>';
// The below array makes it dead easy to add images to this page. Add it to the array and everything else is done for you!
$context['bbc_tags'] = array();
$context['bbc_tags'][] = array(
'bold' => array('code' => 'b', 'before' => '[b]', 'after' => '[/b]', 'description' => $txt[253]),
'italicize' => array('code' => 'i', 'before' => '[i]', 'after' => '[/i]', 'description' => $txt[254]),
'underline' => array('code' => 'u', 'before' => '[u]', 'after' => '[/u]', 'description' => $txt[255]),
'strike' => array('code' => 's', 'before' => '[s]', 'after' => '[/s]', 'description' => $txt[441]),
array(),
'pre' => array('code' => 'pre', 'before' => '[pre]', 'after' => '[/pre]', 'description' => $txt[444]),
'left' => array('code' => 'left', 'before' => '[left]', 'after' => '[/left]', 'description' => $txt[445]),
'center' => array('code' => 'center', 'before' => '[center]', 'after' => '[/center]', 'description' => $txt[256]),
'right' => array('code' => 'right', 'before' => '[right]', 'after' => '[/right]', 'description' => $txt[446]),
array(),
'hr' => array('code' => 'hr', 'before' => '[hr]', 'description' => $txt[531]),
array(),
'size' => array('code' => 'size', 'before' => '[size=10pt]', 'after' => '[/size]', 'description' => $txt[532]),
'face' => array('code' => 'font', 'before' => '[font=Verdana]', 'after' => '[/font]', 'description' => $txt[533]),
);
$context['bbc_tags'][] = array(
'flash' => array('code' => 'flash', 'before' => '[flash=200,200]', 'after' => '[/flash]', 'description' => $txt[433]),
'video' => array('code' => 'video', 'before' => '[video]', 'after' => '[/video]', 'description' => 'Вставить видео'),
'img' => array('code' => 'img', 'before' => '[img]', 'after' => '[/img]', 'description' => $txt[435]),
'url' => array('code' => 'url', 'before' => '[url]', 'after' => '[/url]', 'description' => $txt[257]),
'email' => array('code' => 'email', 'before' => '[email]', 'after' => '[/email]', 'description' => $txt[258]),
'ftp' => array('code' => 'ftp', 'before' => '[ftp]', 'after' => '[/ftp]', 'description' => $txt[434]),
array(),
'table' => array('code' => 'table', 'before' => '[table]', 'after' => '[/table]', 'description' => $txt[436]),
'tr' => array('code' => 'td', 'before' => '[tr]', 'after' => '[/tr]', 'description' => $txt[449]),
'td' => array('code' => 'td', 'before' => '[td]', 'after' => '[/td]', 'description' => $txt[437]),
array(),
'sup' => array('code' => 'sup', 'before' => '[sup]', 'after' => '[/sup]', 'description' => $txt[447]),
'sub' => array('code' => 'sub', 'before' => '[sub]', 'after' => '[/sub]', 'description' => $txt[448]),
'tele' => array('code' => 'tt', 'before' => '[tt]', 'after' => '[/tt]', 'description' => $txt[440]),
array(),
'code' => array('code' => 'code', 'before' => '[code]', 'after' => '[/code]', 'description' => $txt[259]),
'quote' => array('code' => 'quote', 'before' => '[quote]', 'after' => '[/quote]', 'description' => $txt[260]),
array(),
'list' => array('code' => 'list', 'before' => '[list]\n[li]', 'after' => '[/li]\n[li][/li]\n[/list]', 'description' => $txt[261]),
);
// Here loop through the array, printing the images/rows/separators!
foreach ($context['bbc_tags'][0] as $image => $tag)
{
// Is there a "before" part for this bbc button? If not, it can't be a button!!
if (isset($tag['before']))
{
// Is this tag disabled?
if (!empty($context['disabled_tags'][$tag['code']]))
continue;
// If there's no after, we're just replacing the entire selection in the post box.
if (!isset($tag['after']))
echo '<a href="javascript:void(0);" onclick="replaceText(\'', $tag['before'], '\', document.', $context['post_form'], '.', $context['post_box_name'], '); return false;">';
// On the other hand, if there is one we are surrounding the selection ;).
else
echo '<a href="javascript:void(0);" onclick="surroundText(\'', $tag['before'], '\', \'', $tag['after'], '\', document.', $context['post_form'], '.', $context['post_box_name'], '); return false;">';
// Okay... we have the link. Now for the image and the closing </a>!
echo '<img onmouseover="bbc_highlight(this, true);" onmouseout="if (window.bbc_highlight) bbc_highlight(this, false);" src="', $settings['images_url'], '/bbc/', $image, '.gif" align="bottom" border="0" width="23" height="22" alt="', $tag['description'], '" title="', $tag['description'], '" style="background-image: url(', $settings['images_url'], '/bbc/bbc_bg.gif); margin: 1px 2px 1px 1px;" /></a>';
}
// I guess it's a divider...
else
echo '<img src="', $settings['images_url'], '/bbc/divider.gif" alt="|" style="margin: 0 3px 0 3px;" />';
}
// Print a drop down list for all the colors we allow!
if (!isset($context['disabled_tags']['color']))
echo ' <select onchange="surroundText(\'[color=\' + this.options[this.selectedIndex].value.toLowerCase() + \']\', \'[/color]\', document.', $context['post_form'], '.', $context['post_box_name'], '); this.selectedIndex = 0; document.', $context['post_form'], '.', $context['post_box_name'], '.focus(document.', $context['post_form'], '.', $context['post_box_name'], '.caretPos);" style="margin-bottom: 1ex;">
<option value="" selected="selected">', $txt['change_color'], '</option>
<option value="Black">', $txt[262], '</option>
<option value="Red">', $txt[263], '</option>
<option value="Yellow">', $txt[264], '</option>
<option value="Pink">', $txt[265], '</option>
<option value="Green">', $txt[266], '</option>
<option value="Orange">', $txt[267], '</option>
<option value="Purple">', $txt[268], '</option>
<option value="Blue">', $txt[269], '</option>
<option value="Beige">', $txt[270], '</option>
<option value="Brown">', $txt[271], '</option>
<option value="Teal">', $txt[272], '</option>
<option value="Navy">', $txt[273], '</option>
<option value="Maroon">', $txt[274], '</option>
<option value="LimeGreen">', $txt[275], '</option>
</select>';
echo '<br />';
// Print the buttom row of buttons!
foreach ($context['bbc_tags'][1] as $image => $tag)
{
if (isset($tag['before']))
{
// Is this tag disabled?
if (!empty($context['disabled_tags'][$tag['code']]))
continue;
// If there's no after, we're just replacing the entire selection in the post box.
if (!isset($tag['after']))
echo '<a href="javascript:void(0);" onclick="replaceText(\'', $tag['before'], '\', document.', $context['post_form'], '.', $context['post_box_name'], '); return false;">';
// On the other hand, if there is one we are surrounding the selection ;).
else
echo '<a href="javascript:void(0);" onclick="surroundText(\'', $tag['before'], '\', \'', $tag['after'], '\', document.', $context['post_form'], '.', $context['post_box_name'], '); return false;">';
// Okay... we have the link. Now for the image and the closing </a>!
echo '<img onmouseover="bbc_highlight(this, true);" onmouseout="if (window.bbc_highlight) bbc_highlight(this, false);" src="', $settings['images_url'], '/bbc/', $image, '.gif" align="bottom" border="0" width="23" height="22" alt="', $tag['description'], '" title="', $tag['description'], '" style="background-image: url(', $settings['images_url'], '/bbc/bbc_bg.gif); margin: 1px 2px 1px 1px;" /></a>';
}
// I guess it's a divider...
else
echo '<img src="', $settings['images_url'], '/bbc/divider.gif" alt="|" style="margin: 0 3px 0 3px;" />';
}
echo '
</td>
</tr>';
}
// Now start printing all of the smileys.
if (!empty($context['smileys']['postform']))
{