News:

Wondering if this will always be free?  See why free is better.

Main Menu

Next Topic Page

Started by SoLoGHoST, August 07, 2009, 01:03:30 PM

Previous topic - Next topic

SoLoGHoST

Link to Mod

The image here not only shows you what this MOD does, but also describes exactly how easy this MOD was to make... as easy as 1 2 3!

Adds previous and next arrows before and after the page #'s for each topic.

Just another way to navigate through topic pages.

For Example:  Pages: << 1 ... 3 4 [5] 6 7 >>


Note: This is an extremely simple edit (YES, just 3 EDITS total), especially compared to my other MODs, created this for a user at Graphics Mayhem, and figured someone else would like to have this as well, since this option comes standard on other forum software.

I, personally, don't see a need for such a MOD, but I'm not everyone and perhaps there are others out there that will find this MOD useful.

Well, for what it's worth, ENJOY!

Sevgiformu.com

Thank you very nice mod 1.1.X vs ?

Arantor

You could add this to the master function Subs.php, making it two edits and also instantly have it available on all themes (cf. my related mod) and also instantly compatible on both 1.1 and 2.0.

SoLoGHoST

#3
Thanks Arantor, will do in next version, will also change the name to Next/Prev Page.  So, are you saying that the Subs.php function that does this hasn't changed at all in SMF 1.1.x compared to SMF 2.0.x??

Anyways, currently working on yet another MOD, so will have to wait.

Arantor

Yes, that's precisely what I'm saying - that's why Page Dropdown works fine in 1.1 and 2.0 without any changes at all.

SoLoGHoST


Sudhakar Arjunan

Nice work. And thanks for the detailed desc.
Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

Bugo

Valid XHTML code (tested on SMF 2.0 RC3):
<?xml version="1.0"?>
<!DOCTYPE modification SYSTEM "http://www.simplemachines.org/xml/modification">
<modification xmlns="http://www.simplemachines.org/xml/modification" xmlns:smf="http://www.simplemachines.org/">
<id>sologhost:nexttopicpage</id>
<version>1.1</version>

<file name="$sourcedir/Display.php">
<operation>
<search position="after"><![CDATA[// This is information about which page is current, and which page we're on - in case you don't like the constructed page index. (again, wireles..)]]></search>
<add><![CDATA[$context['prev_topic_page'] = empty($context['start']) ? '' : '<a href="' . $scripturl . '?topic=' . $topic . '.' . ($context['start'] - $context['messages_per_page']) . '" onfocus="if(this.blur())this.blur();"><img src="' . $settings['images_url'] . '/prev.png" width="9" height="8" border="0" alt="" /></a>';
$context['next_topic_page'] = $context['total_visible_posts'] <= ($context['start'] + $context['messages_per_page']) ? '' : ' <a href="' . $scripturl . '?topic=' . $topic . '.' . ($context['start'] + $context['messages_per_page']) . '" onfocus="if(this.blur())this.blur();"><img src="' . $settings['images_url'] . '/next.png" width="9" height="8" border="0" alt="" /></a>';

]]></add>
</operation>
</file>

<file name="$themedir/Display.template.php">
<operation>
<search position="replace"><![CDATA[<div class="pagesection">
<div class="nextlinks">', $context['previous_next'], '</div>', template_button_strip($normal_buttons, 'right'), '
<div class="pagelinks align_left">', $txt['pages'], ': ', $context['page_index'],]]></search>
<add><![CDATA[<div class="pagesection">
<div class="nextlinks">', $context['previous_next'], '</div>', template_button_strip($normal_buttons, 'right'), '
<div class="pagelinks align_left">', $txt['pages'], ': ', $context['prev_topic_page'], ' ', $context['page_index'], ' ', $context['next_topic_page'],]]></add>
</operation>
<operation>
<search position="replace"><![CDATA[<div class="pagesection">
', template_button_strip($normal_buttons, 'right'), '
<div class="pagelinks align_left">', $txt['pages'], ': ', $context['page_index'],]]></search>
<add><![CDATA[<div class="pagesection">
', template_button_strip($normal_buttons, 'right'), '
<div class="pagelinks align_left">', $txt['pages'], ': ', $context['prev_topic_page'], ' ', $context['page_index'], ' ', $context['next_topic_page'],]]></add>
</operation>
</file>

</modification>

Chas Large

This is a great mod and I can't think why it's not a standard part of SMF. Who uses the Previous/Next Topic links anyway?

So, please please can you make this RC4 compatible.



Chas
My Modifications :)  My Forum

Please DO NOT PM me with support requests. Post the problem in the appropriate Support Board so everyone can benefit from the advice given.

SoLoGHoST

Honestly, I don't understand why it was never incorporated either.  Give me a few and will update it to RC4.

Cheers :)

SoLoGHoST

Ok, it's ready for RC4, version 1.2.  Updated.  There might be problems with it in other themes, but looks great in SMF's default Curve Theme.

Cheers :)

TheListener

SG

The mod installed instantly on my forum which is 2.0 RC4.


knagl

It's not listed as supporting 1.1.x -- would this mod in its current state work with 1.1.16?

TheListener

Quote from: knagl on April 17, 2012, 08:08:09 PM
It's not listed as supporting 1.1.x -- would this mod in its current state work with 1.1.16?

No.

slnielsen

Any chance for an update on this mod? I'm running a site on 2.0.14 and get a warning trying to install it.

Br
Søren

Advertisement: