News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

[Tip/Trick] Aligning Stats string with Recent Posts (1.x)

Started by Yigal, August 06, 2009, 08:32:55 PM

Previous topic - Next topic

Yigal

Tip/Trick: Alligning Stats string with Recent Posts string
Description: A Simple Edit to your BoardIndex template file to align the statistics link with the Recent Posts link :)
A Note To Everyone Who Is Packaging This Edit:  I appreciate the time you are spending packaging this modification...but I give no permission for anyone to submit a package containing those codes only.  If you would like to package this, send me the .zip file and I will submit it and credit you for packaging, but that's it.
Example:
before                                                                          -                                                     after
Show Recent Posts                                                                                                          Show Recent Posts | [More Stats]
[More Stats]

---------------------------------------------------------------------
For 1.x
---------------------------------------------------------------------

BoardIndex.template.php:

Find:


<span class="middletext">
                     ', $context['common_stats']['total_posts'], ' ', $txt[95], ' ', $txt['smf88'], ' ', $context['common_stats']['total_topics'], ' ', $txt[64], ' ', $txt[525], ' ', $context['common_stats']['total_members'], ' ', $txt[19], '. ', $txt[656], ': <b> ', $context['common_stats']['latest_member']['link'], '</b>
                     <br /> ' . $txt[659] . ': <b>&quot;' . $context['latest_post']['link'] . '&quot;</b>  ( ' . $context['latest_post']['time'] . ' )<br />
                     <a href="', $scripturl, '?action=recent">', $txt[234], '</a>', $context['show_stats'] ? '<br />
                     <a href="' . $scripturl . '?action=stats">' . $txt['smf223'] . '</a>' : '', '
                  </span>


Replace with:


<span class="middletext">
                     ', $context['common_stats']['total_posts'], ' ', $txt[95], ' ', $txt['smf88'], ' ', $context['common_stats']['total_topics'], ' ', $txt[64], ' ', $txt[525], ' ', $context['common_stats']['total_members'], ' ', $txt[19], '. ', $txt[656], ': <b> ', $context['common_stats']['latest_member']['link'], '</b>
                     <br /> ' . $txt[659] . ': <b>&quot;' . $context['latest_post']['link'] . '&quot;</b>  ( ' . $context['latest_post']['time'] . ' )<br />
                     <a href="', $scripturl, '?action=recent">', $txt[234], '</a>', $context['show_stats'] ? '&nbsp;
                     <a href="' . $scripturl . '?action=stats">' . $txt['smf223'] . '</a>' : '', '
                  </span>


Just removing the break HTML tag will put those both on the same line.




Also, if someone could move this to Tips/Tricks board, that would be great ;)
Yigal V.
Contact me by PM


do yourself a favour and not annoy support helpers by spamming or messaging for support
1.x Support | 2.x Support | 5Mods

N3RVE

Ralph "[n3rve]" Otowo
Former Marketing Co-ordinator, Simple Machines.
ralph [at] simplemachines [dot] org                       
Quote"Somewhere, something incredible is waiting to be known." - Carl Sagan

Yigal

Yigal V.
Contact me by PM


do yourself a favour and not annoy support helpers by spamming or messaging for support
1.x Support | 2.x Support | 5Mods

Jade Elizabeth

Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Yigal

I'll get one asap . I'm on iPod right now...so tomorrow :P
Yigal V.
Contact me by PM


do yourself a favour and not annoy support helpers by spamming or messaging for support
1.x Support | 2.x Support | 5Mods

Advertisement: