Simple Machines Community Forum

SMF Development => Feature Requests => Topic started by: wintstar on November 07, 2021, 01:48:07 PM

Title: Hook ob_sessrewrite for v2.1
Post by: wintstar on November 07, 2021, 01:48:07 PM
Would it be possible with Relase 2.1 to add a hook for ob_sessrewrite in Sources/QueryString.php.

https://github.com/SimpleMachines/SMF2.1/blob/release-2.1/Sources/QueryString.php#L664-L689

This would be useful for mods like portal, article, blog, CMS.

It would then be possible without changing a system file to add more pages for the "Search engine friendly URLs" feature. For example blog, articles etc.
Title: Re: Hook ob_sessrewrite for v2.1
Post by: Kindred on November 07, 2021, 08:51:30 PM
Sef urls, as used in the core product is buck useless anyway....


The urls as you describe, aka pretty urls, is not part of the core functionality
Title: Re: Hook ob_sessrewrite for v2.1
Post by: wintstar on November 08, 2021, 03:48:36 AM
Quote from: Kindred on November 07, 2021, 08:51:30 PMSef urls, as used in the core product is buck useless anyway....
If it is useless why is it still in v2.1?

Quote from: Kindred on November 07, 2021, 08:51:30 PMThe urls as you describe, aka pretty urls, is not part of the core functionality
But you have to change the file Sources/QueryString.php to insert other functions. With a hook mark the file remains unchanged. A convenience for an SMF version update.
Title: Re: Hook ob_sessrewrite for v2.1
Post by: Kindred on November 08, 2021, 05:19:15 AM
It is useless, but it is legacy.
Title: Re: Hook ob_sessrewrite for v2.1
Post by: Sesquipedalian on November 08, 2021, 08:25:51 PM
Can you accomplish what you want using the 'integrate_buffer' hook? For an example, see my Email Obfuscator (https://custom.simplemachines.org/index.php?mod=4220) mod.
Title: Re: Hook ob_sessrewrite for v2.1
Post by: wintstar on November 11, 2021, 12:12:08 PM
Quote from: Sesquipedalian on November 08, 2021, 08:25:51 PMCan you accomplish what you want using the 'integrate_buffer' hook? For an example, see my Email Obfuscator (https://custom.simplemachines.org/index.php?mod=4220) mod.
Yes it works with this hook. I have made some test with this one.

Quote from: Kindred on November 07, 2021, 08:51:30 PMSef urls, as used in the core product is buck useless anyway....


The urls as you describe, aka pretty urls, is not part of the core functionality
The function Sef urls, should be revised in the next version of 2.1
Title: Re: Hook ob_sessrewrite for v2.1
Post by: Kindred on November 11, 2021, 12:29:12 PM
Quote from: wintstar on November 11, 2021, 12:12:08 PMThe function Sef urls, should be revised in the next version of 2.1


ummm.... no.
It needs to stay, for legacy reasons (people who have had this in use for years and have thousands, if not millions of site pages cataloged by search engines with the old style url.)

Since there are already 2 "pretty url" mods - and for SEF, pretty urls are not actually needed - there should be no push to put the functionality into the core....   especially not during the final stages of RC.