Not logged in. · Lost password · Register
Forum: General Help and Support Plugins Plugin Wishlist RSS
Custom sorting tags plugin
Avatar
JJK #1
Member since Feb 2019 · 7 posts
Group memberships: Members
Show profile · Link to this post
Subject: Custom sorting tags plugin
From the empty results of my search, I assume a plugin like this doesn't exist yet, so is there someone who'd be willing to try making it? I suppose it shouldn't be too difficult, for someone who knows how to make it.

Before describing what I had in mind, I'll explain why I need it: I want to use a tag's page (where all the pages with the relevant tag are listed) as a timeline for pages with the tag "timeline", starting from the oldest, going to the newest, or vice-versa.
Sorting them by creation date doesn't work, because I'd need to know in advance ALL the pages that will ever have that tag and create them in order, but you can guess that today I might add a 2015 event, and tomorrow I might need to add a 2012 one, which should go before but will be placed after, if using creation date.

What I was thinking: make a specific piece of syntax to add in pages' text, like {{sorting>N}} where N is a number you arbitrarily give to each specific page.
Then, in config, you specify lists of tag terms that will make use of that kind of sorting.
Using my case as an example, I could go to config and set that the used tags to "timeline, music_genres". These tags will be the only ones using the custom sorting, aka reading that piece of syntax inside their respective pages.
Now I could go to the single pages and create, so to speak, two kinds of sorting; for the "music_genres" pages, I could give simple numbers, such as 1, 2, 3, and up, and they'll be ordered among themselves. For the "timeline" pages, which is what actually interests me, I could put numbers such as {{sorting>201505221456}}; what does that mean? Well, it's a single number composed of year 2015, month 05, day, 22, hour 14, and minute 56.
This would mean unlimited timeline control, down to the nanosecond or even below, if one wishes.

An alternative (that requires more coding and I fear could weigh more in the client, though) would be to set the piece of syntax to differ for specific tags; I mean, with the above method, if I have a page tagged with both "timeline" and "music_genres", it will use that {{sorting>201505221456}} also for the "music_genres" sorting that normally uses small numbers, meaning it would always be listed last (or first, if reversed).
Instead, with something like:
{{sorting:timeline>201505221456}}
{{sorting:music_genres>3}}
I'd have different weights depending on which tag page list I'm looking at.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2019-06-24, 11:16:27 (UTC +02:00)