Simple Machines Community Forum

Customizing SMF => Tips and Tricks => Topic started by: Yigal on August 06, 2009, 08:32:55 PM

Title: [Tip/Trick] Aligning Stats string with Recent Posts (1.x)
Post by: Yigal on August 06, 2009, 08:32:55 PM
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 ;)
Title: Re: [Tip/Trick] Aligning Stats string with Recent Posts
Post by: N3RVE on August 06, 2009, 08:49:49 PM
Moved and indexed :).

-[n3rve]
Title: Re: [Tip/Trick] Aligning Stats string with Recent Posts
Post by: Yigal on August 06, 2009, 08:54:07 PM
Woot Woot!  Thanks :)
I'm making a couple more :P
Title: Re: [Tip/Trick] Aligning Stats string with Recent Posts (1.x)
Post by: Jade Elizabeth on August 09, 2009, 12:38:11 AM
I require screenshots :P.
Title: Re: [Tip/Trick] Aligning Stats string with Recent Posts (1.x)
Post by: Yigal on August 09, 2009, 03:53:58 AM
I'll get one asap . I'm on iPod right now...so tomorrow :P