Advertisement:

Author Topic: Moving "View the most recent posts" and how it is displayed  (Read 2631 times)

Offline casp3r

  • Jr. Member
  • **
  • Posts: 192
    • Aviation forum & gallery
Moving "View the most recent posts" and how it is displayed
« on: March 31, 2008, 09:25:47 AM »
Sorry to hijack this thread but I think my question is along the same lines. What file do I have to edit to move (or add) 'View the most recent posts on the forum.' from the 'Forum Stats' at the bottom of the home page to the top of it.

Thanks
Aviation forum & gallery
www.niaviation.co.uk

Offline Spaceman-Spiff

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,524
  • Gender: Male
Moving "View the most recent posts" and how it is displayed
« Reply #1 on: March 31, 2008, 04:18:06 PM »
Sorry to hijack this thread but I think my question is along the same lines. What file do I have to edit to move (or add) 'View the most recent posts on the forum.' from the 'Forum Stats' at the bottom of the home page to the top of it.

Thanks

You can edit index.template.php and search for "unread". You can then add a new line on the top or bottom of that code, something like:

Code: [Select]
      echo '
                        <a href="', $scripturl, '?action=recent">Recent Posts</a> <br />
                        <a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a> <br />
                        <a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a><br />';

Note that this will only show to registered users.

Imo, the "Show unread posts since last visit" and "Show new replies to your posts" are more useful than the last 10 posts.

Please start a new topic next time, as it's a different issue than the OP's.

Offline Rumbaar

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,806
  • Gender: Male
  • Inherent Omniscience
    • Rumbaar.net
Re: Moving "View the most recent posts" and how it is displayed
« Reply #2 on: April 04, 2008, 03:51:08 AM »
Where abouts, as I think that section is in the BoardIndex.template.php and you can move it to the top of where that template starts on the main index.   Or you'll need to add it to the Index.template.php file

This is the section BoardIndex.template.php
Code: [Select]
<span class="middletext">
', $context['common_stats']['total_posts'], ' ', $txt['posts_made'], ' ', $txt['in'], ' ', $context['common_stats']['total_topics'], ' ', $txt['topics'], ' ', $txt['by'], ' ', $context['common_stats']['total_members'], ' ', $txt['members'], '. ', !empty($settings['show_latest_member']) ? $txt['latest_member'] . ': <b> ' . $context['common_stats']['latest_member']['link'] . '</b>' : '', '
<br /> ' . $txt['latest_post'] . ': <b>&quot;' . $context['latest_post']['link'] . '&quot;</b>  ( ' . $context['latest_post']['time'] . ' )<br />
<a href="', $scripturl, '?action=recent">', $txt['recent_view'], '</a>', $context['show_stats'] ? '<br />
<a href="' . $scripturl . '?action=stats">' . $txt['more_stats'] . '</a>' : '', '
</span>
"An important reward for a job well done is a personal sense of worthwhile achievement."

[ Themes ]