MyBB Community Forums

Full Version: Images in statistics
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

I just wanna ask how can I put an image in a table on my forum just like on the screen I made.

I want a table that will seperate txt from image.
Templates > Index Page Templates > Index and replace it with this just change the whosonline.gif, stats.gif with your image name.

<html>
<head>
<title>{$mybb->settings['bbname']}</title>
{$headerinclude}
<script type="text/javascript">
<!--
	lang.no_new_posts = "{$lang->no_new_posts}";
	lang.click_mark_read = "{$lang->click_mark_read}";
// -->
</script>
</head>
<body>
{$header}
{$forums}

		
		<table class="tborder" style="border-top: 0px none;" align="center" border="0" cellpadding="6" cellspacing="0" width="100%">
		
	
		<tbody>
			<tr>
				<td class="thead" colspan="2">
					<div class="expcolimage"><img src="{$theme['imgdir']}/collapse{$collapsedimg['online']}.gif" id="online_img" class="expander" alt="[-]" /></div>
					<strong>{$lang->online_note}</strong>
				</td>
			</tr>
		</tbody>
		<tbody style="{$collapsed['online_e']}" id="online_e">
			<tr>
				<td class="trow1"><a href="online.php"><img src="$theme[imgdir]/whosonline.gif" alt="{$lang->whos_online}" /></a></td>
				<td class="trow2" width="952">
					<div class="smallfont">
						<div style="white-space: nowrap;"><span class="smalltext">{$lang->stats_mostonline}<br />{$onlinemembers}</span></div>
						<div>
</div>
					</div>
				</td>
			</tr>
		</tbody>
		 <tbody>
			<tr>
				<td class="thead" colspan="2">
<div class="expcolimage"><img src="{$theme['imgdir']}/collapse{$collapsedimg['boardstats']}.gif" id="boardstats_img" class="expander" alt="[-]" /></div>
			  <strong><a href="stats.php">{$lang->forumstats}</a></strong>
				</td>
			</tr>
		</tbody>
		<tbody style="{$collapsed['boardstats_e']}" id="boardstats_e">  
			<tr>
				<td class="trow1"><img src="$theme[imgdir]/stats.gif" alt="{$lang->boardstats}" /></td>
				<td class="trow2" width="952"><span class="smalltext">{$lang->stats_posts_threads}<br />{$lang->stats_numusers}<br />{$lang->stats_newestuser}</span></td>
			</tr>
		</tbody>
	</table> 

<br style="clear: both" />
{$footer}
</body>
</html>
(2009-04-15, 06:56 AM)Doobie Wrote: [ -> ]Templates > Index Page Templates > Index and replace it with this just change the whosonline.gif, stats.gif with your image name.

That didn't work well, it made huse spaces between the pictures and it didn't create a table.

I will attach my index, so it would be easier to edit.

<html>
<head>
<title>{$mybb->settings['bbname']}</title>
{$headerinclude}
<script type="text/javascript">
<!--
	lang.no_new_posts = "{$lang->no_new_posts}";
	lang.click_mark_read = "{$lang->click_mark_read}";
// -->
</script>
</head>
<body>
{$header}
{$lshares}
{$forums}
{$changstats}
<br />
{$boardstats}

<dl class="forum_legend smalltext">
	<dt><img src="{$theme['imgdir']}/on.gif" alt="{$lang->new_posts}" title="{$lang->new_posts}" style="vertical-align: middle; padding-bottom: 4px;" /></dt>
	<dd>{$lang->new_posts}</dd>

	<dt><img src="{$theme['imgdir']}/off.gif" alt="{$lang->no_new_posts}" title="{$lang->no_new_posts}" style="vertical-align: middle; padding-bottom: 4px;" /></dt>
	<dd>{$lang->no_new_posts}</dd>

	<dt><img src="{$theme['imgdir']}/offlock.gif" alt="{$lang->forum_locked}" title="{$lang->forum_locked}" style="vertical-align: middle;" /></dt>
	<dd>{$lang->forum_locked}</dd>
</dl>
<br style="clear: both" />
{$footer}
<sf_shoutbox>
</body>
</html>

Regards,
kraski
That's a slightly modified index version try this way then, just change the whosonline.gif and stats.gif.

<html>
<head>
<title>{$mybb->settings['bbname']}</title>
{$headerinclude}
{$overview_headerinclude}
</head>
<body{$overview_body_onload}>
{$header}<br />
 {$overview} {$boardmsg}<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">

{$forums}
<br />
<center><a href="misc.php?action=markread">{$lang->markread}</a> &nbsp; &nbsp; <a href="showteam.php">{$lang->forumteam}</a></center>
<br />
<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->forumstats}</a></strong></div>
</td>
</tr>
</thead>
<tr>

<td class="tcat" colspan="2"><div class="expcolimage"><img src="{$theme['imgdir']}/collapse2{$collapsedimg['online']}.gif" id="online_img" class="expander" alt="[-]" /></div><strong>{$lang->whos_online}</strong> [<a href="online.php">{$lang->complete_list}</a>]</td>
</tr>
<tbody style="{$collapsed['online_e']}" id="online_e">
<tr>
<td class="trow2" style="width:30px;" align="center"><img src="$theme[imgdir]/whosonline.gif" alt="{$lang->whos_online}" /></td>
<td class="trow1"><span class="smalltext">{$lang->online_note}<br />{$onlinemembers}</span></td>
</tr>
</tbody>

{$birthdays}

<tr><td class="tcat" colspan="2"><div class="expcolimage"><img src="{$theme['imgdir']}/collapse2{$collapsedimg['boardstats']}.gif" id="boardstats_img" class="expander" alt="[-]" /></div><a href="stats.php"><strong>{$lang->boardstats}</strong></a></td></tr>
<tbody style="{$collapsed['boardstats_e']}" id="boardstats_e">
<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}
</tr>
</span>
</td>
</tr>
</tbody>
<!-- ASOIP_2_0_I -->
</table>
<table border="0" cellpadding="0" cellspacing="0" class="tfootm">
	<tr>
		<td align="left" valign="top" height="11px" width="27px"></td>
		<td height="11px" width="100%"></td>
		<td align="left" valign="top" height="11px" width="27px"></td>
	</tr>
</table>
<br />
<br />
<div align="right" style="font-size:12px">&nbsp;</div>
{$footer}
{$overview_body}
</body>
</html>
Really i dont understand nothing..
which code i have to use? Confused
(2009-04-25, 09:47 PM)alvarorojas4 Wrote: [ -> ]Really i dont understand nothing..
which code i have to use? Confused

<html>
<head>
<title>{$mybb->settings['bbname']}</title>
{$headerinclude}
{$overview_headerinclude}
</head>
<body{$overview_body_onload}>
{$header}<br />
{$overview} {$boardmsg}<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">

{$forums}
<br />
<center><a href="misc.php?action=markread">{$lang->markread}</a> &nbsp; &nbsp; <a href="showteam.php">{$lang->forumteam}</a></center>
<br />
<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->forumstats}</a></strong></div>
</td>
</tr>
</thead>
<tr>

<td class="tcat" colspan="2"><div class="expcolimage"><img src="{$theme['imgdir']}/collapse2{$collapsedimg['online']}.gif" id="online_img" class="expander" alt="[-]" /></div><strong>{$lang->whos_online}</strong> [<a href="online.php">{$lang->complete_list}</a>]</td>
</tr>
<tbody style="{$collapsed['online_e']}" id="online_e">
<tr>
<td class="trow2" style="width:30px;" align="center"><img src="$theme[imgdir]/whosonline.gif" alt="{$lang->whos_online}" /></td>
<td class="trow1"><span class="smalltext">{$lang->online_note}<br />{$onlinemembers}</span></td>
</tr>
</tbody>

{$birthdays}

<tr><td class="tcat" colspan="2"><div class="expcolimage"><img src="{$theme['imgdir']}/collapse2{$collapsedimg['boardstats']}.gif" id="boardstats_img" class="expander" alt="[-]" /></div><a href="stats.php"><strong>{$lang->boardstats}</strong></a></td></tr>
<tbody style="{$collapsed['boardstats_e']}" id="boardstats_e">
<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}
</tr>
</span>
</td>
</tr>
</tbody>
<!-- ASOIP_2_0_I -->
</table>
<br />
<br />
<div align="right" style="font-size:12px">&nbsp;</div>
{$footer}
{$overview_body}
</body>
</html>