TinyPortal

Development => Resources => Modules => Topic started by: alhaudhie on September 19, 2007, 05:30:35 AM

Title: INFO STATS
Post by: alhaudhie on September 19, 2007, 05:30:35 AM
 ;D

How can i delete this 3 line and change it with image like banner?

(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fi111.photobucket.com%2Falbums%2Fn148%2Falhaudhie%2Fline.jpg&hash=f2785b3eae7ba1e29c6d04c611e95ffb5bd785cb)

tq
Title: Re: INFO STATS
Post by: IchBin on September 19, 2007, 05:55:03 AM
Open TPortalBlocks.template.php in the default theme and search for the stats function.
function TPortal_statsbox()

Then inside that function find and delete your < hr > tags. (without the spaces in there).
Title: Re: INFO STATS
Post by: alhaudhie on September 19, 2007, 11:08:31 AM
// TPortal stats box
function TPortal_statsbox()
{
       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'<div class="smalltext" style="font-family: verdana, arial, sans-serif;">';

       if(isset($context['TPortal']['userbox']['stats']))
   // members stats
            echo '
                 <img src="'.$settings['images_url'].'/icons/members.gif" style="margin: 0;" align="bottom" alt="" />
                 <a href="'.$scripturl.'?action=mlist"><b>'.$txt[19].'</b></a>
                 <br />'.$bullet.$txt[488].': ' , isset($modSettings['memberCount']) ? $modSettings['memberCount'] : $modSettings['totalMembers'] , '
                 <br />'.$bullet.$txt['tp-latest']. ': <a href="', $scripturl, '?action=profile;u=', $modSettings['latestMember'], '"><b>', $modSettings['latestRealName'], '</b></a>';
       if(isset($context['TPortal']['userbox']['stats_all']))
   // more stats
            echo '
                  <hr /><img src="'.$settings['images_url'].'/icons/info.gif" style="margin: 0;" align="bottom" alt="" />
                 <a href="'.$scripturl.'?action=stats"><b>'.$txt['tp-stats'].'</b></a>
                 <br />'.$bullet.$txt[489].': '.$modSettings['totalMessages']. '
  <br />'.$bullet. $txt[490].': '.$modSettings['totalTopics']. '
  <br />'.$bullet.$txt['tp-mostonline-today'].': '.$modSettings['mostOnlineToday'].'
  <br />'.$bullet.$txt['tp-mostonline'].': '.$modSettings['mostOnline'].'<br />
  ('.timeformat($modSettings['mostDate']).')
  ';

I hope someone can do it for me to change the 3 line to image.
TQ
Title: Re: INFO STATS
Post by: IchBin on September 19, 2007, 11:09:38 PM
Why can you not do it?
Title: Re: INFO STATS
Post by: alhaudhie on September 20, 2007, 12:10:19 AM
 ;D

not xpert for this....
i have tried it for several times...but not succeed.
Title: Re: INFO STATS
Post by: JPDeni on September 20, 2007, 12:53:41 AM
Where is your graphic file stored?
Title: Re: INFO STATS
Post by: alhaudhie on September 20, 2007, 01:16:36 AM
/public_html/v1/themes/currentthemes/images/
Title: Re: INFO STATS
Post by: JPDeni on September 20, 2007, 02:04:57 AM
What is the URL of your graphic? You need the URL to display it. Is it in the same directory as the other images, like the icons?
Title: Re: INFO STATS
Post by: alhaudhie on September 20, 2007, 06:31:48 AM
yes... it is in the same directory...
Title: Re: INFO STATS
Post by: JPDeni on September 20, 2007, 12:30:36 PM
Okay. Replace

<hr />

with


<img src="'.$settings['images_url'].'/icons/info.gif" style="margin: 0;" align="bottom" alt="" />


Except that you'll need to change info.gif to be the name of your graphic file.

There are two more places where there is

<hr />

than in the code you posted.