Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
recent articles
I just installed the latest dev version.
Is there a reason that Recent Articles no longer appear in the Write tab?
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: recent articles
It went the same way as the “next/prev” buttons – see this thread.
At the moment, the actual lines are just commented out, so you can remove the //
at the beginning of this line, this line and these lines to restore functionality.
I could probably add it to the little plugin I made over in that thread for the buttons.
TXP Builders – finely-crafted code, design and txp
Offline
Re: recent articles
Oddly enough, I was just looking at this. Removing the recent articles area entirely means that plugins can’t add to the area even though the partial is still called. We could do with some way of making recent articles opt-in or only displaying it if a plugin has registered interest there.
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
Online
Re: recent articles
Well, I’ve added it to jcr_writenav_buttons. I added a check for the WRITE_RECENT_ARTICLES_COUNT
constant, because that should presumably also be deprecated.
Bloke wrote #336487:
Removing the recent articles area entirely means that plugins can’t add to the area even though the partial is still called.
You can add it to ('article_ui', 'extend_col_1')
but the pluggable_ui area for replacing/augmenting the recent articles dropdown area itself is only added in the function. I left it in there so that other plugins could use it.
The partial is still in the core, but the plugin just adds the HTML directly rather than adding to the partial array. If I should resolve that differently, please advise. I can give you write access if you want.
TXP Builders – finely-crafted code, design and txp
Offline
Re: recent articles
jakob wrote #336488:
the pluggable_ui area for replacing/augmenting the recent articles dropdown area itself is only added in the function.
Yes, this is what I meant. The wrapRegion
area (Line 1021) is commented out so if a plugin tries to add anything there (e.g. wet_quickopen), nothing happens. That’s a shame, but I guess if the recent articles aren’t there, the ability to filter them and find other articles is moot.
We have a few options:
- Reinstate the partials area with/without recent articles.
- Reinstate the partials area without recent articles, and hide the area if it’s empty.
- Add some sort of (config.php? pref? theme?) switch to opt-in display of the recent articles and, potentially, other areas of the UI.
- Leave it as it is. Plugins that use it will no longer work and must move their content to a different area of the Write panel.
- Something else…
WRITE_RECENT_ARTICLES_COUNT
should be removed/commented out so I wouldn’t rely on it. In the absence of that, I’m not really sure the best way to check if the recent articles are there. Hmmm.
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
Online
Re: recent articles
P.S. If you wanted to roll the concept behind wet_quickopen’s functionality into your plugin, it seems like a good fit… :)
(though it does also rely on wet_peex so is potentially quite a bit of code)
EDIT:
P.P.S you might want to remove the deprecated notice on line 39 or it might confuse people/system that think your public function is deprecated!
Last edited by Bloke (2024-01-29 15:40:42)
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
Online
Re: recent articles
Bloke wrote #336490:
you might want to remove the deprecated notice on line 39 or it might confuse people/system that think your public function is deprecated!
Thanks, I updated that.
P.S. If you wanted to roll the concept behind wet_quickopen’s functionality into your plugin, it seems like a good fit… :) (though it does also rely on wet_peex so is potentially quite a bit of code)
Nice idea, but looks a bit daunting to me.
Bloke wrote #336489:
WRITE_RECENT_ARTICLES_COUNT
should be removed/commented out so I wouldn’t rely on it.
The plugin does what is currently in constants.php, i.e. checks if the constant exists, and defines it if not. You can override it in config.php (as you can now). Alternatively, one could make that a pref instead if easier.
TXP Builders – finely-crafted code, design and txp
Offline
Re: recent articles
I tried to bypass this in smd_tabber by using:
<txp:article_custom sort="LastMod" wraptag="ul" break="li" limit="15">
<a href="https://www.site.tld/textpattern/index.php?event=article&step=edit&ID=<txp:article_id />"><txp:title /></a>
<txp:article_custom>
Any ideas why only one article is loading?
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Offline
Re: recent articles
colak wrote #336492:
Any ideas why only one article is loading?
*cough* close your article_custom tag *cough* ??
EDIT: Oleg beat me to it.
Last edited by Bloke (2024-01-29 16:42:56)
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
Online
Re: recent articles
If someone has a chance to test @jacob plugin in dev on a pre-mysql8 server, I would be grateful for the feedback.
Offline
Re: recent articles
Bloke wrote #336494:
cough close your article_custom tag cough ??
EDIT: Oleg beat me to it.
I did:) Multitasking. That solved the issue for me. Another one coming up.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline