TinyPortal
Development => Support => Topic started by: joh87swe on May 16, 2007, 12:56:19 AM
Hi,
Here's my code of my stats box:
{
global $context, $settings, $options, $scripturl, $txt, $modSettings;
$bullet = '<img src="'.$settings['images_url'].'/TPdivider.gif" alt="" border="0" style="margin:0 2px 0 0;" />';
$bullet2 = '<img src="'.$settings['images_url'].'/TPdivider2.gif" alt="" border="0" style="margin:0 2px 0 0;" />';
echo'<tr><td valign="top"><center><div class="smalltext" style="font-family: verdana, arial, sans-serif;">';
if(isset($context['TPortal']['userbox']['stats']))
// members stats
echo '
<a href="'.$scripturl.'?action=mlist"><b>'.$txt[19].'</b></a><br>'.$bullet.$txt[488].': ' , isset($modSettings['memberCount']) ? $modSettings['memberCount'] : $modSettings['totalMembers'] , '; ';
if(isset($context['TPortal']['userbox']['stats_all']))
// more stats
echo ''.$bullet.$txt[489].': '.$modSettings['totalMessages']. '; '.$bullet. $txt[490].': '.$modSettings['totalTopics']. '; '.$bullet.$txt['tp-mostonline-today'].': '.$modSettings['mostOnlineToday'].'; '.$bullet.$txt['tp-mostonline'].': '.$modSettings['mostOnline'].' ( '.timeformat($modSettings['mostDate']).')';
if(isset($context['TPortal']['userbox']['online'])){
// add online users
echo '<br><a href="'.$scripturl.'?action=who"><b>'.$txt[158].'</b></a><br>';
$online = ssi_whosOnline('array');
echo $bullet.$txt['tp-users'].': '.$online['num_users'];
echo '; '.$bullet.$txt['tp-guests'].': '.$online['guests'];
echo '; '.$bullet.$txt['tp-total'].': '.$online['total_users'].'<br><center><div style="width: 100%; ' , $online['num_users']>14 ? 'height: 23ex;overflow: auto;' : '' ,'">';
foreach($online['users'] as $user){
echo $bullet2 , $user['hidden'] ? '<i>' . $user['link'] . '</i>' : $user['link'];
echo ' ';
}
echo '</div></center>';
}
echo '<iframe frameborder="0" height="14" src="/chat/info_embedded.php" style="width: 100%; margin: 0; padding: 0; border: 0; overflow: hidden;" scrolling="no" border="0" allowtransparency="true"></iframe>';
echo '</div></center></td><td valign="top"></td></tr></table>';
}
And it looks like this:
(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fimg157.imageshack.us%2Fimg157%2F7208%2Funtitled2ve8.jpg&hash=02b28ec3bb5492a07128775957fe0e95acfd3bbe)
The problem is that the "0 chattare i chatten" is centered in IE (I want it to be centered). But in firefor its alignement is left. I've tried to fix that but without any result.
The code of the "0 chattare i chatten" is:
echo '<iframe frameborder="0" height="14" src="/chat/info_embedded.php" style="width: 100%; margin: 0; padding: 0; border: 0; overflow: hidden;" scrolling="no" border="0" allowtransparency="true"></iframe>';
And you can see how I implemented it in the first code in the beginning.
Please how could I solve this problem? I want the "0 chattare i chatten" to be centered and that's not the case in firefox browser.
Would be awesome to solve this.
Cordially,
Johan
Noone please...
you never closed the first center statement for a start
<center>code</center>
that might fix it..
But I'd be inclined to use..
<div align="center" class="smalltext" style="font-family: verdana, arial, sans-serif;">';
so, remove this:
<center>
and insert inline
< align="center"
after the div statement.
Tank you for your replay but everything is good align except the last line "o chattare i chatten" in firefox. This code that's at the end:
echo '<iframe frameborder="0" height="14" src="/chat/info_embedded.php" style="width: 100%; margin: 0; padding: 0; border: 0; overflow: hidden;" scrolling="no" border="0" allowtransparency="true"></iframe>';
How to fix this?