Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2010-02-19 19:40:42

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: sorting titles by ignoring definite articles (e.g. "the", "a")


Code is topiary

Offline

#14 2010-02-19 19:58:25

th3lonius
Member
From: Iowa City, IA
Registered: 2010-02-09
Posts: 67
Website

Re: sorting titles by ignoring definite articles (e.g. "the", "a")

Well now my server is down. I’ll look in to it as soon as it comes online. Hell, maybe that was the only problem. It began to slow dramatically on refresh and then went down entirely while I was testing the plugin.

EDIT:

Okay, it’s up. Here are my errors in debugging mode:

Tag error: <txp:soo_article_filter index_field="index_title"> ->  Textpattern Warning: Access denied for user 'b14_2213878'@'%' to database 'b14_2213878_textpattern'
create temporary table textpattern select *, trim(Title) as index_title, substring_index(trim(Title),' ',1) as first_word, substring(trim(Title), locate(' ',trim(Title))+1) as remaining_words from textpattern
textpattern/publish.php:1106 soo_article_filter()  on line 85
Tag error: <txp:soo_article_filter index_field="index_title"> ->  Textpattern Warning: Unknown column 'first_word' in 'where clause'
update textpattern set custom_10 = concat(remaining_words, ', ', first_word) where first_word regexp 'a|an|the' and custom_10 = ''
textpattern/publish.php:1106 soo_article_filter()  on line 85
Tag error: <txp:soo_article_filter index_field="index_title"> ->  Textpattern Warning: Unknown table 'textpattern'
drop temporary table textpattern
textpattern/publish.php:1106 soo_article_filter()  on line 85

Last edited by th3lonius (2010-02-19 20:05:31)

Offline

#15 2010-02-19 20:05:26

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: sorting titles by ignoring definite articles (e.g. "the", "a")

I hate to think it might be my plugin causing the problem, but if you can access the database I’d:

update txp_plugin set status = 0 where name = 'soo_article_filter'

to disable it.

Last edited by jsoo (2010-02-19 20:05:46)


Code is topiary

Offline

#16 2010-02-19 20:10:12

th3lonius
Member
From: Iowa City, IA
Registered: 2010-02-09
Posts: 67
Website

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

#17 2010-02-19 20:15:28

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

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

#18 2010-02-19 20:23:01

th3lonius
Member
From: Iowa City, IA
Registered: 2010-02-09
Posts: 67
Website

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

#19 2010-06-04 17:34:41

th3lonius
Member
From: Iowa City, IA
Registered: 2010-02-09
Posts: 67
Website

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

#20 2010-06-04 21:36:59

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

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

#21 2010-06-05 04:54:49

th3lonius
Member
From: Iowa City, IA
Registered: 2010-02-09
Posts: 67
Website

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

#22 2010-06-06 15:01:09

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

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

#24 2010-06-07 01:04:06

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

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

Board footer

Powered by FluxBB