SimplePortal
Support => English Support => Topic started by: Mintschi on November 15, 2010, 08:56:20 PM
-
Hello,
I had the following PHP code inserted in a front page block.
It shows the recent topics perfectly but unfortunately not the "new.gif" icon.
What could be the reason for this? Under Tinyportal this code works correctly.
<?php
echo '
<table border="0" width="100%" cellspacing="1" cellpadding="4" class="bordercolor">
<tr><td colspan="3" class="titlebg">Letzte Beiträge</td></tr> ';
$what=ssi_recentTopics('10', NULL, 'array');
foreach ($what as $topic)
{
echo '
<tr>
<td class="windowbg" valign="middle">
', $topic['link'];
// Is this topic new? (assuming they are logged in!)
if (!$topic['new'] && $context['user']['is_logged'])
echo '
<a href="', $scripturl, '?topic=', $topic['topic'], '.from', $topic['new_from'], '#new"><img src="', $settings['images_url'], '/', $context['user']['language'], '/new.gif" alt="', $txt[302], '" border="0" /></a>';
echo '
</td>
<td class="windowbg2" valign="middle" width="20%">
', $topic['poster']['link'], '
</td>
<td class="windowbg2" valign="middle" width="35%">';
if ($settings['images_url'] != $settings['theme_url'] . '/images' || file_exists($settings['theme_dir'] . '/images/icons/last_post.gif'))
echo '
<a href="', $topic['href'], '"><img src="', $settings['images_url'], '/icons/last_post.gif" alt="', $txt[111], '" title="', $txt[111], '" border="0" style="float: right;" /></a>';
echo '
<span class="smalltext">
', $topic['time'], '
</span>
</td>
</tr>';
}
echo '
</table>';
?>
Mintschi
-
The easiest way to fix this is to see where the icon is supposed to be on your server. Just right click on where the icon should be and then properties. Then once you find that our, just simply move that icon to that location on your server. That should fix the problem.
-
The icon is in the correct path. As I said before, the image appears correctly under TinyPortal.
It seems there is a problem with the implementation of the code under SimplePortal?!
-
Problem solved!
The following strings on top of the code did it.
global $context, $settings, $scripturl, $txt, $db_prefix, $ID_MEMBER;
global $user_info, $modSettings, $func;