Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2024-01-29 11:52:53

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,012
Website GitHub Mastodon Twitter

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

#2 2024-01-29 14:06:58

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,602
Website

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

#3 2024-01-29 14:48:51

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

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

Offline

#4 2024-01-29 14:53:26

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,602
Website

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

#5 2024-01-29 15:35:22

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

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 wrapRegionarea (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:

  1. Reinstate the partials area with/without recent articles.
  2. Reinstate the partials area without recent articles, and hide the area if it’s empty.
  3. Add some sort of (config.php? pref? theme?) switch to opt-in display of the recent articles and, potentially, other areas of the UI.
  4. 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.
  5. 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

Offline

#6 2024-01-29 15:37:27

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

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

Offline

#7 2024-01-29 15:55:11

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,602
Website

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

#8 2024-01-29 16:36:13

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,012
Website GitHub Mastodon Twitter

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

#9 2024-01-29 16:41:45

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

Re: recent articles

Yiannis, have you closed the tag?

Offline

#10 2024-01-29 16:42:29

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

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

Offline

#11 2024-01-29 16:44:46

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

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

#12 2024-01-29 17:08:43

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,012
Website GitHub Mastodon Twitter

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

Board footer

Powered by FluxBB