Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: SoLoGHoST on August 07, 2009, 01:03:30 PM

Title: Next Topic Page
Post by: SoLoGHoST on August 07, 2009, 01:03:30 PM
Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=2042)

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Facs.graphicsmayhem.com%2Fimages%2FntpShot.png&hash=d63e350102a6ed6e6d84aa444bf8f4f81b70e174)
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!
Title: Re: Next Topic Page
Post by: Sevgiformu.com on August 08, 2009, 05:49:32 AM
Thank you very nice mod 1.1.X vs ?
Title: Re: Next Topic Page
Post by: Arantor on August 08, 2009, 08:38:26 PM
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 (http://custom.simplemachines.org/mods/index.php?mod=2025)) and also instantly compatible on both 1.1 and 2.0.
Title: Re: Next Topic Page
Post by: SoLoGHoST on August 08, 2009, 09:09:22 PM
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.
Title: Re: Next Topic Page
Post by: Arantor on August 09, 2009, 09:29:45 AM
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.
Title: Re: Next Topic Page
Post by: SoLoGHoST on August 09, 2009, 10:50:52 AM
wow, good to know.
Title: Re: Next Topic Page
Post by: Sudhakar Arjunan on December 02, 2009, 01:06:49 PM
Nice work. And thanks for the detailed desc.
Title: Re: Next Topic Page
Post by: Bugo on August 28, 2010, 08:18:24 AM
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>
Title: Re: Next Topic Page
Post by: Chas Large on December 06, 2010, 02:21:10 PM
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.

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Ffc04.deviantart.com%2Fimages2%2Fi%2F2004%2F03%2F2%2Fc%2FFingers_Crossed_emoticon.gif&hash=c6748826fb835a3e90ac7139dd661531c39651ab)

Chas
Title: Re: Next Topic Page
Post by: SoLoGHoST on December 07, 2010, 03:09:29 AM
Honestly, I don't understand why it was never incorporated either.  Give me a few and will update it to RC4.

Cheers :)
Title: Re: Next Topic Page
Post by: SoLoGHoST on December 07, 2010, 03:44:33 AM
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 :)
Title: Re: Next Topic Page
Post by: TheListener on December 29, 2010, 12:52:04 PM
SG

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

Title: Re: Next Topic Page
Post by: 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?
Title: Re: Next Topic Page
Post by: TheListener on April 17, 2012, 08:10:19 PM
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.
Title: Re: Next Topic Page
Post by: slnielsen on July 16, 2017, 05:58:14 AM
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