News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Post Frequency Bar

Started by steve in houston, October 26, 2006, 03:58:47 PM

Previous topic - Next topic

TrueSatan

 Yep...those old failsafes made the package install fail if there was any problem in that area of the code and not put in the other edits on the affected file either. it should work as it is on a clean install but if there is a glitch the manual edit you posted will fix it.

I might have another go at the package to try to trap the error better.

ArkServer

I cannot get the frequency bar to work on a theme, help would be appriciated

<?php
// Version: 1.0; Display

function template_main()
{
global $context$settings$options$txt$scripturl$modSettings;
//Display ads on the thread page
$ads show_threadAds();
if(!empty($ads))
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
unset($ads);
// Show the anchor for the top and for the first message.  If the first message is new, say so.
echo '
<a name="top"></a>
<a name="msg'
$context['first_message'], '"></a>'$context['first_new_message'] ? '<a name="new"></a>' '';

// Show the linktree as well as the "Who's Viewing" information.
echo '
<table width="100%" cellpadding="3" cellspacing="0">
<tr>
<td valign="bottom">'
theme_linktree(), '</td>';
if (!empty($settings['display_who_viewing']))
{
echo '
<td align="center" class="smalltext">'
;

// Show just numbers...?
if ($settings['display_who_viewing'] == 1)
echo count($context['view_members']), ' 'count($context['view_members']) == $txt['who_member'] : $txt[19];
// Or show the actual people viewing the topic?
else
echo empty($context['view_members_list']) ? '0 ' $txt[19] : 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'] == $txt['guest'] : $txt['guests'], $txt['who_viewing_topic'], '</td>';
}

// Show the previous/next links.
echo '
<td valign="bottom" align="right" class="smalltext">
<span class="nav">'
$context['previous_next'], '</span>
</td>
</tr>
</table>'
;

// Is this topic also a poll?
if ($context['is_poll'])
{
echo '
<table cellspacing="1" cellpadding="4" width="100%" class="tborder">
<tr class="titlebg">
<td colspan="2" valign="middle" align="left" style="padding-left: 6px;">
<img src="'
$settings['images_url'], '/topic/'$context['poll']['is_locked'] ? 'normal_poll_locked' 'normal_poll''.gif" alt="" align="top" /> '$txt['smf43'], '
</td>
</tr>
<tr>
<td width="5%" valign="top" class="windowbg2"><b>'
$txt['smf21'], ':</b></td>
<td class="windowbg2">
'
$context['poll']['question'];
if (!empty($context['poll']['expire_time']))
echo '
&nbsp;('
, ($context['poll']['is_expired'] ? $txt['poll_expired_on'] : $txt['poll_expires_on']), ': '$context['poll']['expire_time'], ')';

// Are they not allowed to vote but allowed to view the options?
if (!$context['allow_vote'])
{
echo '
<table width="100%" border="0">
<tr>
<td style="padding-top: 2ex;">
<table border="0" cellpadding="0" cellspacing="0">'
;

// Show each option with it's corresponding percentage bar.
foreach ($context['poll']['options'] as $option)
echo '
<tr>
<td>'
$option['option'], '</td>'$context['allow_poll_view'] ? '
<td width="7">&nbsp;</td>
<td nowrap="nowrap">' 
$option['bar'] . $option['votes'] . ' (' $option['percent'] . '%)</td>' '''
</tr>'
;

echo '
</table>
</td>
<td valign="bottom" style="padding-left: 15px;" align="right" width="100">'
;

// If they're allowed to lock the poll, show a link!
if ($context['poll']['lock'])
echo '
<a href="'
$scripturl'?action=lockVoting;topic='$context['current_topic'], '.'$context['start'], ';sesc='$context['session_id'], '">', !$context['poll']['is_locked'] ? $txt['smf30'] : $txt['smf30b'], '</a><br />';

// If they're allowed to edit the poll... show a link!
if ($context['poll']['edit'])
echo '
<a href="'
$scripturl'?action=editpoll;topic='$context['current_topic'], '.'$context['start'], '">'$txt['smf39'], '</a>';

echo '
</td>
</tr>'
$context['allow_poll_view'] ? '
<tr>
<td colspan="2"><b>' 
$txt['smf24'] . ': ' $context['poll']['total_votes'] . '</b></td>
</tr>' 
'''
</table><br />'
;
}
// They are allowed to vote!  Go to it!
else
{
echo '
<form action="'
$scripturl'?action=vote;topic='$context['current_topic'], '.'$context['start'], ';poll='$context['poll']['id'], '" method="post" style="margin: 0px;">
<table width="100%" border="0">
<tr>
<td colspan="2">'
;

// Show a warning if they are allowed more than one option.
if ($context['poll']['allowed_warning'])
echo '
'
$context['poll']['allowed_warning'], '
</td>
</tr><tr>
<td>'
;

// Show each option with it's button - a radio likely.
foreach ($context['poll']['options'] as $option)
echo '
'
$option['vote_button'], ' '$option['option'], '<br />';

echo '
</td>
<td valign="bottom" style="padding-left: 15px;" align="right" width="100">'
;

// Allowed to view the results? (without voting!)
if ($context['allow_poll_view'])
echo '
<a href="'
$scripturl'?topic='$context['current_topic'], '.'$context['start'], ';viewResults">'$txt['smf29'], '</a><br />';

// Show a link for locking the poll as well...
if ($context['poll']['lock'])
echo '
<a href="'
$scripturl'?action=lockVoting;topic='$context['current_topic'], '.'$context['start'], ';sesc='$context['session_id'], '">', (!$context['poll']['is_locked'] ? $txt['smf30'] : $txt['smf30b']), '</a><br />';

// Want to edit it?  Click right here......
if ($context['poll']['edit'])
echo '
<a href="'
$scripturl'?action=editpoll;topic='$context['current_topic'], '.'$context['start'], '">'$txt['smf39'], '</a>';

echo '
</td>
</tr><tr>
<td colspan="2"><input type="submit" value="'
$txt['smf23'], '" /></td>
</tr>
</table>
<input type="hidden" name="sc" value="'
$context['session_id'], '" />
</form>'
;
}

echo '
</td>
</tr>
</table><br />'
;
}

// Show the page index... "Pages: [1]".
echo '
<table width="100%" cellspacing="1" cellpadding="4" class="tborder">
<tr>
<td align="left" class="catbg" width="100%" height="35">
<table cellpadding="3" cellspacing="0" width="100%">
<tr>
<td>
<b>'
$txt[139], ':</b> '$context['page_index'];

// Show a "go down" link?
if (!empty($modSettings['topbottomEnable']))
echo $context['menu_separator'], '<a href="#bot">'$settings['use_image_buttons'] ? '<img src="' $settings['images_url'] . '/' $context['user']['language'] . '/go_down.gif" alt="' $txt['topbottom5'] . '" border="0" align="top" />' $txt['topbottom5'], '</a>';

echo '
</td>
<td align="right" style="font-size: smaller;">'
;

$buttonArray = array();
if ($context['can_reply'])
$buttonArray[] = '<a href="' $scripturl '?action=post;topic=' $context['current_topic'] . '.' $context['start'] . ';num_replies=' $context['num_replies'] . '">' . ($settings['use_image_buttons'] ? '<img src="' $settings['images_url'] . '/' $context['user']['language'] . '/reply.gif" alt="' $txt[146] . '" border="0" />' $txt[146]) . '</a>';
if ($context['can_mark_notify'])
$buttonArray[] = '<a href="' $scripturl '?action=notify;sa=' . ($context['is_marked_notify'] ? 'off' 'on') . ';topic=' $context['current_topic'] . '.' $context['start'] . ';sesc=' $context['session_id'] . '" onclick="return confirm(\'' . ($context['is_marked_notify'] ? $txt['notification_disable_topic'] : $txt['notification_enable_topic']) . '\');">' . ($settings['use_image_buttons'] ? '<img src="' $settings['images_url'] . '/' $context['user']['language'] . '/notify.gif" alt="' $txt[131] . '" border="0" />' $txt[131]) . '</a>';

// This is a special case; if they can see mark unread, put it at the top... otherwise show add poll.
if ($context['user']['is_logged'] && $settings['show_mark_read'])
$buttonArray[] = '<a href="' $scripturl '?action=markasread;sa=topic;topic=' $context['current_topic'] . '.' $context['start'] . '">' . ($settings['use_image_buttons'] ? '<img src="' $settings['images_url'] . '/' $context['user']['language'] . '/markunread.gif" alt="' $txt['mark_unread'] . '" border="0" />' $txt['mark_unread']) . '</a>';
elseif ($context['can_add_poll'])
$buttonArray[] = '<a href="' $scripturl '?action=post;poll;msg=' $context['topic_first_message'] . ';topic=' $context['current_topic'] . '.' $context['start'] . ';sesc=' $context['session_id'] . '">' . ($settings['use_image_buttons'] ? '<img src="' $settings['images_url'] . '/' $context['user']['language'] . '/addpoll.gif" alt="' $txt['add_poll'] . '" border="0" />' $txt['add_poll']) . '</a>';

if ($context['can_send_topic'])
$buttonArray[] = '<a href="' $scripturl '?action=sendtopic;topic=' $context['current_topic'] . '.0">' . ($settings['use_image_buttons'] ? '<img src="' $settings['images_url'] . '/' $context['user']['language'] . '/sendtopic.gif" alt="' $txt[707] . '" border="0" />' $txt[707]) . '</a>';
$buttonArray[] = '<a href="' $scripturl '?action=printpage;topic=' $context['current_topic'] . '.0" target="_blank">' . ($settings['use_image_buttons'] ? '<img src="' $settings['images_url'] . '/' $context['user']['language'] . '/print.gif" alt="' $txt[465] . '" border="0" />' $txt[465]) . '</a>';

echo implode($context['menu_separator'], $buttonArray);

echo '</td>
</tr>
</table>
</td>
</tr>
</table>
<br />'
;

// Show the topic information - icon, subject, etc.
echo '
<table width="100%" cellpadding="3" cellspacing="0" border="0" class="tborder" style="border-bottom: 0;">
<tr class="titlebg">
<td valign="middle" align="left" width="15%" style="padding-left: 6px;">
<img src="'
$settings['images_url'], '/topic/'$context['class'], '.gif" alt="" align="middle" /> '$txt[29], '
</td>
<td valign="middle" align="left" width="85%" style="padding-left: 6px;">
'
$txt[118], ': '$context['subject'], ' &nbsp;('$txt[641], ' '$context['num_views'], ' '$txt[642], ')
</td>
</tr>
</table>'
;

if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1)
echo '
<form action="'
$scripturl'?action=quickmod2;topic='$context['current_topic'], '.'$context['start'], '" method="post" name="quickModForm" style="margin: 0;">';

echo '
<div class="tborder">
<table cellpadding="4" cellspacing="1" width="100%" bgcolor="#FFFFFF">
<tr>
<td valign="bottom" align="left" width="15%" class="windowbg" colspan="3" style="padding-left: 6px;">
<img src="'
$settings['images_url'], '/topic/'$context['class'], '.gif" alt="" align="middle" />
'
$txt[118], ': '$context['subject'], ' &nbsp;('$txt[641], ' '$context['num_views'], ' '$txt[642], ')
</td>
</tr>
'
;

$thisAvatar '';
$lastAvatar '';
$avatarHere true;
$count 0;

//Ad Counter
$adcounter =0;
// Get all the messages...
while ($message $context['get_message']())
{
$adcounter++;

if ($adpost show_posts($adcounter))
{

echo '<div class="post">'$adpost['type'] == $adpost['content'] : eval($adpost['content']) , '</div>';

}


// Show information about the poster of this message.
$posterData '<table width="100%" cellpadding="0" cellspacing="0">';
$posterData .= '<tr><td><b>' $message['member']['link'] . '</b></td></tr>';

// Show the member's custom title, if they have one.
if (isset($message['member']['title']) && $message['member']['title'] != '')
$posterData .= '<tr><td class="smalltext">' $message['member']['title'] . '</td></tr>';

// Show the member's primary group (like 'Administrator') if they have one.
if (isset($message['member']['group']) && $message['member']['group'] != '')
$posterData .= '<tr><td class="smalltext">' $message['member']['group'] . '</td></tr>';

// Don't show these things for guests.
if (!$message['member']['is_guest'])
{
if ($message['member']['post_group'] != '') {
$posterData .= '<tr><td class="smalltext">' $message['member']['post_group'] . '</td></tr>';
$posterData .= '<tr><td>' $message['member']['group_stars'] . '</td></tr>';
}

// Is karma display enabled?  Total or +/-?
if ($modSettings['karmaMode'] == '1')
$posterData .= '<tr><td class="smalltext">' $modSettings['karmaLabel'] . ' ' . ($message['member']['karma']['good'] - $message['member']['karma']['bad']) . '</td></tr>';
elseif ($modSettings['karmaMode'] == '2')
$posterData .= '<tr><td class="smalltext">' $modSettings['karmaLabel'] . ' +' $message['member']['karma']['good'] . '/-' $message['member']['karma']['bad'] . '</td></tr>';

// Is this user allowed to modify this member's karma?
if ($message['member']['karma']['allow'])
$posterData .= '<tr><td class="smalltext"><a href="' $scripturl '?action=modifykarma;sa=applaud;uid=' $message['member']['id'] . ';topic=' $context['current_topic'] . '.' $context['start'] . ';m=' $message['id'] . '">' $modSettings['karmaApplaudLabel'] . '</a> <a href="' $scripturl '?action=modifykarma;sa=smite;uid=' $message['member']['id'] . ';topic=' $context['current_topic'] . '.' $context['start'] . ';m=' $message['id'] . '">' $modSettings['karmaSmiteLabel'] . '</a></td></tr>';

// Show online and offline buttons?
if (!empty($modSettings['onlineEnable']) && !$message['member']['is_guest']) {
$posterData .= '<tr><td>';
if ($context['can_send_pm']) $posterData .= '<a href="' $message['member']['online']['href'] . '" title="' $message['member']['online']['label'] . '">';
if ($settings['use_image_buttons']) $posterData .= '<img src="' $message['member']['online']['image_href'] . '" alt="' $message['member']['online']['text'] . '" border="0" align="middle" />';
else $posterData .= $message['member']['online']['text'];
if ($context['can_send_pm']) $posterData .= '</a>';
if ($settings['use_image_buttons']) $posterData .= '<span class="smalltext"> ' $message['member']['online']['text'] . '</span>';
$posterData .= '</td></tr>';
}

// Show the member's gender icon?
if (!empty($settings['show_gender']) && $message['member']['gender']['image'] != '')
$posterData .= '<tr><td>' $txt[231] . ': ' $message['member']['gender']['image'] . '</td></tr>';

// Show how many posts they have made.
$posterData .= '<tr><td>' $txt[26] . ': ' $message['member']['posts'] . '</td></tr>';
}
// Otherwise, show the guest's email.
else
$posterData .= '<tr><td><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></td></tr>';
$posterData .= '</table>';

$lastAvatar $thisAvatar;
$thisAvatar = (!empty($message['member']['avatar']['image'])) ? $message['member']['avatar']['image'] : '<img src="' $settings['images_url'] . '/noavatar.gif" alt="?" width="65" height="65" />';

if (empty($settings['left_avatar_only'])) {
if ($count>&& $avatarHere) {
echo '<tr><td width="100" valign="top" align="right">'$lastAvatar'</td><td>';
} else if ($count 0) {
echo '<tr><td width="100" valign="bottom">'$posterData'</td><td>';
} else {
echo '<tr><td width="100"><img src="'$settings['images_url'], '/layout/spacer.gif" alt="" width="80" height="1" /></td><td>';
}
} else {
echo '<tr><td valign="bottom" align="right">'$posterData'<br />'$thisAvatar'</td><td>';
}

echo '<table border="0" width="100%" cellpadding="0" cellspacing="0"><tr><td class="chattopleft"><img src="'$settings['images_url'], '/layout/spacer.gif" alt="" width="32" height="9" /></td><td class="chattop" width="100%"><img src="'$settings['images_url'], '/layout/spacer.gif" alt="" height="9" /></td><td class="chattopright"><img src="'$settings['images_url'], '/layout/spacer.gif" alt="" width="32" height="9" /></td></tr><tr><td class="chatleft"><img src="'$settings['images_url'], '/layout/spacer.gif" alt="" width="32" height="1" /></td><td class="chatinside" width="100%">';

echo '<table width="100%" cellpadding="0" cellspacing="0" border="0"><tr>';
// Time of post
echo '<td class="smalltext" valign="bottom" width="1000">&#171; '$message['time'], ' &#187;</td><td align="right" valign="bottom" height="20" nowrap="nowrap" style="font-size: smaller;">';

// Can they reply?  Have they turned on quick reply?
if ($context['can_reply'] && !empty($options['display_quick_reply']))
echo '<a href="'$scripturl'?action=post;quote='$message['id'], ';topic='$context['current_topic'], '.'$context['start'], ';sesc='$context['session_id'], '" onclick="if (!currentSwap) doQuote('$message['id'], '); else window.location.href = this.href; return false;">', ($settings['use_image_buttons'] ? '<img src="' $settings['images_url'] . '/' $context['user']['language'] . '/quote.gif" alt="' $txt[145] . '" border="0" />' $txt[145]), '</a>';
// So... quick reply is off, but they *can* reply?
elseif ($context['can_reply'])
echo '<a href="'$scripturl'?action=post;quote='$message['id'], ';topic='$context['current_topic'], '.'$context['start'], ';sesc='$context['session_id'], '">', ($settings['use_image_buttons'] ? '<img src="' $settings['images_url'] . '/' $context['user']['language'] . '/quote.gif" alt="' $txt[145] . '" border="0" />' $txt[145]), '</a>';

// Can the user modify the contents of this post?
if ($message['can_modify'])
echo '<a href="'$scripturl'?action=post;msg='$message['id'], ';topic='$context['current_topic'], '.'$context['start'], ';sesc='$context['session_id'], '">', ($settings['use_image_buttons'] ? '<img src="' $settings['images_url'] . '/' $context['user']['language'] . '/modify.gif" alt="' $txt[66] . '" border="0" />' $txt[17]), '</a>';

// How about... even... remove it entirely?!
if ($message['can_remove'])
echo '<a href="'$scripturl'?action=deletemsg;topic='$context['current_topic'], '.'$context['start'], ';msg='$message['id'], ';sesc='$context['session_id'], '" onclick="return confirm(\''$txt[154], '?\');">', ($settings['use_image_buttons'] ? '<img src="' $settings['images_url'] . '/' $context['user']['language'] . '/delete.gif" alt="' $txt[121] . '" border="0" />' $txt[31]), '</a>';

// What about splitting it off the rest of the topic?
if ($context['can_split'])
echo '<a href="'$scripturl'?action=splittopics;topic='$context['current_topic'], '.0;at='$message['id'], '">', ($settings['use_image_buttons'] ? '<img src="' $settings['images_url'] . '/' $context['user']['language'] . '/split.gif" alt="' $txt['smf251'] . '" border="0" />' $txt['smf251']), '</a>';

// Show a checkbox for quick moderation?
if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == && $message['can_remove'])
echo '<input type="checkbox" name="msgs[]" value="'$message['id'], '" class="check" />';

// Show the post itself, finally!
echo '</td></tr><tr><td colspan="2"><hr width="100%" size="1" class="hrcolor" /></td></tr>';
echo '<tr><td colspan="2">'$message['body'], '</td></tr>';




// Assuming there are attachments...
if (!empty($message['attachment']))
{
echo '
<tr><td colspan="2"><hr width="100%" size="1" class="hrcolor" /></td></tr>
<tr><td colspan="2">
<div style="overflow: auto; width: 100%;">'
;

foreach ($message['attachment'] as $attachment)
{
if (isset($attachment['image']))
echo $attachment['image'], '<br />';
echo '<a href="' $attachment['href'] . '"><img src="' $settings['images_url'] . '/icons/clip.gif" align="middle" alt="*" border="0" />&nbsp;' $attachment['name'] . '</a> ('$attachment['size'], ($attachment['is_image'] ? ', ' $attachment['width'] . 'x' $attachment['height'] . ' - ' $txt['attach_viewed'] : ' - ' $txt['attach_downloaded']) . ' ' $attachment['downloads'] . ' ' $txt['attach_times'] . '.)<br />';
}

echo '</div></td></tr>';
}

// Show the member's signature?
if (!empty($settings['show_signature']) && empty($options['show_no_signatures']) && !empty($message['member']['signature']))
echo '
<tr><td colspan="2"><hr width="100%" size="1" class="hrcolor" /></td></tr>
<tr><td colspan="2">
<div style="overflow: auto; width: 100%;">'
$message['member']['signature'], '</div></td></tr>';

echo '<tr><td align="left" valign="bottom" class="smalltext" colspan="2">' . ($settings['show_modify'] && !empty($message['modified']['name']) ? '<br />&#171; <i>' $txt[211] . ': ' $message['modified']['time'] . ' ' $txt[525] . ' ' $message['modified']['name'] . '</i> &#187;' '') . '</td></tr>';
echo '<tr><td align="right" valign="bottom" class="smalltext" colspan="2">', ($context['can_report_moderator'] ? '<a href="' $scripturl '?action=reporttm;topic=' $context['current_topic'] . '.' $message['counter'] . ';msg=' $message['id'] . '">' $txt['rtm1'] . '</a>&nbsp;&nbsp;' ''), '', ($context['user']['is_admin'] && !empty($message['member']['ip']) ? '<a href="' $scripturl '?action=trackip;searchip=' $message['member']['ip'] . '"><img src="' $settings['images_url'] . '/ip.gif" alt="" border="0" /> ' $message['member']['ip'] . '</a>' '<img src="' $settings['images_url'] . '/ip.gif" alt="" border="0" /> ' $txt[511]), '</td></tr>';



echo '</table>';

if (empty($settings['left_avatar_only'])) {
if ($avatarHere) {
$avatarHere false;
echo '</td><td class="chatright"><img src="'$settings['images_url'], '/layout/spacer.gif" alt="" width="27" height="1" /></td></tr><tr><td class="chatbottomleft"><img src="'$settings['images_url'], '/layout/spacer.gif" alt="" width="27" height="23" /></td><td class="chatbottom" width="100%"><img src="'$settings['images_url'], '/layout/spacer.gif" alt="" height="23" /></td><td class="chatspeakright"><img src="'$settings['images_url'], '/layout/spacer.gif" alt="" width="27" height="23" /></td></tr></table>';
echo '</td><td width="100" valign="bottom">'$posterData'</td></tr>';
} else {
$avatarHere true;
echo '</td><td class="chatright"><img src="'$settings['images_url'], '/layout/spacer.gif" alt="" width="27" height="1" /></td></tr><tr><td class="chatspeakleft"><img src="'$settings['images_url'], '/layout/spacer.gif" alt="" width="27" height="23" /></td><td class="chatbottom" width="100%"><img src="'$settings['images_url'], '/layout/spacer.gif" alt="" height="23" /></td><td class="chatbottomright"><img src="'$settings['images_url'], '/layout/spacer.gif" alt="" width="27" height="23" /></td></tr></table>';
echo '</td><td width="100" valign="top">'$lastAvatar'</td></tr>';
}
} else {
echo '</td><td class="chatright"><img src="'$settings['images_url'], '/layout/spacer.gif" alt="" width="27" height="1" /></td></tr><tr><td class="chatspeakleft"><img src="'$settings['images_url'], '/layout/spacer.gif" alt="" width="27" height="23" /></td><td class="chatbottom" width="100%"><img src="'$settings['images_url'], '/layout/spacer.gif" alt="" height="23" /></td><td class="chatbottomright"><img src="'$settings['images_url'], '/layout/spacer.gif" alt="" width="27" height="23" /></td></tr></table>';
echo '</td></tr>';
echo '<tr><td colspan="2"><hr width="100%" size="1" class="hrcolor" /></td></tr>';
}

$count++;
}

echo '<tr>';
if (empty($settings['left_avatar_only'])) {
if ($avatarHere) echo '<td valign="top" align="right">'$thisAvatar'<td width="100%"><img src="'$settings['images_url'], '/layout/spacer.gif" alt="" width="80" height="1" /></td><td><img src="'$settings['images_url'], '/layout/spacer.gif" alt="" width="80" height="1" /></td></td>';
else echo '<td><img src="'$settings['images_url'], '/layout/spacer.gif" alt="" width="80" height="1" /></td><td width="100%"><img src="'$settings['images_url'], '/layout/spacer.gif" alt="" width="80" height="1" /></td><td valign="top">'$thisAvatar'</td>';
    }
echo '</tr>
<tr><td style="padding: 0 0 1px 0;"></td></tr>
</table>
</div>
<a name="lastPost"></a>

<table width="100%" cellpadding="3" cellspacing="0" border="0" class="tborder" style="margin-top: 1ex;">
<tr>
<td align="left" class="catbg" width="100%" height="30">
<table cellpadding="3" cellspacing="0" width="100%">
<tr>
<td>
<a name="bot"></a><b>'
$txt[139], ':</b> '$context['page_index'], ($modSettings['topbottomEnable'] ? $context['menu_separator'] . '<a href="#top">' . ($settings['use_image_buttons'] ? '<img src="' $settings['images_url'] . '/' $context['user']['language'] . '/go_up.gif" alt="' $txt['topbottom4'] . '" border="0" align="top" />' $txt['topbottom4']) . '</a>' ''), '
</td>
<td align="right" style="font-size: smaller;">'
;

$buttonArray = array();
if ($context['can_reply'])
$buttonArray[] = '<a href="' $scripturl '?action=post;topic=' $context['current_topic'] . '.' $context['start'] . ';num_replies=' $context['num_replies'] . '">' . ($settings['use_image_buttons'] ? '<img src="' $settings['images_url'] . '/' $context['user']['language'] . '/reply.gif" alt="' $txt[146] . '" border="0" />' $txt[146]) . '</a>';
if ($context['can_mark_notify'])
$buttonArray[] = '<a href="' $scripturl '?action=notify;sa=' . ($context['is_marked_notify'] ? 'off' 'on') . ';topic=' $context['current_topic'] . '.' $context['start'] . ';sesc=' $context['session_id'] . '" onclick="return confirm(\'' . ($context['is_marked_notify'] ? $txt['notification_disable_topic'] : $txt['notification_enable_topic']) . '\');">' . ($settings['use_image_buttons'] ? '<img src="' $settings['images_url'] . '/' $context['user']['language'] . '/notify.gif" alt="' $txt[131] . '" border="0" />' $txt[131]) . '</a>';

// Another special case, similar to above but reversed.  Show "add poll" unless they can't - then show unread here too.
if ($context['can_add_poll'])
$buttonArray[] = '<a href="' $scripturl '?action=post;poll;msg=' $context['topic_first_message'] . ';topic=' $context['current_topic'] . '.' $context['start'] . ';sesc=' $context['session_id'] . '">' . ($settings['use_image_buttons'] ? '<img src="' $settings['images_url'] . '/' $context['user']['language'] . '/addpoll.gif" alt="' $txt['add_poll'] . '" border="0" />' $txt['add_poll']) . '</a>';
elseif ($context['user']['is_logged'] && $settings['show_mark_read'])
$buttonArray[] = '<a href="' $scripturl '?action=markasread;sa=topic;topic=' $context['current_topic'] . '.' $context['start'] . '">' . ($settings['use_image_buttons'] ? '<img src="' $settings['images_url'] . '/' $context['user']['language'] . '/markunread.gif" alt="' $txt['mark_unread'] . '" border="0" />' $txt['mark_unread']) . '</a>';

if ($context['can_send_topic'])
$buttonArray[] = '<a href="' $scripturl '?action=sendtopic;topic=' $context['current_topic'] . '.0">' . ($settings['use_image_buttons'] ? '<img src="' $settings['images_url'] . '/' $context['user']['language'] . '/sendtopic.gif" alt="' $txt[707] . '" border="0" />' $txt[707]) . '</a>';
$buttonArray[] = '<a href="' $scripturl '?action=printpage;topic=' $context['current_topic'] . '.0" target="_blank">' . ($settings['use_image_buttons'] ? '<img src="' $settings['images_url'] . '/' $context['user']['language'] . '/print.gif" alt="' $txt[465] . '" border="0" />' $txt[465]) . '</a>';

echo implode($context['menu_separator'], $buttonArray);

echo '&nbsp;
</td>
</tr>
</table>
</td>
</tr>
</table>
<script language="JavaScript1.2" type="text/javascript"><!--'
;

if (!empty($options['display_quick_reply']))
echo '
var currentSwap = '
$options['display_quick_reply'] == 'false' 'true'';

function swapOptions()
{
document.getElementById("quickReplyExpand").src = smf_images_url + "/" + (currentSwap ? "collapse.gif" : "expand.gif");
document.getElementById("quickReplyOptions").style.display = currentSwap ? "" : "none";

currentSwap = !currentSwap;
}

setTimeout("fetchSession();", 600000);
function fetchSession()
{
document.getElementById("fetchSessionTemp").src = "'
$scripturl'?action=jsoption;sesc='$context['session_id'], ';" + (new Date().getTime());
setTimeout("fetchSession();", 600000);
}'
;
else
echo '
var currentSwap = true'
;

echo '

function doQuote(messageid)
{
if (currentSwap)
window.location.href = "'
$scripturl'?action=post;quote=" + messageid + ";topic='$context['current_topic'], '.'$context['start'], ';sesc='$context['session_id'], '";
else
{
window.open("'
$scripturl'?action=quotefast;quote=" + messageid + ";sesc='$context['session_id'], '", "quote", "toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,top=40,left=40,width=240,height=90,resizable=no;");
if (navigator.appName == "Microsoft Internet Explorer")
window.location.hash = "quickreply";
else
window.location.hash = "#quickreply";
}
}
// --></script>
<table border="0" width="100%" cellpadding="0" cellspacing="0">
<tr>'
;
if ($settings['linktree_inline'])
echo '
<td valign="top" align="left">'
theme_linktree(), '</td> ';
echo '
<td valign="top" align="right" class="smalltext"> <span class="nav"> '
$context['previous_next'], '</span></td>
</tr>
</table>
<br /><table width="100%" cellspacing="1" cellpadding="4" class="tborder"><tr><td class="catbg" >'
theme_show_mod_buttons(), '</td></tr></table>';

if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == && $context['can_remove_post'])
echo '
<input type="hidden" name="sc" value="'
$context['session_id'], '" />
</form>'
;

echo '
<table border="0" width="100%"><tr><td align="right">
<form action="'
$scripturl'" method="get" name="jumptoForm">
<span class="smalltext">' 
$txt[160] . ':</span>
<select name="jumpto" onchange="if (this.options[this.selectedIndex].value) window.location.href=\''
$scripturl'\' + this.options[this.selectedIndex].value;">
<option value="">' 
$txt[251] . ':</option>';
foreach ($context['jump_to'] as $category)
{
echo '
<option value="" disabled="disabled">-----------------------------</option>
<option value="#'
$category['id'], '">'$category['name'], '</option>
<option value="" disabled="disabled">-----------------------------</option>'
;
foreach ($category['boards'] as $board)
echo '
<option value="?board='
$board['id'], '.0"'$board['is_current'] ? ' selected="selected"' '''> ' str_repeat('=='$board['child_level']) . '=> ' $board['name'] . '</option>';
}
echo '
</select>&nbsp;
<input type="button" value="'
$txt[161], '" onclick="if (document.jumptoForm.jumpto.options[document.jumptoForm.jumpto.selectedIndex].value) window.location.href = \''$scripturl'\' + document.jumptoForm.jumpto.options[document.jumptoForm.jumpto.selectedIndex].value;" />
</form>
</td></tr></table>
<br />'
;

if ($context['can_reply'] && !empty($options['display_quick_reply']))
{
if ($context['show_spellchecking'])
echo '
<script language="JavaScript1.2" type="text/javascript" src="' 
$settings['default_theme_url'] . '/spellcheck.js"></script>';

echo '
<a name="quickreply"></a>
<table cellspacing="1" cellpadding="4" width="100%" class="tborder">
<tr>
<td colspan="2" class="catbg"><a href="javascript:swapOptions();"><img src="'
$settings['images_url'], '/'$options['display_quick_reply'] == 'collapse' 'expand''.gif" alt="+" border="0" id="quickReplyExpand" /></a> <a href="javascript:swapOptions();">'$txt['quick_reply_1'], '</a></td>
</tr>
<tr id="quickReplyOptions"'
$options['display_quick_reply'] == '' ' style="display: none"''>
<td class="windowbg" width="25%" valign="top">'
$txt['quick_reply_2'], $context['is_locked'] ? '<br /><br /><b>' $txt['quick_reply_warning'] . '</b>' '''</td>
<td class="windowbg" width="75%" align="center">
<form action="'
$scripturl'?action=post2" method="post" name="postmodify" onsubmit="submitonce(this);" style="margin: 0;">
<input type="hidden" name="topic" value="' 
$context['current_topic'] . '" />
<input type="hidden" name="subject" value="' 
$txt['response_prefix'] . $context['subject'] . '" />
<input type="hidden" name="icon" value="xx" />
<input type="hidden" name="notify" value="'
$context['is_marked_notify'] || empty($options['auto_notify']) ? '0' '1''" />
<input type="hidden" name="goback" value="'
, empty($options['return_to_post']) ? '0' '1''" />
<input type="hidden" name="num_replies" value="'
$context['num_replies'], '" />
<textarea cols="75" rows="7" style="width: 95%; height: 100px;" name="message" tabindex="1"></textarea><br />
<input type="submit" name="post" value="' 
$txt[105] . '" onclick="return submitThisOnce(this);" accesskey="s" tabindex="2" />
<input type="submit" name="preview" value="' 
$txt[507] . '" onclick="return submitThisOnce(this);" accesskey="p" tabindex="4" />';
if ($context['show_spellchecking'])
echo '
<input type="button" value="'
$txt['spell_check'], '" onclick="spellCheck(\'postmodify\', \'message\');" />';
echo '
<input type="hidden" name="sc" value="' 
$context['session_id'] . '" />
<input type="hidden" name="seqnum" value="'
$context['form_sequence_number'], '" />
</form>
</td>
</tr>
</table>'
;
if ($context['show_spellchecking'])
echo '
<form name="spell_form" id="spell_form" method="post" target="spellWindow" action="'
$scripturl'?action=spellcheck"><input type="hidden" name="spell_formname" value="" /><input type="hidden" name="spell_fieldname" value="" /><input type="hidden" name="spellstring" value="" /></form>';

echo '
</div>'
;
}

