News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Last Post From Previous Page

Started by dougiefresh, March 31, 2016, 05:11:47 PM

Previous topic - Next topic

dougiefresh

Link to Mod



LAST POST FROM PREVIOUS PAGE v1.7
By Dougiefresh -> Link to Mod



Introduction
This mod makes changes to the forum so that the last post from the previous page in that thread is displayed as the first post on the next page.  So if the forum only shows 10 posts per page, then page 1 has 10 posts (posts 1 thru 10), the page 2 and above will have 11 (posts 10 thru 20, 20 thru 30, etc)....

Admin Settings
There are 5 new settings under Admin -> Configuration -> Modification Settings.  They are:
o Show last post from previous page
o Dim last post from previous page by
o Undim the post by hovering the cursor over it?
o Remove images in last post from previous page?
o Remove functionality from last post from previous page?

Related Discussions
o Last post on each page (Original Request)
o Last post on each page (Split Topic)

Translations Courtsey of:
o French UTF8 translation by TourFL
o Portuguese Brazilian translations by DSystem
o Spanish Latin translations by Rock Lee [BC]

Compatibility Notes
This mod was tested on SMF 2.0.11 and SMF 2.1 RC2, but should work on SMF 2.0 and up.  SMF 1.x is not and will not be supported. 

Changelog
The changelog can be viewed at XPtsp.com.

License
Copyright (c) 2016 - 2019, Douglas Orend
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Biology Forums

Yet another feature that should be included as a stock forum option...

Congratulations ;)

-Rock Lee-

I took a few minutes to realize the change and how it works, really good change :-) bravo for the effort but I have one question to give the translation the "dim" and investigare :-P


Regards!
¡Regresando como cual Fenix! ~ Bomber Code
Ayudas - Aportes - Tutoriales - Y mucho mas!!!

Steve

I originally posted this in the mod request thread then thought it might be better here.


Cool beans on the approved mod!

I should have been more specific in my suggestion about image links. While what you did works fine and I'm happy to have it as is, I was thinking this:

[url=url of first image]Image 1[/url]

[url=url of first image]Image 2[/url]

[url=url of first image]Image 3[/url]

etc.
DO NOT pm me for support!

dougiefresh

Uploaded v1.2 - March 31th, 2016
o Added support for SMF 2.0.x's Core template.
o Added support for SMF 2.1 Beta 2.
o Changed remove picture code to create numbered URL links instead of changing image IMGs into URLs.




@Steve: Your request has been implemented in version 1.2.  Thank you for explaining precisely what you wanted!

Quote from: Steve on March 31, 2016, 06:03:00 PM
[url=url of first image]Image 2[/url]
[url=url of first image]Image 3[/url]
O:) I hope you meant:
[url=url of SECOND image]Image 2[/url]
[url=url of THIRD image]Image 3[/url]

Steve

Quote from: dougiefresh on March 31, 2016, 07:08:54 PMO:) I hope you meant:
[url=url of SECOND image]Image 2[/url]
[url=url of THIRD image]Image 3[/url]

Oopsie! Yep, that's what I meant of course. Thanks so much Dougie. ;D
DO NOT pm me for support!

Steve

Unfortunately, there's an issue when there is more than one image. I put two images in the last post of a page and the first post of the next page gave me this:

Second image test: [img]url of image][ Image 1 ]
DO NOT pm me for support!

dougiefresh

Quote from: Steve on March 31, 2016, 07:49:58 PM
Unfortunately, there's an issue when there is more than one image. I put two images in the last post of a page and the first post of the next page gave me this:

Second image test: [img]url of image][ Image 1 ]
:o Oh, regular expressions give me the worst headaches....  It worked for one image, and I assumed it would work for more than one.  I'll look into the issue....

Steve

DO NOT pm me for support!

dougiefresh

Uploaded v1.3 - April 1st, 2016
o Fixed remove picture code to properly change multiple IMG tags to URL tags.

DSystem

Another translation ...

Português Brazil


DSystem

The activated this option in the profile:

Show most recent posts at the top.

The post is shown in the wrong place.

-Rock Lee-

I had some doubts with a translation of "dim" now I leave the translation investigate :D

index.spanish_latin.php

$txt['post_from_previous_page'] = 'de la página anterior';

index.spanish_latin-utf8.php

$txt['post_from_previous_page'] = 'de la página anterior';


ManageSettings.spanish_latin.php

$txt['LPOEP_show_last_post'] = '¿Mostrar último mensaje de la página anterior?';
$txt['LPOEP_dim_css'] = 'Oscurecer &uacuteltimo mensaje de la p&aacute;gina anterior por:<div class="smalltext">Use <strong>0</strong> para deshabilitar esta opci&oacute;n.</div>';
$txt['LPOEP_undim_hover'] = '¿Aclarar el tema, con solo pasar el cursor sobre &eacute;l?';
$txt['LPOEP_remove_images'] = '¿Eliminar im&aacute;genes en el tema anterior de la p&aacute;gina anterior?';
$txt['LPOEP_remove_function'] = '¿Retirar la funcionalidad del &uacuteltimo mensaje de la p&aacute;gina anterior?<div class="smalltext">Los ejemplos incluyen citar, respuesta, borrado, etc.</div>';


ManageSettings.spanish_latin-utf8.php
$txt['LPOEP_show_last_post'] = '¿Mostrar último mensaje de la página anterior?';
$txt['LPOEP_dim_css'] = 'Oscurecer último mensaje de la página anterior por:<div class="smalltext">Use <strong>0</strong> para deshabilitar esta opción.</div>';
$txt['LPOEP_undim_hover'] = '¿Aclarar el tema, con solo pasar el cursor sobre él?';
$txt['LPOEP_remove_images'] = '¿Eliminar imágenes en el tema anterior de la página anterior?';
$txt['LPOEP_remove_function'] = '¿Retirar la funcionalidad del último mensaje de la página anterior?<div class="smalltext">Los ejemplos incluyen citar, respuesta, borrado, etc.</div>';



And also I leave you hope files are well

Regards!
¡Regresando como cual Fenix! ~ Bomber Code
Ayudas - Aportes - Tutoriales - Y mucho mas!!!

dougiefresh

Uploaded v1.4 - April 1st, 2016
o Fixed post sorting issue with "Show most recent posts at the top" option checked.
o Added Portuguese Brazilian translations by DSystem.
o Added Spanish Latin translations by Rock Lee [BC].




@DSystem and @Rock Lee [BC]: Thank you for the translations!  They have been included in version 1.4!

Quote from: DSystem on April 01, 2016, 09:19:07 AM
The activated this option in the profile:

Show most recent posts at the top.

The post is shown in the wrong place.
I've fixed this particular bug report in version 1.4!  Thank you for reporting it!

Steve

Works a treat now. Can't thank you enough! ;D
DO NOT pm me for support!

aegersz

occasionally the original post on the previous page ALSO gets greyed out also when I set the dimming on.

The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

dougiefresh

Quote from: aegersz on March 06, 2017, 12:03:34 AM
occasionally the original post on the previous page ALSO gets greyed out also when I set the dimming on.
I'll look into it.

dougiefresh

@aegersz:  I apologize for the latest of my reply.  Things got rather hectic in my life.....

Regarding your bug report, I can't see where the code might be producing the bug report you provided....  Can you be more specific on the circumstances where it happens?  Maybe even a admin credentials (via PM) and a link?

aegersz

The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

Steve

Does one need an account to look at that link or did you pm creds to him?
DO NOT pm me for support!

aegersz

do you mind registering?

I will remove you afterwards if you wish.

or shall I copy it to a public area ? I'd rather not but it's your call.
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

dougiefresh

@aegersz:  PM sent.  Still can't duplicate the bug report....

@Steve:  Yeah, one needs an account in order to view the topic linked to.

aegersz

you are an administrator for a while, dougie
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

dougiefresh

@aegersz:  PM Sent.  I've looked around your forum and I don't see anything that sticks out as a problem.  Can you attach your Sources/Display.php and Themes/Default/Display.template.php files so that maybe I can see what is going on with them?  Thanks!  (I'm going to bed now)

aegersz

sorry about the delay but they are now attached. Thanks for taking the time.
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

dougiefresh

Uploaded v1.5 - July 28th, 2017
o Added support for SMF 2.1 Beta 3.
o Removed support for SMF 2.1 Beta 1 and 2.
o Moved one section of code ahead by a few lines.
o Capped max dimming to 90% opacity, as opposed to 100% in previous versions.




@aegersz:  I still can't see any obvious reason for the bug report....  I made a few changes which MAY solve the issue, but it is impossible for me to know since I can't duplicate it, nor can I figure out the why your bug report happens....  Let me know if this update fixes the issue.  Thanks for the report!

Steve

There's a problem Dougie. When I go into a board and click on a 'new' indicator for any thread that has new responses, I'm taken to the top of the last page instead of the new posts.

I reinstalled v1.4 and it works correctly.
DO NOT pm me for support!

dougiefresh

Removed version 1.5 and reupped version 1.4 as the downloadable mod version....  (Sigh)

aegersz

another clue for you, it never happens on the first page (no dimming on the first post of the second page either) and always happens afterwards.

shall i still try your latest version ?
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

aegersz

solved. this is now working. i have no idea why but i since went to 2.0.14 and upgraded a bunch of your mods.
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

dougiefresh


dougiefresh

Uploaded v1.6 - October 19th, 2018
o Reverted code back to v1.4.
o No functionality change.
o Updated documentation to point to new website.

dougiefresh

Uploaded v1.7 - May 22nd, 2019
o Added support for SMF 2.1 RC2.
o Removed support for SMF 2.1 Beta 3.

Steve

I don't know when Dougie was last here but any chance of an update?
DO NOT pm me for support!

GL700Wing

Quote from: Steve on August 31, 2022, 07:03:38 PMI don't know when Dougie was last here but any chance of an update?
He hasn't posted anything since mid 2019 (or responded to messages I've sent him since then about his mods I'm a co-author of) so someone might have to create a new mod with this feature ...
Life doesn't have to be perfect to be wonderful ...

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

Steve

Quote from: GL700Wing on August 31, 2022, 07:13:53 PM
Quote from: Steve on August 31, 2022, 07:03:38 PMI don't know when Dougie was last here but any chance of an update?
He hasn't posted anything since mid 2019 (or responded to messages I've sent him since then about his mods I'm a co-author of) so someone might have to create a new mod with this feature ...
And as you're a good mod writer ...  ;)

(And I'm willing to pay.)
DO NOT pm me for support!

GL700Wing

Quote from: Steve on August 31, 2022, 08:19:14 PMAnd as you're a good mod writer ...  ;)
Already on to it (gonna try and 'hook' this one!) ...  ;)
Life doesn't have to be perfect to be wonderful ...

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

Steve

DO NOT pm me for support!

GL700Wing

@Steve - SMF 2.1 version of mod submitted for approval earlier today ...
Life doesn't have to be perfect to be wonderful ...

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

Steve

DO NOT pm me for support!

Advertisement: