MyBB Codes
Stats Image - Printable Version

+- MyBB Codes (http://www.mybbcodes.com)
+-- Forum: Babjusi's Previous Forum General Stuff (/forumdisplay.php?fid=42)
+--- Forum: General Support (/forumdisplay.php?fid=46)
+--- Thread: Stats Image (/showthread.php?tid=1145)


Stats Image - skiilz - 12-09-2009 09:20 AM

How do I add this image?

[Image: attachment.php?thumbnail=16435]


RE: Stats Image - babjusi - 12-09-2009 09:24 AM

I can''t view it. Can you make the screenshot a bit larger please?


RE: Stats Image - skiilz - 12-09-2009 09:26 AM

Here you go:

[Image: attachment.php?aid=45]


RE: Stats Image - babjusi - 12-09-2009 09:27 AM

Ah, I see. I will have a look later on when I come back from work and will let you know.


RE: Stats Image - skiilz - 12-09-2009 09:37 AM

Thank you.


RE: Stats Image - Rafael_mybb_import479 - 12-09-2009 10:20 AM

Try with this code:
PHP Code:[Highlight]
<tr>
    <
td colspan="6" class="tcat"><span class="smalltext"><strong>{$lang->whos_online_today}</strong> [<a href="online.php?action=today">{$lang->complete_list}</a>]</span></td>
</
tr>
<
tr>
    <
td class="tcat smalltext" align="center" width="1"><img src="{$theme['imgdir']}/any_image_you_want.png" alt="" /></td>
<
td colspan="6" class="trow1"><span class="smalltext">
Your Plugin Info</span></td>    
</
tr



RE: Stats Image - babjusi - 12-09-2009 11:15 AM

I don''t have time to try the edit posted by Rafael Light 33, but at a first glance it doesn''t seem that it will work for what you asked. ANyway, if you try it, make sure to back up your template first.

If you want to enchance the online look, try this instead.

<tr>
<td class="tcat"><img src="{$theme['imgdir']}/imagename.gif" alt="" style = "vertical-align: middle; margin: -2px 5px 0 0;"/><span class="smalltext"><strong>{$lang->whos_online}</strong> [<a href="online.php">{$lang->complete_list}</a>]</span></td>
</tr>
<tr>
<td class="trow1"><span class="smalltext">{$lang->online_note}<br />{$onlinemembers}</span></td>
</tr>

The end result it can be seen at the below screeenshot. If you want the image to appear below instead, simply place the img scr code at the second td.

You can also create a style of its own for the img at the stylesheet and then call it at the template but that would be a bit of overdone in my opinion.

Anyway, let me know how it will go. Now I have to really go to work Big Grin


RE: Stats Image - skiilz - 12-09-2009 11:42 AM

(12-09-2009 10:20 AM)Rafael Wrote:  Try with this code:
PHP Code:[Highlight]
<tr>
    <
td colspan="6" class="tcat"><span class="smalltext"><strong>{$lang->whos_online_today}</strong> [<a href="online.php?action=today">{$lang->complete_list}</a>]</span></td>
</
tr>
<
tr>
    <
td class="tcat smalltext" align="center" width="1"><img src="{$theme['imgdir']}/any_image_you_want.png" alt="" /></td>
<
td colspan="6" class="trow1"><span class="smalltext">
Your Plugin Info</span></td>    
</
tr

Didn't work.
I want to do something like this:
[attachment=47]



I used this code:
<tr>
<td class="tcat"><span class="smalltext"><strong>{$lang->whos_online}</strong> [<a href="online.php">{$lang->complete_list}</a>]</span></td>
</tr>
<tr>
<td class="trow1"><td class="tcat"><img src="images/avatar.png" /></td><span class="smalltext">{$lang->online_note}<br />{$onlinemembers}</span></td>
</tr>

And look what I got:
[attachment=48]


RE: Stats Image - babjusi - 12-09-2009 01:23 PM

I keep forgetting that you are using a custom theme. The code I posted above it will work with the default theme.

Can you post here the code of index_whosonline template from your custom theme?


RE: Stats Image - skiilz - 12-09-2009 02:38 PM

I use default theme...


RE: Stats Image - babjusi - 12-09-2009 02:50 PM

Try this. It works as shown at the attached screenshot.

<tr>
<td class="tcat"><span class="smalltext"><strong>{$lang->whos_online}</strong> [<a href="online.php">{$lang->complete_list}</a>]</span></td>
</tr>
<tr>
<td class="trow1"><img src="{$theme['imgdir']}/imagename.gif" alt = "" style = "vertical-align: middle; margin: -2px 5px 0 0;"/><span class="smalltext">{$lang->online_note}<br /><br />{$onlinemembers}</span></td>
</tr>

P.s. Can you link me to the theme that you saw this so I can get a better look and understanding?


RE: Stats Image - roger - 12-09-2009 05:32 PM

This looks cool. I had it at my Ipb forum and now I added it at my MyBB forum too. Thanx for asking for it light33 and thanx babjusi for the code.


RE: Stats Image - skiilz - 12-09-2009 09:57 PM

Here is the site babjusi: http://exorth.com/forums.php

Here is one of the code that is used to add the image to the left:
<tbody id="collapse" style="">
    <tr>
        <td class="alt2"><a href="IINDEX.PHP"><img src="IMAGE.GIF" alt="IMG" border="0" /></a></td>
        <td class="alt1" width="100%">
            <div class="smallfont">
                <div style="white-space: nowrap">CONTENT</div>
                </div>
        </td>
    </tr>
</tbody>



RE: Stats Image - babjusi - 12-10-2009 09:09 AM

(12-09-2009 09:57 PM)Light33 Wrote:  Here is the site babjusi: http://exorth.com/forums.php

Here is one of the code that is used to add the image to the left:
<tbody id="collapse" style="">
    <tr>
        <td class="alt2"><a href="IINDEX.PHP"><img src="IMAGE.GIF" alt="IMG" border="0" /></a></td>
        <td class="alt1" width="100%">
            <div class="smallfont">
                <div style="white-space: nowrap">CONTENT</div>
                </div>
        </td>
    </tr>
</tbody>

Ah, I see, a vb feature. Well, if you do that at the online part then you must do it at the stats as well in order to get it in propotion, like it was at that forum. And that will require more changes to the other templates.


RE: Stats Image - skiilz - 12-10-2009 12:14 PM

Yes.. vB.
I tried with this code:
<tr>
<td class="tcat" width="100%"><span class="smalltext"><strong>{$lang->whos_online}</strong> [<a href="online.php">{$lang->complete_list}</a>]</span></td>
</tr>
<tr>
<tr><td class="tcat" align="left"><img src="images/affiliates.png" valign="middle" alt="*" border="0" /></td>
<td class="trow1" align="left">
<div class="smallfont">
<div>{$lang->online_note}<br />{$onlinemembers}</div>
</div></td></tr>
<th class="tcat" width="100%"><span class="smalltext">UserGroup Legend</th>
</tr>
<tr>
<td class="trow1" valign="top" align="left" width="100%"><span class="smalltext">
<span style="color: blue;"><strong>Administrators</strong></span> •
<span style="color: green;"><strong>Global Moderators</strong></span> •
<span style="color: red;"><strong>Sectional Moderators</strong></span> •
<span style="color: black;"><strong>Veteran</strong></span> •
<span style="color: purple;"><strong>Donators</strong></span> •
<span style="color: orange;"><strong>RSS Bot</strong></span></tr>

And look what I got:
[attachment=55]
I'm trying to align the other tables and will be fine.


RE: Stats Image - babjusi - 12-10-2009 01:18 PM

It looks like a bit overdone in my opinion. ALl you have to do is the img code inside another <td <td> tags. Atm I don''t have much free time to look deeper into this. But keep me updated.

Also, you must adjust the stats templates to have a symetrical stats area.


RE: Stats Image - skiilz - 12-10-2009 01:26 PM

<tr>
<td class="tcat" width="100%"><span class="smalltext"><strong>{$lang->whos_online}</strong> [<a href="online.php">{$lang->complete_list}</a>]</span></td>
</tr>
<tr>
<tr><td class="tcat" align="left"><td><img src="images/affiliates.png" valign="middle" alt="*" border="0" /></td></td>
<td class="trow1" align="left">
<div class="smallfont">
<div>{$lang->online_note}<br />{$onlinemembers}</div>
</div></td></tr>

With the image into another <td></td>:
[attachment=57]


RE: Stats Image - babjusi - 12-10-2009 01:30 PM

You are adding un-necccessary divs and tr''s at the code. But as I said above, in order for this to appear in proper semetry, he stats templates must be adjusted too. Just like with that rss feed button we did.

P.s. Personally I don''t see the point in addin one of vb features or the like. try the other code I gave you, it is more original btw.


RE: Stats Image - skiilz - 12-10-2009 01:36 PM

I like so much this feature can you help me code the changes for the vB feature?
When you have time can post the code?
Thank you.


RE: Stats Image - babjusi - 12-10-2009 01:48 PM

To be honest I ain''t too keen on doing something cos vb has it.

http://community.mybboard.net/thread-59036.html


RE: Stats Image - skiilz - 12-10-2009 02:07 PM

Ok. Leave this like it is now.
But it isn't just because vB have... It's because I like and the forum would have better look!


RE: Stats Image - babjusi - 12-14-2009 05:14 PM

Have a look at the bottom of this forum here. Did you mean something like that?


RE: Stats Image - skiilz - 12-14-2009 06:22 PM

EXACTLY WHAT I WANT!!!
AWESOME!!


RE: Stats Image - babjusi - 12-15-2009 06:44 AM

Ok, cos I wanted to make sure that that is what you wanted.

Can you copy/paste here the contents of the following templates:

index_boardstats, index_stats and index_whosonline.


RE: Stats Image - skiilz - 12-15-2009 07:36 AM

index_boardstats
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<thead>
<tr>
<td class="thead">
<div class="expcolimage"><img src="{$theme['imgdir']}/collapse{$collapsedimg['boardstats']}.gif" id="boardstats_img" class="expander" alt="[-]" title="[-]" /></div>
<div><strong>{$lang->boardstats}</strong></div>
</td>
</tr>
</thead>
<tbody style="{$collapsed['boardstats_e']}" id="boardstats_e" >
{$whosonline}
{$todays_top_posters}
{$birthdays}
{$forumstats}<!-- ASOI_3_I_B -->
<tr>
    <td class="tfoot" style="text-align: right">
        <span class="smalltext">
            {$logoutlink}
            <a href="misc.php?action=markread">{$lang->markread}</a> |
            <a href="showteam.php">{$lang->forumteam}</a> |
            <a href="stats.php">{$lang->forumstats}</a>
        </span>
    </td>
</tr>
</tbody>
</table>
<br />

index_stats
<script type='text/javascript'>
function showstats()
{
if (document.getElementById('stats').style.display == 'none')
{
document.getElementById('stats').style.display='table-row';
}
else
{
document.getElementById('stats').style.display='none';
}
}
</script>
<tr ><td class="tcat" c><span class="smalltext"><strong>{$lang->boardstats}</strong> [<a style='cursor:pointer'onClick='showstats()'>Show/Hide</a>]</span></td></tr>
<tr id='stats'>
<td class="trow1"><span class="smalltext">
{$lang->stats_posts_threads}<br />
{$lang->stats_numusers}<br />
{$lang->stats_newestuser}<br />
{$lang->stats_mostonline}
</span>
</td>
</tr>

index_whosonline
<tr>
<td class="tcat"><span class="smalltext"><strong>{$lang->whos_online}</strong> [<a href="online.php">{$lang->complete_list}</a>]</span></td>
</tr>
<tr>
<td class="trow1"><span class="smalltext">{$lang->online_note}<br />{$onlinemembers}</span></td>
</tr>
<th class="tcat" width="100%"><span class="smalltext">UserGroup Legend</th>
</tr>

Legends Group Smile (all this code goes under the index_whosonline latest </tr>)

<tr>
<td class="trow1" valign="top" align="left" width="100%"><span class="smalltext">
<span style="color: blue;"><strong>Administrators</strong></span> •
<span style="color: green;"><strong>Global Moderators</strong></span> •
<span style="color: red;"><strong>Sectional Moderators</strong></span> •
<span style="color: black;"><strong>Veteran</strong></span> •
<span style="color: purple;"><strong>Donators</strong></span> •
<span style="color: orange;"><strong>RSS Bot</strong></span></tr>



RE: Stats Image - babjusi - 12-15-2009 07:38 AM

Replace your index_whosonline template with the following:

<tr>
<td class="tcat" colspan="2"><strong>{$lang->whos_online}</strong> [<a href="online.php">{$lang->complete_list}</a>]</td>
</tr>
<tr>
<td class="trow2" style="width:30px;" align="center"><img src="$theme[imgdir]/online.gif" alt="{$lang->whos_online}" /></td>
<td class="trow1"><span class="smalltext">{$lang->online_note}<br />{$onlinemembers}</span></td>
</tr>

And name your image online.gif and upload it to your images directory.

Next replace your index__stats template with the following:

<tr>
<td class="tcat" colspan="2"><a href="stats.php"><strong>{$lang->boardstats}</strong></a></td>
</tr>
<tr>
<td class="trow2" style="width:30px;" align="center"><img src="$theme[imgdir]/stats.gif" alt="{$lang->boardstats}" /></td>
<td class="trow1"><span class="smalltext">
{$lang->stats_posts_threads}<br />
{$lang->stats_numusers}<br />
{$lang->stats_newestuser}<br />
{$lang->stats_mostonline}
</span>
</td>
</tr>

And name your image stats.gif and upload it to your images directory.

And as last but not least, replace your index_boardstats template with the following:

<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<thead>
<tr>
<td class="thead" colspan="2">
<div><strong><a href="stats.php">{$lang->boardstats}</a></strong></div>
</td>
</tr>
</thead>
{$whosonline}
{$birthdays}
{$forumstats}
</table>
<br />

The end result can be seen at the attached screenshot below as I removed it from here.

Let me know how it will go. And don''t forget to readd your custom group legend code as well.


RE: Stats Image - skiilz - 12-15-2009 08:08 AM

Look what I got:
[attachment=82]


RE: Stats Image - babjusi - 12-15-2009 08:20 AM

Did you make the changes properly cos it works fine as shown at the image I atatched above. I just doubled checked and again it worked ok.

P.s. And as I said above, if you have custom changes made to those templates, you will have to first undo them and then redo them again.


RE: Stats Image - skiilz - 12-15-2009 08:36 AM

Codes that I used:
index_whosonline
<tr>
<td class="tcat" colspan="2"><strong>{$lang->whos_online}</strong>[<a href="online.php">{$lang->complete_list}</a>]</td>
</tr>
<tr>
<td class="trow2" style="width:30px;" align="center"><img src="$theme[imgdir]/online.png" alt="online" /></td>
<td class="trow1"><span class="smalltext">{$lang->online_note}<br />{$onlinemembers}</span></td>
</tr>

index_boardstats:
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<thead>
<tr>
<td class="thead" colspan="2">
<div class="expcolimage"><img src="{$theme['imgdir']}/collapse{$collapsedimg['boardstats']}.gif" id="boardstats_img" class="expander" alt="[-]" title="[-]" /></div>
<div><strong>{$lang->boardstats}</strong></div>
</td>
</tr>
</thead>
<tbody style="{$collapsed['boardstats_e']}" id="boardstats_e" >
{$whosonline}
{$todays_top_posters}
{$birthdays}
{$forumstats}<!-- ASOI_3_I_B -->
<tr>
    <td class="tfoot" style="text-align: right">
        <span class="smalltext">
            {$logoutlink}
            <a href="misc.php?action=markread">{$lang->markread}</a> |
            <a href="showteam.php">{$lang->forumteam}</a> |
            <a href="stats.php">{$lang->forumstats}</a>
        </span>
    </td>
</tr>
</tbody>
</table>
<br />

index_stats:
<script type='text/javascript'>
function showstats()
{
if (document.getElementById('stats').style.display == 'none')
{
document.getElementById('stats').style.display='table-row';
}
else
{
document.getElementById('stats').style.display='none';
}
}
</script>
<tr ><td class="tcat" colspan="2"><span class="smalltext"><strong>{$lang->boardstats}</strong> [<a style='cursor:pointer'onClick='showstats()'>Show/Hide</a>]</span></td></tr>
<tr id='stats'>
<td class="trow2" style="width:30px;" align="center"><img src="$theme[imgdir]/stats.gif" alt="{$lang->boardstats}" /></td>
<td class="trow1"><span class="smalltext">
{$lang->stats_posts_threads}<br />
{$lang->stats_numusers}<br />
{$lang->stats_newestuser}<br />
{$lang->stats_mostonline}
</span>
</td>
</tr>



RE: Stats Image - babjusi - 12-15-2009 09:14 AM

@skiilz, replace all the codes at the 3 templates I mentioned above with the codes of my previous post. I mean everything. Then readd your custom edits. it works 100%, as you saw t yourself yesterday when I had the edits made here.


RE: Stats Image - skiilz - 12-15-2009 03:56 PM

I saw.. I'll do it.
Worked now.
Thank you.

But now I have this problem...
This plugin:
[attachment=83]

Plugin Name: ASOI
Do you know how do I change this?


RE: Stats Image - babjusi - 12-15-2009 05:45 PM

(12-15-2009 03:56 PM)skiilz Wrote:  I saw.. I'll do it.
Worked now.
Thank you.

But now I have this problem...
This plugin:


Plugin Name: ASOI
Do you know how do I change this?

For other plugins you must ask at their support topics as I am not familiar with them.


RE: Stats Image - blazingprofits - 01-01-2010 04:40 AM

cant view the picture.. too small =/


RE: Stats Image - php4pro - 05-25-2010 07:27 PM

same thing here picture too small