Advertisement:

Author Topic: [Tip/Trick] Aligning Stats string with Recent Posts (1.x)  (Read 15019 times)

Offline Yigal

  • SMF Hero
  • ******
  • Posts: 2,703
  • Gender: Male
  • Om Nom Nom?
[Tip/Trick] Aligning Stats string with Recent Posts (1.x)
« 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:

Code: [Select]
<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:

Code: [Select]
<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 ;)
« Last Edit: August 08, 2009, 08:43:57 PM by 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

Offline N3RVE

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 8,906
  • Gender: Male
    • N3RVE.COM
Re: [Tip/Trick] Aligning Stats string with Recent Posts
« Reply #1 on: August 06, 2009, 08:49:49 PM »
Moved and indexed :).

-[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

Offline Yigal

  • SMF Hero
  • ******
  • Posts: 2,703
  • Gender: Male
  • Om Nom Nom?
Re: [Tip/Trick] Aligning Stats string with Recent Posts
« Reply #2 on: August 06, 2009, 08:54:07 PM »
Woot Woot!  Thanks :)
I'm making a couple more :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

Offline Jade Elizabeth

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 12,629
  • Gender: Female
  • Keep your enemies close and your friends closer ;)
    • jadetrainor on LinkedIn
    • @alundra on Twitter
    • Jades-World
Re: [Tip/Trick] Aligning Stats string with Recent Posts (1.x)
« Reply #3 on: August 09, 2009, 12:38:11 AM »
I require screenshots :P.
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring forum: Color Me Forum/Patreon.

Offline Yigal

  • SMF Hero
  • ******
  • Posts: 2,703
  • Gender: Male
  • Om Nom Nom?
Re: [Tip/Trick] Aligning Stats string with Recent Posts (1.x)
« Reply #4 on: August 09, 2009, 03:53:58 AM »
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