Moving "View the most recent posts" and how it is displayed

Started by casp3r, March 31, 2008, 09:25:47 AM

Previous topic - Next topic

casp3r

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

Spaceman-Spiff

Quote from: casp3r 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

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:


      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.

Rumbaar

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

Advertisement: