Customizing SMF > Graphics and Templates

My stats is not where they need to be

(1/2) > >>

Antes:
I was working on new style preparing my site to move from vBulletin, i made small mistake ( i think ) now my stat area not in the place where it needs to be. Still trying to figure out where i did wrong.
Here is my code (Simplified with new templates)



--- Code: ---function template_info_center()
{
global $context, $settings, $options, $txt, $scripturl, $modSettings;

// Here's where the "Info Center" starts...
echo '
<span class="clear upperframe"><span></span></span>
<div class="roundframe">
<div class="innerframe">
<div class="cat_bar">
<h3 class="catbg">
<img class="icon" id="upshrink_ic" src="', $settings['images_url'], '/collapse.gif" alt="*" title="', $txt['upshrink_description'], '" style="display: none;" />
', sprintf($txt['info_center_title'], $context['forum_name_html_safe']), '
</h3>
</div>
<div id="upshrinkHeaderIC"', empty($options['collapse_header_ic']) ? '' : ' style="display: none;"', '>';
require("SSI.php");
ssi_recentTopics($num_recent = 8, $exclude_boards = null, $include_boards = null, $output_method = 'echo');


echo '<div class="statleft">';
loadTemplate('statleft');
echo '</div>
<div class="statright">';
loadTemplate('statright');
echo '
</div>
</div></div>
</div>
 <span class="lowerframe"><span></span></span>';
--- End code ---


CSS

--- Code: ---.statleft
{
width: 33%;
float: left;
padding-left: 9px;
height: 31px;
margin-bottom: 1px;
}
.statright
{
width: 64%;
float: right;
padding-left: 9px;
padding-right: 9px;
height: 31px;
margin-bottom: 1px;
}
--- End code ---

Antes:
I think i can bump it :)

Runic:
antes do you still need help with this.?have you tried making the bottom margin larger than 1px?

Antes:
No, i changed my stat style bit, and <br class="clear"> solved lot of problem, but the problem is (if its ok for you)

http://www.mmobrowser.com/new-forum/

Again i failed to make it right, i don't know what is wrong but i can't make it fit.


--- Code: --- require("SSI.php");
$array = ssi_recentTopics( $num_recent = 5, $exclude_boards = 32, $include_boards = null, $output_method = 'array' );

echo '
<div class="floatleft">
<table>
<tr class="titlebg">
<td>Latest Topics</td>
<td>Board</td>
</tr>';

foreach ($array as $post)
{
echo '
<tr>
<td style="padding-left:0.7em"><a href="',$post['href'],'">',$post['short_subject'],'</a></td>
<td style="padding-left:0.7em">',$post['board']['link'],'</td>
</tr>';
}
echo '
</table>
</div>';

$array = ssi_topPoster($topNumber = 5, $output_method = 'array');

echo '
<div class="floatleft">
<table>
<tr class="titlebg">
<td>Member</td>
<td>Post</td>
</tr>';
foreach ($array as $return)
{
echo '
<tr>
<td style="padding-left:0.7em">',$return['link'],'</td>
<td style="padding-left:0.7em">',$return['posts'],'</td>
</tr>';
}
echo '
</table>
</div>';

$array = ssi_topBoards($num_top = 5, $output_method = 'array');
echo '
<div class="floatleft">
<table>
<tr class="titlebg">
<td>Board</td>
<td>Topics</td>
<td>Post</td>';
foreach ($array as $boards)
{
echo '
<tr>
<td style="padding-left:0.7em">',$boards['link'],'</td>
<td style="padding-left:0.7em">',$boards['num_topics'],'</td>
<td style="padding-left:0.7em">',$boards['num_posts'],'</td>
</tr>';
}
echo '
</table>
</div>';

$array = ssi_topTopics($type = 'replies', $num_topics = 5, $output_method = 'array');
echo '
<div class="floatleft">
<table>
<tr class="titlebg">
<td>Topic</td>
<td>Replies</td>
<td>Views</td>';
foreach ($array as $topics)
{
echo '
<tr>
<td style="padding-left:0.7em">',$topics['link'],'</td>
<td style="padding-left:0.7em">',$topics['num_replies'],'</td>
<td style="padding-left:0.7em">',$topics['num_views'],'</td>';
}
echo '
</table>
</div>
<div class="floatleft">
<table>
<tr class="titlebg">
<td>', $txt['forum_stats'], '</td>
</tr>
<tr>
<td style="padding-left:0.7em">
Total Posts: ', $context['common_stats']['total_posts'], '<br />
Total Topics: ', $context['common_stats']['total_topics'], '<br />
Total Members: ', $context['common_stats']['total_members'], '<br />
Latest Member: ' . $context['common_stats']['latest_member']['link'] . '<br />
<a href="', $scripturl, '?action=recent">', $txt['recent_view'], '</a>', $context['show_stats'] ? '<br />
<a href="' . $scripturl . '?action=stats">' . $txt['more_stats'] . '</a>' : '', '
</td>
</tr>
</table>
</div>
<br class="clear" />';
--- End code ---

Any tutorial can you show me ?

Runic:
no tutorial im afraid

can you post all relevant code from css and  boardindex.template.php

thanks

Navigation

[0] Message Index

[#] Next page

Go to full version