TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,917
  • Total Topics: 21,308
  • Online today: 728
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 692
  • Total: 692

TPortal.template.php errors reported by SMF

Started by bradfrank, August 18, 2008, 04:51:58 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

bradfrank

I'm on a quest to squash all forum errors, but I cannot figure these two out. They could be related.

SMF: 1.1.5
TinyPortal v0.9.8
Theme: PDX-DK
Site URL: http://www.shinsei-guild.org

Other mods:

  • 3guks PJIRC Integrated Chat Mod 1.1
  • Coppermine Userpics 1.1
  • Fix Message Empty Error For Embed Video Mods 1.0
  • Member List Position Filter 1.0.2
  • Itemstats 1.5.1.1000
  • PM On Registration 1.0.2
  • View Single Post 2.0
  • Spoiler Tag 0.3.2
  • BBC Blizzard Quote Tag 1.0.3
  • WoW Character Profiles 1.5.1
  • YouTube BBCode 1.2
  • delete inactive users 1.0.3
  • Google Video BBC Tag (XHTML Compliant) 1.3
  • SMF 1.0.13 / 1.1.5 / 2.0 b3.1 Update 1.0
  • Custom BBCode 2.00
  • Increase/Decrease Postbox Size 1.0

The errors:
Quote2: implode() [<a href='function.implode'>function.implode</a>]: Bad arguments.
File: /homepages/8/***********/htdocs/Themes/default/TPortal.template.php (eval?)
Line: 73

8: Undefined variable: opts
File: /homepages/8/***********/htdocs/Themes/default/TPortal.template.php (eval?)
Line: 73

Investigating, I pulled up line 73 of that file:
// layout option 2 - 1 on top, 2 columns after
elseif($context['TPortal']['frontpage_layout']=='1'){
echo '
<table cellpadding="0" cellspacing="0" border="0" width="100%">';
$first=true;
$second=false;
$half=floor($end/2);
$finish=false;
} // LINE 73
// layout option 3 - single left column, multiple right column
elseif($context['TPortal']['frontpage_layout']=='2'){
echo '
<table cellpadding="0" cellspacing="0" border="0" width="100%">';
$first=true;
$second=false;
}


Since that didn't seem to offer any insights, I had to move down to line 231 to find the first instance of the $opts variable:
// ..and for views and ratings , even comments?
echo '</div><div style="text-align: right; margin-top: 1ex;">';
$opts=array();
if(isset($story['options']['views']) || $story['is_boardnews'])
$opts[] = '<span class="smalltext">' . $story['views'] . ' ' . $txt['tp-views'] . '</span>';
if(isset($story['options']['comments']) || $story['is_boardnews']){
if($story['is_boardnews'] && ($story['comments']>1 || $story['comments']==0))
$what=$txt[110];
elseif($story['is_boardnews'] && $story['comments']==1)
$what=$txt[146];
else
$what='<a href="'.$scripturl.'?page='.$story['id'].'#tp-comment">'.$txt['tp-comments'].'</a>';

$opts[] = '<span class="smalltext">' . $story['comments'] . ' ' . $what . '</span>';
}
if(isset($story['options']['rating']))
$opts[] = '<span class="smalltext">' . $txt['tp-ratingaverage'] . ' ' . ($context['TPortal']['showstars'] ? (str_repeat('<img src="'.$settings['images_url'].'/tpblue.gif" style="width: .7em; height: .7em; margin-right: 2px;" alt="" />', $story['rating_average'])) : $story['rating_average']) . ' (' . $story['rating_votes'] . ' ' . $txt['tp-ratingvotes'] . ') </span>';

                     echo implode("&nbsp;|&nbsp;",$opts);


I will gladly offer up any more information that will help me eliminate this error.
Thank you for your time and help.

G6Cad

Can you add the info according to our posting gude, especially the "other mods installed" part  :up:

bradfrank

Missing information added to original post.

This website is proudly hosted on Crocweb Cloud Website Hosting.