Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2013-01-14 10:38:08

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: weighting stories for news site

You are probably right Oleg that it would be a good idea to mention this to the devs, but maybe someone with more advanced PHP skills like yourself could discuss the issues in the docs? Unless it deserve to be listed as a new issue?

Offline

#14 2013-01-14 15:50:20

etc
Developer
Registered: 2010-11-11
Posts: 5,187
Website GitHub

Re: weighting stories for news site

That’s not a real issue, just an overlook. I don’t know how to submit proposals, sorry if this is not the appropriate place, but I would replace

if (empty($m[0]) || count($m) > 2 || preg_match('/[),]/', $m[0]))

in getNextPrev function by something like

if (empty($m[0]) || count($m) > 2 || !preg_match('/^(?:[0-9,a-z,A-Z$_\x{0080}-\x{FFFF}]+|`[\x{0001}-\x{FFFF}]+`)$/u', $m[0]))

I will also try another solution that respects any sort order and report back if the performance is decent.

Offline

#15 2013-01-14 16:56:01

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,446
Website GitHub

Re: weighting stories for news site

etc wrote:

I don’t know how to submit proposals

If your testing works out and you think your patch is useful, you can raise an issue which will give us good visibility of it and we can track its progress. Patches are welcome but if you’re not comfortable with a diff tool, you can just outline the issues and fix as you have done here. Feel free to link to forum posts/this thread from your issue, to serve as background reading.

Last edited by Bloke (2013-01-14 16:56:33)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#16 2013-01-14 19:18:45

etc
Developer
Registered: 2010-11-11
Posts: 5,187
Website GitHub

Re: weighting stories for news site

Done, thanks for the guidance.

Last edited by etc (2013-01-14 20:07:16)

Offline

Board footer

Powered by FluxBB