Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: sorting titles by ignoring definite articles (e.g. "the", "a")
I’ve done that and now the only error I get is this:
Tag error: <txp:soo_article_filter index_field="index_title"> -> Textpattern Warning: tag does not exist on line 1120
Offline
Re: sorting titles by ignoring definite articles (e.g. "the", "a")
OK, I think the issue is that the MySQL user used by Txp (in config.php) doesn’t have CREATE privileges. Hadn’t thought of that. Sound likely?
Code is topiary
Offline
Re: sorting titles by ignoring definite articles (e.g. "the", "a")
It does. I’m using a free web host temporarily so I may be screwed here until I move the site to the paid server in a few days. Looks like I can’t edit user privileges.
Offline
Re: sorting titles by ignoring definite articles (e.g. "the", "a")
Hey jsoo! I just got around to attempting to implement this again, now that my live site is up and I’ve got a decent database of articles to work with. It seems to work for the most part, but if you visit my website here you’ll see the issue. It looks like “Kramer v. Kramer” and “Female Prisoner Scorpion” are both out of order, though oddly they seem to be the only two.
Here’s the code: (and I tried it first without calling “index_ignore” with the same result)
<txp:if_variable name="sortby" value="">
<txp:soo_article_filter index_field="index_title" index_ignore="A,An,The,Le">
<txp:article form="review_archive" sort="custom_14 asc" limit="999" />
</txp:soo_article_filter>
</txp:if_variable>
Any ideas? I hope we can work this little bug out, but already this solution is exactly what I needed. Thanks again for all of your work.
Offline
Re: sorting titles by ignoring definite articles (e.g. "the", "a")
Bad regexp writing on my part. I’ll have a look at it this weekend. Thanks for the details — that helped.
Code is topiary
Offline
Re: sorting titles by ignoring definite articles (e.g. "the", "a")
Because it mostly works it’s certainly a problem I can deal with for a while. :) Thanks for the quick response.
Offline
Re: sorting titles by ignoring definite articles (e.g. "the", "a")
Version 0.2.7 now available. Should work correctly.
Last edited by jsoo (2010-06-07 01:03:06)
Code is topiary
Offline
#23 2010-06-06 18:24:47
- candyman
- Member

- From: Italy
- Registered: 2006-08-08
- Posts: 684
Re: sorting titles by ignoring definite articles (e.g. "the", "a")
Jeff, the above url leads to your locale folder and not to ipsedixit.net.
Offline
Re: sorting titles by ignoring definite articles (e.g. "the", "a")
Ahh, not for the first time, either. Thanks Alessandro — fixed now.
Code is topiary
Offline
Re: sorting titles by ignoring definite articles (e.g. "the", "a")
The new version has fixed one of the titles, but “Female Prisoner Scorpion” is still out of place. It’s weird that it’s the only one and I can’t think why that would be.
Offline
Re: sorting titles by ignoring definite articles (e.g. "the", "a")
th3lonius, thank you for your patience. This time I think it is really fixed. (Same version number, but the latest fix is now the one available.)
Code is topiary
Offline
Re: sorting titles by ignoring definite articles (e.g. "the", "a")
Is it necessary to uninstall the current plugin before using the new one? I’ll grab the fix in a few minutes and report back.
EDIT: It worked like a charm, jsoo. Great work. Thank you again and again.
Last edited by th3lonius (2010-06-08 04:15:55)
Offline