Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: Can't remember name/maker of plugin
jakob wrote #333275:
I love the idea of having some kind of hard-to-discover but free to share link for people to view draft articles without having a login.
Perfectly phrased. Yes, please make this happen. :)
Offline
Re: Can't remember name/maker of plugin
jakob wrote #333275:
I love the idea of having some kind of hard-to-discover but free to share link for people to view draft articles without having a login.
Yes! Please make this happen.
Oh, yes, that would certainly be useful.
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg
Offline
Re: Can't remember name/maker of plugin
Instead of a plugin, maybe the hidden
status could be reprogrammed for such cases. It would be good if it could recognise the section, categories, url schemas etc but add a string at the end. of the url that it would make it hard to find.
At the moment we have site.tld/textpattern/?txpreview=2376.16325391129
. The hidden
articles could have site.tld/s/c/etc/2376.16325391129
.
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: Can't remember name/maker of plugin
A vague thought. There are plugins like rah_pathway, jra_alias_urls (maybe also smd_short_url) that provide a short bit.ly-style url to an article. Essentially these redirect to an url in the proper location.
Maybe such a system could operate in a similar way: the proxy url takes you to the article at its location but the regular url cannot be called up directly until live.
TXP Builders – finely-crafted code, design and txp
Offline
Re: Can't remember name/maker of plugin
Bloke wrote #333262:
It would be cool if
<txp:article_custom />
could accept:
status="4"
orstatus="live"
as nowstatus="5"
orstatus="sticky"
for sticky postsstatus
orstatus="4, 5"
(orlive, sticky
) for both the abovestatus="3"
orstatus="pending"
(hidden
,draft
,1
,2
, etc) to display articles with those status values.
Sorry for resurrecting an old thread but did we get any further with exploring this? I have a use case where I want to loop over all Live and Hidden articles via <txp:article_custom>
so I can squirt them into a CSV to be imported into another system. If the article is Live, the post in the new system after import needs to be ‘visible’ but if the article has status Hidden, the post needs to have that field set to ‘hidden’ (to effectively pull the post off the site).
At the moment, it looks like the only way to do this is via a plugin or custom code. Can the tag be tweaked to accept non-visible statuses? Or does that cause headaches?
EDIT: for clarity, valueless status
would still only pick the publishable status values live, sticky
but status="live, hidden"
would become a valid option, for example.
Last edited by Bloke (2025-06-02 22:52:54)
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
Re: Can't remember name/maker of plugin
I thought it was otherwise but testing on the demo site proved me wrong*. This sounds logical and right in line with Oleg’s other subtle-but-powerful tag power boosts.
*I’m sure I had done this before for admin dashboard panels, but maybe that was using smd_query?
TXP Builders – finely-crafted code, design and txp
Offline
Re: Can't remember name/maker of plugin
jakob wrote #339784:
This sounds logical and right in line with Oleg’s other subtle-but-powerful tag power boosts.
Indeed. It seems that a simple tweak to filterAtts()
(in txplib_publish.php) is all that’s needed. Call status_list()
to grab the valid statuses – with a side benefit that there’s callback to allow people to extend or alter them (sort of, current limitations of >=4 being publishable) – filter out any bogus status values and pass the rest along.
The only question mark – and I’m not sure how to approach this – is that we treat sticky articles differently. If you hunt for $issticky
in that file you’ll see we check if sticky status is used and, if so, take various actions such as filtering front page articles differently and altering search criteria.
Does that situation change if we also allow non-publishable status values? I’m not sure.
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
Re: Can't remember name/maker of plugin
Is not there some privacy concern? Low-priv users can not publish hidden articles, but would be able to output them via a live article if status="live, hidden"
becomes a valid option.
Offline
Re: Can't remember name/maker of plugin
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
Re: Can't remember name/maker of plugin
At least, if we do, ‘hidden’ status values should be reserved to power-users.
Offline
Re: Can't remember name/maker of plugin
etc wrote #339802:
At least, if we do, ‘hidden’ status values should be reserved to power-users.
That would work. Even if we just allow “pending” it would be a helpful workaround.
From a workflow perspective, it would open up things like editorial plugins or themes that could show a dashboard of “articles you need to review” (Pending) for the editor to then approve and make Live.
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
Re: Can't remember name/maker of plugin
I’ve made a stab at allowing Pending articles in <txp:article(_custom)>
. The code’s a bit fugly. I tried using all manner of clever things like array_intersect()
and array_filter()
to strip out the other status values and permit Pending, whilst still honouring the exception that using sticky
alone brings. But since the values people can supply are either numbers or status names, it’s more involved to accept both and uniquely filter out the unwanted statuses, and cater for the fallback of live
if nothing matches. Revisions welcome.
By using our status_list()
function, it opens up the possibility for plugins to intercept the allowed status list. Core only forbids hidden and draft at the moment, to avoid trampling permissions of lower grade users who could otherwise write draft articles and have them show up on the live site by tweaking the status value in the template.
So if a plugin adds status values, they’ll be allowed to show up on the site. Tread carefully! Especially since, at present, anything with a status value of 4+ is considered “publishable”. This may change in future with the introduction of publishing status groups.
Hope this tweak proves useful.
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