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,970
  • Latest: bynw
Stats
  • Total Posts: 196,046
  • Total Topics: 21,335
  • Online today: 232
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 158
  • Total: 158

My stats block at frontpage (firefox problem)

Started by joh87swe, May 16, 2007, 12:56:19 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

joh87swe

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:


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


Zetan

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.

joh87swe

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?

This website is proudly hosted on Crocweb Cloud Website Hosting.