Is there a function to learn the ordinal number of a given entry?
My old blog engine is using a numbered system, where http://1.lattilad.org is the first entry, 2.lattilad.org is the second one and so on, 2857 is the recent one. Since there are many of such links out there, I believe it would be a good idea to keep that format. I think there’s no problem with converting numbered links to FlatPress links, we have a „central control room” to do it. The question is how to convert FlatPress links back to numbered links, to avoid them to appear in two formats.
Now I’m studying PrettyURLs to learn how to create a plugin to create my system of links. Proudly reporting I don’t understand a bit of it, but it’s obvious I will need a function to return the ordinal number of an entry. I can write mine, of course, but if the engine has one already, I rather won’t do it.
Hi, you could use the start and count parameters. However the start=0 means the lastest entry, so you should at least known the number of all entries you have.
Parameters, Piero? Do you mean URL parameters, $_GET?
I don’t have them at hand the given time. For example, think about the search function. I enter a text and FlatPress looks for it in the blog and returns an URL like, say, [domain]/?x=entry:entry110314-014013. But when opening the page, I didn’t enter any $_GET parameters related to that URL.
I meant the parameters to the Flatpress Database. By default GET parameters are sanitized and then passed to the FPDB. However the best method is to keep the cache of the number of entries.