echo '<img src="'$settings['images_url'], '/blank.gif" alt="" id="fetchSessionTemp" />';
}

function 
theme_show_mod_buttons()
{
global $context$settings$options$txt$scripturl$modSettings;

$moderationButtons = array();

if ($context['can_move'])
$moderationButtons[] = '<a href="' $scripturl '?action=movetopic;topic=' $context['current_topic'] . '.0">' . ($settings['use_image_buttons'] ? '<img src="' $settings['images_url'] . '/' $context['user']['language'] . '/admin_move.gif" alt="' $txt[132] . '" border="0" />' $txt[132]) . '</a>';
if ($context['can_delete'])
$moderationButtons[] = '<a href="' $scripturl '?action=removetopic2;topic=' $context['current_topic'] . '.0;sesc=' $context['session_id'] . '" onclick="return confirm(\'' $txt[162] . '\');">' . ($settings['use_image_buttons'] ? '<img src="' $settings['images_url'] . '/' $context['user']['language'] . '/admin_rem.gif" alt="' $txt[63] . '" border="0" />' $txt[63]) . '</a>';
if ($context['can_lock'])
$moderationButtons[] = '<a href="' $scripturl '?action=lock;topic=' $context['current_topic'] . '.' $context['start'] . ';sesc=' $context['session_id'] . '">' . ($settings['use_image_buttons'] ? '<img src="' $settings['images_url'] . '/' $context['user']['language'] . '/admin_lock.gif" alt="' . (empty($context['is_locked']) ? $txt['smf279'] : $txt['smf280']) . '" border="0" />' : (empty($context['is_locked']) ? $txt['smf279'] : $txt['smf280'])) . '</a>';
if ($context['can_sticky'])
$moderationButtons[] = '<a href="' $scripturl '?action=sticky;topic=' $context['current_topic'] . '.' $context['start'] . ';sesc=' $context['session_id'] . '">' . ($settings['use_image_buttons'] ? '<img src="' $settings['images_url'] . '/' $context['user']['language'] . '/admin_sticky.gif" alt="' . (empty($context['is_sticky']) ? $txt['smf277'] : $txt['smf278']) . '" border="0" />' : (empty($context['is_sticky']) ? $txt['smf277'] : $txt['smf278'])) . '</a>';
if ($context['can_merge'])
$moderationButtons[] = '<a href="' $scripturl '?action=mergetopics;board=' $context['current_board'] . '.0;from=' $context['current_topic'] . '">' . ($settings['use_image_buttons'] ? '<img src="' $settings['images_url'] . '/' $context['user']['language'] . '/merge.gif" alt="' $txt['smf252'] . '" border="0" />' $txt['smf252']) . '</a>';
if ($context['can_remove_poll'])
$moderationButtons[] = '<a href="' $scripturl '?action=removepoll;topic=' $context['current_topic'] . '.' $context['start'] . '" onclick="return confirm(\'' $txt['poll_remove_warn'] . '\');">' . ($settings['use_image_buttons'] ? '<img src="' $settings['images_url'] . '/' $context['user']['language'] . '/admin_remove_poll.gif" alt="' $txt['poll_remove'] . '" border="0" />' $txt['poll_remove']) . '</a>';

if ($context['calendar_post'])
$moderationButtons[] = '<a href="' $scripturl '?action=post;calendar;msg=' $context['topic_first_message'] . ';topic=' $context['current_topic'] . '.0;sesc=' $context['session_id'] . '">' . ($settings['use_image_buttons'] ? '<img src="' $settings['images_url'] . '/' $context['user']['language'] . '/linktocal.gif" alt="' $txt['calendar37'] . '" border="0" />' $txt['calendar37']) . '</a>';

if ($context['can_remove_post'] && !empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1)
$moderationButtons[] = $settings['use_image_buttons'] ? '<input type="image" name="submit" src="' $settings['images_url'] . '/' $context['user']['language'] . '/delete_selected.gif" alt="' $txt['quickmod_delete_selected'] . '" onclick="return confirm(\'' $txt['quickmod_confirm'] . '\');" />' '<a href="javascript:document.quickModForm.submit();" onclick="return confirm(\'' $txt['quickmod_confirm'] . '\');">' $txt['quickmod_delete_selected'] . '</a>';

return implode($context['menu_separator'], $moderationButtons);
}

?>

TrueSatan

 I'm no use to you on themes...they're the very first thing I dump on any forum...to my mind they're endless trouble and extra work.

Good luck...you may need it.

yonimh

 good to my they do not funcioan to me in smf 1.1.2 the tapeworm in other versions worked well but in the version that I use not eh been able to make work it   
WwW.yonimh.Net Creciendo Contigo Para Entrar Click En La Imagen


MinasC

Quote from: TrueSatan on March 04, 2007, 11:01:06 AM
It took me far too long to repackage this mod...the previous version seemed to have a lot of failsafes around the display.template.php file that were causing members to have to do manual installs because they caused the package installer to fail...that should be OK now. The version for SMF 1.1.1 and 1.1.2 I've put together has several small changes to accommodate small changes in the SMF core files that would also cause the package installer to fail...it seems to be good to go and I've tested it on a clean install of SMF 1.1.2. I added a modified install file for 1.1.1 and 1.1.2 to the package.

Version for SMF 1.1.1 and 1.1.2 below

i got a Display.php test failure , any ideas ? using smf 1.1.2/tp 0.971 .

thnx !

TrueSatan

 I'm not a TP user so getting it to work in that is down to you unless somebody else can help but I've fixed the Display.template.php issue and packaged up the fix for you.

The original mod had some syntax errors in the installer...they were the problem.

MinasC

the Display.template.php didn't cause me any problem (passed the installation test along with Modifications.english.php and ModSettings.php) , it was the Display.php that returned the error . i tried to install frequency_bar v1.1a.zip but got the exact same error ! thnx for the try though , i appreciate it ! any ideas what to do ?

TrueSatan

 Do the same as you would with any such failure in the automatic installer...note the file that fails...ftp the failing file from your server to your computer...do a manual install into that file based on the details in the package...as per usual backup files and database...run the automatic installer with the failed file note and all...ignore the failure...ftp back to the server your hand modified replacement for the file on which the automatic installer failed. Nothing different from normal...

trenchteam

I installed manually following the XML files. Worked flawlessly.  The package itself gave me errors.

You can see it in action at www.shoyoroll.com/forum

trenchteam

just to let you know also TRUESATAN, in the package you have it as add after this:

// Show avatars, images, etc.?

It should be replace.  It creates double avatar insert in the display template and you have to remove one of these.

// Show avatars, images, etc.?
if (!empty($settings['show_user_images']) && empty($options['show_no_avatars']) && !empty($message['member']['avatar']['image']))
echo '
<div style="overflow: auto; width: 100%;">', $message['member']['avatar']['image'], '</div><br />';

TrueSatan

Thanks Trenchteam...you're quite right and I've packaged up a new version so as to fix that error...wacking myself in the head for making it. Rather than doing a replace though I'll keep it as an add and just remove the duplicated lines from the addition block.

This is a good mod to have available for SMF so I'll keep packaging up versions of it as needed (unless somebody else beats me to it) and if anyone wants to play with the code I hope they'll do the same.

Thanks again for spotting my silly mistake and the friendly way you responded to it.

trenchteam

no problem man. Im a friendly guy. haha.  I love this mod and glad your keeping it up to date.  ;D

steve in houston

sorry for leaving all of you hanging.

i decided not to upgrade to the new SMF version for my sports forum,
so i never remade the mod to fit it.

i have way too many mods and custom mods there to consider upgrading.

i still might download a test version to get the new updated post frequency bars,
seen here above the avatar: http://www.stucknut.com/sports/index.php/topic,15552.0.html

thanks  

kerrang!

Very nice mod.

I wished it worked with 1.1.2, but it's a really great idea.
~Kudos!

~Kerrang!
I'm my own worst enemy! :P

Css Help <--Having difficulty matching the look of the code function with the style of "quote".. =)

teamvtec

Quote from: kerrang! on April 17, 2007, 04:03:01 PM
Very nice mod.

I wished it worked with 1.1.2, but it's a really great idea.
~Kudos!

~Kerrang!

It works on 1.1.2, install the pakage 1.1b which is posted above and manually modify your CUSTOM theme

TrueSatan

Thanks teamvtec...I was just about to post much the same as you...perhaps those who add posts could point to that download from time to time so it doesn't get lost in all the other postings.

teamvtec

Quote from: TrueSatan on April 17, 2007, 04:12:49 PM
Thanks teamvtec...I was just about to post much the same as you...perhaps those who add posts could point to that download from time to time so it doesn't get lost in all the other postings.

LoL np, and it is a good idea to add the download to posts from time to time ;)

bigmohi

sorry, the display error still exist but good work guys!

TrueSatan

Quote from: bigmohi on April 17, 2007, 11:22:20 PM
sorry, the display error still exist but good work guys!

Please could you be a bit less cryptic and tell us exactly what error you have/are reporting? I can't promise you a fix but if you'll let us all know what the problem is we'll have a try at helping you.

ksawery

Quote from: steve in houston on April 06, 2007, 06:14:20 PM
i still might download a test version to get the new updated post frequency bars,
seen here above the avatar: http://www.stucknut.com/sports/index.php/topic,15552.0.html [nofollow]

I like it! Where we can download?

Advertisement: