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!

Advertisement: