Advertisement:

Author Topic: Next Topic Page  (Read 5018 times)

Offline SoLoGHoST

  • SMF Hero
  • ******
  • Posts: 1,792
  • Gender: Male
  • Real coders do not need to comment their code!
    • Dream Portal
Next Topic Page
« on: August 07, 2009, 01:03:30 PM »
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!

Offline Sevgiformu.com

  • Semi-Newbie
  • *
  • Posts: 93
  • Gender: Male
    • Sevgiformu.com
Re: Next Topic Page
« Reply #1 on: August 08, 2009, 05:49:32 AM »
Thank you very nice mod 1.1.X vs ?

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 67,345
    • Arantor on GitHub
Re: Next Topic Page
« Reply #2 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) and also instantly compatible on both 1.1 and 2.0.
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

You either die a hero or live long enough to see yourself become the villain. It seems you have chosen which, and now I must do the same.

Offline SoLoGHoST

  • SMF Hero
  • ******
  • Posts: 1,792
  • Gender: Male
  • Real coders do not need to comment their code!
    • Dream Portal
Re: Next Topic Page
« Reply #3 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.
« Last Edit: August 08, 2009, 09:13:14 PM by SoLoGHoST »

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 67,345
    • Arantor on GitHub
Re: Next Topic Page
« Reply #4 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.
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

You either die a hero or live long enough to see yourself become the villain. It seems you have chosen which, and now I must do the same.

Offline SoLoGHoST

  • SMF Hero
  • ******
  • Posts: 1,792
  • Gender: Male
  • Real coders do not need to comment their code!
    • Dream Portal
Re: Next Topic Page
« Reply #5 on: August 09, 2009, 10:50:52 AM »
wow, good to know.

Offline Sudhakar Arjunan

  • Sophist Member
  • *****
  • Posts: 1,225
  • Gender: Male
  • SMF is the best forum tool
    • IT Acumens - Webdesigning & Webhositing services in Chennai
Re: Next Topic Page
« Reply #6 on: December 02, 2009, 01:06:49 PM »
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

Offline Bugo

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,448
  • Gender: Male
    • dragomano on GitHub
    • @dragomano on Twitter
    • Russian translations for SMF mods
Re: Next Topic Page
« Reply #7 on: August 28, 2010, 08:18:24 AM »
Valid XHTML code (tested on SMF 2.0 RC3):
Code: [Select]
<?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>

Offline Chas Large

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,101
  • Gender: Male
  • Running 2.0.xx on Apache.
    • Chas.Large on Facebook
    • https://www.linkedin.com/in/charles-large-568ba213 on LinkedIn
    • @https://twitter.com/ on Twitter
    • Chas Large's Site
Re: Next Topic Page
« Reply #8 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.



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.

Offline SoLoGHoST

  • SMF Hero
  • ******
  • Posts: 1,792
  • Gender: Male
  • Real coders do not need to comment their code!
    • Dream Portal
Re: Next Topic Page
« Reply #9 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 :)

Offline SoLoGHoST

  • SMF Hero
  • ******
  • Posts: 1,792
  • Gender: Male
  • Real coders do not need to comment their code!
    • Dream Portal
Re: Next Topic Page
« Reply #10 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 :)

TheListener

  • Guest
Re: Next Topic Page
« Reply #11 on: December 29, 2010, 12:52:04 PM »
SG

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


Offline knagl

  • Semi-Newbie
  • *
  • Posts: 28
  • Gender: Male
    • Las Vegas Advice Message Forum
Re: Next Topic Page
« Reply #12 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?

TheListener

  • Guest
Re: Next Topic Page
« Reply #13 on: April 17, 2012, 08:10:19 PM »
It's not listed as supporting 1.1.x -- would this mod in its current state work with 1.1.16?

No.

Offline slnielsen

  • Newbie
  • *
  • Posts: 9
Re: Next Topic Page
« Reply #14 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