Extremely annoying

Started by MentaL, October 21, 2009, 05:20:06 AM

Previous topic - Next topic

MentaL

So! I've recently gone back into the entire webhost thing and decided that I would start basing my website around SMF again because it's a great free forum with lots of functionallity. :P Why make things harder than what they need to be? ;)

Anyhow, currently I'm using a heavily modified version of xxnine's Dizaster! theme on my SMF and I've already started to notice a lot of .. well, errors I'd say.

The author seems to not give a damn as he's not replied to his theme's post since he created it, it seems and it's really starting to annoy me.

The errors are basically ******loads of Undefined Indexes on:
show_stats
show_who
show_buddies
num_users_online
num_guests
reklam
latest_post

Pointing towards:
forum/Themes/default/Errors.template.php (main_below sub template - eval?) on lines:
300, 290, 275, 272, 254 and 242. I've got no clue what to do and in a day it generated close to 2 million errors in the error log, resulting in a MySQL crash due to excessive data.

: [ EDIT ] :
On another note, it seems to point towards the template_main_below() function instead so I'll add it here:

function template_main_below()
{
global $context, $settings, $options, $scripturl, $txt;

echo '
</div></div></div></div>';

// Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!
echo '
<div id="dashboard_outer">
<div id="dashboard">

<div class="col3 left1">
<div class="col3_content">

<div class="col_title">', $txt[645], '</div>
<ul>
<li><img style="margin-right:5px;" src="' . $settings['images_url'] . '/on.gif" width="12" height="12" alt="' . $txt[333] . '"/>', $txt[489], ':  ', $context['common_stats']['total_posts'], ' <br /></li>
<li><img style="margin-right:5px;" src="' . $settings['images_url'] . '/on.gif" width="12" height="12" alt="' . $txt[333] . '"/>', $txt[490], ':  ', $context['common_stats']['total_topics'], '<br /></li>
<li><img style="margin-right:5px;" src="' . $settings['images_url'] . '/on.gif" width="12" height="12" alt="' . $txt[333] . '"/>', $txt[488], ':  ', $context['common_stats']['total_members'], '<br /></li>
<li><img style="margin-right:5px;" src="' . $settings['images_url'] . '/on.gif" width="12" height="12" alt="' . $txt[333] . '"/>' . $txt[659] . ': ' . $context['latest_post']['link'] . '<br /></li>
<li><img style="margin-right:5px;" src="' . $settings['images_url'] . '/on.gif" width="12" height="12" alt="' . $txt[333] . '"/>', $txt[656], ':  ', $context['common_stats']['latest_member']['link'], '<br /></li>
<li><img style="margin-right:5px;" src="' . $settings['images_url'] . '/on.gif" width="12" height="12" alt="' . $txt[333] . '"/><a href="' . $scripturl . '?action=stats">' . $txt['smf223'] . '</a></li>

</ul>

</div>
</div>

<div class="col3mid left1">
<div class="col3_content">

<div class="col_title">', $txt['reklam'] ,'</div>
<ul>
<li>', $settings['reklam_1'], '</li>
<li>', $settings['reklam_2'], '</li>
<li>', $settings['reklam_3'], '</li>
<li>', $settings['reklam_4'], '</li>
<li>', $settings['reklam_5'], '</li>
</ul>

</div>
</div>

<div class="col3 right">
<div class="col3_content">

<div class="col_title">', $txt[158], '</div>
<ul>
<li>'; echo '
', $context['show_who'] ? '<a href="' . $scripturl . '?action=who">' : '', $context['num_guests'], ' ', $context['num_guests'] == 1 ? $txt['guest'] : $txt['guests'], ', ' . $context['num_users_online'], ' ', $context['num_users_online'] == 1 ? $txt['user'] : $txt['users'];

// Handle hidden users and buddies.
if (!empty($context['num_users_hidden']) || ($context['show_buddies'] && !empty($context['show_buddies'])))
{
echo ' (';

// Show the number of buddies online?
if ($context['show_buddies'])
echo $context['num_buddies'], ' ', $context['num_buddies'] == 1 ? $txt['buddy'] : $txt['buddies'];

// How about hidden users?
if (!empty($context['num_users_hidden']))
echo $context['show_buddies'] ? ', ' : '', $context['num_users_hidden'] . ' ' . $txt['hidden'];

echo ')';
}

echo $context['show_who'] ? '</a>' : '', '
<div class="smalltext">';

// Assuming there ARE users online... each user in users_online has an id, username, name, group, href, and link.
if (!empty($context['users_online']))
echo '
', $txt[140], ':<br />', implode(', ', $context['list_users_online']);

echo '
<br />
', $context['show_stats'] && !$settings['show_sp1_info'] ? '<a href="' . $scripturl . '?action=stats">' . $txt['smf223'] . '</a>' : '', '
</div>
</li>
<li><div class="col_title">', $txt[102], '</div>
', $context['random_news_line'], '
</li>
</ul>

</div>
</div>

<div class="clearer">&nbsp;</div>

</div>
</div>
<div id="footer">

<div class="left1">
Theme created by <a href="http://www.cox.sk">Nieeru</a> for CoX.
</div>
<div class="left1">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;', theme_copyright(), '
</div>
<div class="right">
Valid <a href="http://validator.w3.org/check/referer" target="_blank"><img id="valid-xhtml10" src="', $settings['images_url'], '/valid-xhtml10.gif" alt="', $txt['valid_xhtml'], '" width="54" height="20" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>
&amp; <a href="http://jigsaw.w3.org/css-validator/check/referer" target="_blank"><img id="valid-css" src="', $settings['images_url'], '/valid-css.gif" alt="', $txt['valid_css'], '" width="54" height="20" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>
</div>

<div class="clearer">&nbsp;</div>

</div>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
function smfFooterHighlight(element, value)
{
element.src = smf_images_url + "/" + (value ? "h_" : "") + element.id + ".gif";
}
// ]]></script>
';


// The following will be used to let the user know that some AJAX process is running
echo '
<div id="ajax_in_progress" style="display: none;', $context['browser']['is_ie'] && !$context['browser']['is_ie7'] ? 'position: absolute;' : '', '">', $txt['ajax_in_progress'], '</div>
</body></html>';
}


Any help on fixing these errors would be most appreciated.

Cheers,
- MentaL

Arantor

What version of SMF are you using, does the theme support your version of SMF, what mods do you have and what language are you using?

MentaL

Using SMF 1.1.10 and the theme is compatible with 1.1.10 :P Using the English language and I'm using only using the following mods;

Previous and Next Topic Enhancement
Cavecost Captcha
Disable Decrease Post Count Option

Arantor

English or English-UTF8 ?

Let's tackle those one at a time. What's supposed to be where $txt['reklam'] is? I don't remember that string in SMF anywhere.

MentaL

Regular English mate.

The theme comes with it's own \languages\ThemeStrings.english.php and Settings.english.php containing the following:
Settings.english.php

$txt['theme_thumbnail_href'] = $settings['images_url'] . '/thumbnail.gif';
$txt['theme_description'] = 'CoX by Nieeru - Modification of xxnine';
$txt['show_top_right'] = 'Slogan Text:';
$txt['show_top_rightdesc'] = 'You Can use Html';
$txt['reklam_1'] = 'Ad 1 Text:';
$txt['reklam_1_desc'] = 'You Can use Html';
$txt['reklam_2'] = 'Ad 2 Text:';
$txt['reklam_2_desc'] = 'You Can use Html';
$txt['reklam_3'] = 'Ad 3 Text:';
$txt['reklam_3_desc'] = 'You Can use Html';
$txt['reklam_4'] = 'Ad 4 Text:';
$txt['reklam_4_desc'] = 'You Can use Html';
$txt['reklam_5'] = 'Ad 5 Text:';
$txt['reklam_5_desc'] = 'You Can use Html';


and

ThemeStrings.english.php

$txt['reklam'] = 'Links';

Arantor

Then it should work.

However you could try copying those into Modifications.english.php and seeing if that resolves it.

MentaL

Still recieving the same errors as before commenting out ThemeStrings.english.php and Settings.english.php, copying both of their contents into Modifications.english.php

I'm also noticing that it's also only able to track online users/guests on the frontpage and not in the admin page for example (Guess it's intended).

Arantor

Hmm, you're not the only one - http://www.simplemachines.org/community/index.php?topic=327857.msg2282377#msg2282377

Not really sure what to suggest to fix it though, I'm not really familiar with the theme.

I'll flag this one up as causing errors though.

MentaL

That'd be great atleast. Without the author giving support for it, it's kind of hard to use.

Advertisement: