Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#169 2014-12-17 21:21:43
Re: stm_article_order: Arbitrary sort order for your articles
uli wrote #286672:
You might perhaps find the right tool in Oleg’s etc_link_to. And keep the
sort="position asc"
part for your single articles.
Super @uli … thanks.
etc_link_to does the job with sort="position asc"
in both <txp:article> tags … :)
I didn’t know the Txp prev/next tags where that limited. I forgot to check the docs.
One (little) thing … if you are on the last individual article of the ‘list’ the ‘next’ link is still active and shows the next (article) because there are more than 24 (live) articles in ’1984-1993’. That’s not what I want. Of course I can hide those not-wanted articles in the admin. Or is there another way?
[edit]
For now I’ve made a section ’1984-1993 (hidden)’ and within article_order tab of the admin I can drag and drop articles in and out that section. My client will be delighted … :)
Last edited by RedFox (2014-12-17 21:36:29)
Offline
#170 2014-12-18 20:21:22
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,306
Re: stm_article_order: Arbitrary sort order for your articles
RedFox wrote #286674:
For now I’ve made a section ’1984-1993 (hidden)’ and within article_order tab of the admin I can drag and drop articles in and out that section.
Creative, and quicker than opening umpteen articles and changing their status…ses.
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
#171 2015-01-28 15:01:00
Re: stm_article_order: Arbitrary sort order for your articles
Does anyone happen to have a working link to download stm_article_order 0.3?
Page not found error on Springworks site: stm_article_order 0.3
Offline
#172 2015-01-28 15:19:48
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,306
Re: stm_article_order: Arbitrary sort order for your articles
Yup. I hope it’s a version I didn’t alter after springwork’s amendments.
Stacey, should you happen to have images with file extensions other than jpgs, would you please have a look whether their thumbnails are displayed? I’m not sure whether that’s made it into an official release of the plugin.
Thanks!
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
#173 2015-01-28 15:24:26
Re: stm_article_order: Arbitrary sort order for your articles
My apologies, it’s back up now.
I’m planning on moving the plugin to a GitHub repo so it’s easier for others to keep up development.
Offline
#174 2015-01-28 15:25:19
Re: stm_article_order: Arbitrary sort order for your articles
Thanks, Springworks!
Offline
#175 2015-01-28 15:29:36
Re: stm_article_order: Arbitrary sort order for your articles
Uli, I just tested it with a .png article_image and the image thumbnail is broken in the Article Order panel.
Offline
#176 2015-01-28 15:37:32
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,306
Re: stm_article_order: Arbitrary sort order for your articles
Thanks, and “rats” :)
No time ATM to fix this but there’s a fix above, there’s been a dialogue between jens and me, starting from here, can’t tell whether one of the posts there offers a complete solution or if it needs gathering up from several ones.
Edited to add: No need for a fix, just tested PNGs and GIFs, looks fine. Phew.
jens’ code is basically the same as in the plugin.
Last edited by uli (2015-01-28 20:25:00)
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
#177 2015-10-07 15:03:41
Re: stm_article_order: Arbitrary sort order for your articles
Thanks for this plugin I find very useful and efficient.
Unless I missed something, I would suggest to move the call to create_article_position()
in spr_section_exclude_install()
. I’m pretty sure it’s not worth checking if the column is present every time you need to sort articles ;)
Offline
#178 2015-10-07 15:20:09
Re: stm_article_order: Arbitrary sort order for your articles
CeBe wrote #295466:
Thanks for this plugin I find very useful and efficient.
Unless I missed something, I would suggest to move the call to
create_article_position()
inspr_section_exclude_install()
. I’m pretty sure it’s not worth checking if the column is present every time you need to sort articles ;)
Yeah, you’re probably right. To be honest, the code is a bit messy as different people have added to it in an ad hoc way over the years.
I don’t really do any Textpattern development any more, so it would probably be better for the community if someone more involved with ongoing Textpattern development took it on and gave it some love. (I still maintain a few Textpattern sites for some clients, so I check back here every now and again to see what’s going on).
Offline
#179 2015-10-08 15:30:26
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,306
Re: stm_article_order: Arbitrary sort order for your articles
Too bad you’re retiring from Textpattern, Steve!
I’m certainly the one who did the most ugly “amendments” to the plugin. I’m sorry for that. And I’m not certain whether I’d make it right this time and so would have to thoroughly do long-winded testings and and yet weren’t certain. Hence, Claire, would you be so kind, please, and post your version of the spr_section_exclude_install()
function, and I remove the call to create_article_position()
, make a plugin of it all and load the new version to Textpattern.org?
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
#180 2015-10-08 17:19:26
Re: stm_article_order: Arbitrary sort order for your articles
function spr_section_exclude_install() {
// add spr_exclude column to txp_section table
// note: TINYINT(1) DEFAULT 0 = BOOLEAN DEFAULT FALSE
global $spr_exclude_db_debug;
if (spr_section_exclude_installed())
return TRUE;
else {
create_article_position();
return safe_query("ALTER TABLE ".safe_pfx("txp_section")." ADD spr_exclude TINYINT(1) DEFAULT 0 NOT NULL;",$spr_exclude_db_debug);
}
}
Disclaimer: I made this modification after installation and a first use, then saw that it still works, but didn’t test the installation process.
Last edited by CeBe (2015-10-08 17:39:31)
Offline