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

Recent

Welcome to TinyPortal. Please login or sign up.

April 19, 2024, 04:56:46 AM

Login with username, password and session length
Members
  • Total Members: 3,885
  • Latest: Growner
Stats
  • Total Posts: 195,164
  • Total Topics: 21,219
  • Online today: 266
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 197
  • Total: 197

"recent Topic" Block "problem" - 8: Undefined variable: settings

Started by sangham.net, April 24, 2013, 07:03:18 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

IchBin

This part eval()'d code in your error means that you have some code in a custom php block that has this error in it. You need to find out which block it is, and then post the code of that block here if you don't know how to fix it.

sangham.net

Dear IchBin,

It must be in the standard "recent Topic" Block (here:), since it only happens if this block is activated.

Code ("recent Topic") Select
global $context, $modSettings, $txt;
$context['TPortal']['recentboxnum'] = '15';

if(isset($modSettings['recycle_board']))
$bb = $modSettings['recycle_board'];

$what = ssi_recentTopics($context['TPortal']['recentboxnum'], NULL, NULL, 'array');
$counter=1;
$cmax = count($what);

echo '
<div style="width: 100%; overflow: auto; height: 30ex;">';

foreach($what as $w)
{
echo '
<div class="smalltext"><a href="'.$w['href'].'">' . $w['short_subject'] . '</a></div>
<div class="smalltext">', $txt['by'], ' <b>', $w['poster']['link'], '</b></div>
<div class="smalltext">';
if(!$w['new'])
echo '<a href="'.$w['href'].'"><img border="0" src="'.$settings['images_url'].'/'.$context['user']['language'].'/new.gif" alt="new" /></a> ';

echo '['.$w['time'].']
</div>';

if($counter != $cmax)
echo '<hr />';
$counter++;
}
echo '
</div>';


Thanks for your care.

Truly! So strive to be one of them. Or like to get a random Sutta?

If you like to get involved in helping developing an "Virtual monastery" to make the internet a little more accessible for Monks, Nuns and Ascetics, please feel heartily invited to join our bilingual community at sangham.net

IchBin

Change
global $context, $modSettings, $txt;

to this:
global $context, $modSettings, $txt, $settings;

sangham.net

Everything perfect with this block and error now!

Thank you very much!

Truly! So strive to be one of them. Or like to get a random Sutta?

If you like to get involved in helping developing an "Virtual monastery" to make the internet a little more accessible for Monks, Nuns and Ascetics, please feel heartily invited to join our bilingual community at sangham.net

Freddy


sangham.net

Freddy, No doubt... somehow I thought I had to change anywhere anything special... Right in front of the eye unseen.
Thanks and sorry for not understanding the first answer rightly and causing so much other directions of thought and investigations.

Truly! So strive to be one of them. Or like to get a random Sutta?

If you like to get involved in helping developing an "Virtual monastery" to make the internet a little more accessible for Monks, Nuns and Ascetics, please feel heartily invited to join our bilingual community at sangham.net