Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: [plugin] [ORPHAN] chh_article_custom
Or do you know of a plugin that can do this?
By a strange coincidence, I do.
Offline
Re: [plugin] [ORPHAN] chh_article_custom
Wa ha ha, your amazing. Excellent!
Refresh Dallas and other Refreshing Cities.
Offline
Re: [plugin] [ORPHAN] chh_article_custom
Any news on when your improved search functionality in the upcoming 1.10 release will be out? I am eagerly awating that.
Refresh Dallas and other Refreshing Cities.
Offline
#79 2006-01-08 03:27:28
- nardo
- Member

- From: tuvalahiti
- Registered: 2004-04-22
- Posts: 743
Re: [plugin] [ORPHAN] chh_article_custom
great to have u back making plugins!
I saw this on the cokesque plugin page: “TODONE Date ranges and specifications for “within the last three days,” or “last week,” or “four months ago,” or “on this day last year.””
but I can’t see anything in the attributes for it… am I not seeing the wood for the trees?
ideally it’s a ‘current day’ or ‘next day’ for an events-based website (“what’s on today”, “what’s on tomorrow”)
EDIT: apologies… didn’t notice that the plugin page states the feature is planned for next release!
Last edited by nardo (2006-01-08 09:26:07)
Offline
#80 2006-01-29 06:24:40
- juicevb10
- New Member
- Registered: 2006-01-24
- Posts: 6
Re: [plugin] [ORPHAN] chh_article_custom
Has anyone had a problem changing article sections, and then chh_flipflop reports an error because “Warning: Missing argument 1 for chh_flipflop_counter() on line xx.” This happens when changing the seciton of MULTIPLE articles, and so the counter must lose count or something??
Offline
Re: [plugin] [ORPHAN] chh_article_custom
There was an error in chh_flipflop. Try the new version.
Offline
#82 2006-02-04 07:54:51
- theonlydrew
- Member
- Registered: 2006-01-10
- Posts: 21
Re: [plugin] [ORPHAN] chh_article_custom
Hey, Im running TXP 4.03, newest chh_article_custom plugin with newest library from you site, on a server with MySQL 4.1.14, and for some reason I get nothing returned with any of the txp:chh_article or txp:chh_article_custom tags. Nada. I have tried regular txp:article, and even made the chh tag the same and still nothing! Im confused. Any suggestions? Anyone else experience this? Oh yeah, both the plugin and the lib are enabled. Ive tried uninstall/reinstall, but nothing seems to bring any articles back.
Offline
Re: [plugin] [ORPHAN] chh_article_custom
Try setting your Production Status to “Testing” or “Debugging” (in admin > preferences). I suspect there is an error message that might tell us more about what’s going wrong.
Offline
#84 2006-02-04 21:18:50
- theonlydrew
- Member
- Registered: 2006-01-10
- Posts: 21
Re: [plugin] [ORPHAN] chh_article_custom
Set to both testing and debugging. No errors what so ever on either.
txp:article with the same attributes set as chh_article returns articles.
txp:chh_article returns nothing. Blank. No errors in either testing or debugging. When by itself nothing, when with txp:article nothing. Wierd.
Offline
Re: [plugin] [ORPHAN] chh_article_custom
Odd.
- Where are you using the tag: page template, output form, or article form? (not that it should matter)
- What attributes are you using — that is, the exact tag?
- Does a plain
<txp:chh_article />or<txp:chh_article_custom />output anything? - Can you post a tag trace for a page where the tag(s) output nothing? If you do, please use pastebin.com so we don’t clog up this thread.
Offline
#86 2006-02-05 05:38:16
- theonlydrew
- Member
- Registered: 2006-01-10
- Posts: 21
Re: [plugin] [ORPHAN] chh_article_custom
Okay, I put both article and article_custom, my tag trace is at this pastebin address: <a href=“http://pastebin.com/539638”>http://pastebin.com/539638</a>
I tried a blank section and page called resources that has plenty of articles that list via regular txp:article txp:article_custom tags.
in this particular tagtrac i had the blank section and page that inlcuded both txp:chh_article and txp:chh_article_custom just plain and then another set of these using:
1. txp:chh_article time=“past”
2. txp:chh_article_custom time=“past” limit=“10” listform=“resourcelist”
So. check it out! And THanks so much for responding! If I can get this plugin working then I’ll be rockin and rollin. I especially need the multiple section function. By the by if I list multiple sections articles with the txp:chh_article_custom, will it display them (assuming i assign a form=“whateverSingleform”) individually within that section? Or will it go back to the section the articles are from? Thanks again!
Last edited by theonlydrew (2006-02-05 05:41:25)
Offline
Re: [plugin] [ORPHAN] chh_article_custom
Aha. Hoho.
Judging by the SQL generated, you have a custom field named “Time”. If you don’t have such a custom field, then I’ve managed to break something in a spectacularly new and unusual manner. But I’ll assume you do.
First, the fix:
Now, the tedious explanation, which you can safely skip:
chh_article_custom lets you use custom fields in the same way as the keywords field, so if you specify <txp:chh_article_custom Dog="doberman" />, the tag will return only articles where the custom field named “Dog” contains the text “doberman”.
This isn’t unique to the plugin. txp:article(_custom) does the same thing — theoretically. However, there is a bug in the Txp core that prevents txp:article(_custom) from recognizing custom field names that contain any capital letters (renaming the custom field to “time” should cause txp:article to fail as well whenever time="past" is specified).
The workaround used by chh_article_custom is to ignore custom field case entirely, so Dog="doberman" will look for a custom field named “Dog”, “dog”, “dOg”, etc.. Likewise, when the tag encounters an attribute like time="past", it will check for a custom field named “time”, “Time”, “tImE”, etc.. Since you have no articles where the “Time” field contains “past”, no articles are returned.
Having said all of that, the custom-fields-as-attributes feature is actually broken in v1.14. Were it not, simply removing the time attribute from the tag would be enough to make things work.
theonlydrew wrote:
By the by if I list multiple sections articles with the txp:chh_article_custom, will it display them (assuming i assign a form=“whateverSingleform”) individually within that section? Or will it go back to the section the articles are from? Thanks again!
A single article on its permlinked page will always use the section assigned to it on the content > write page.
Offline
#88 2006-02-06 03:01:10
- theonlydrew
- Member
- Registered: 2006-01-10
- Posts: 21
Re: [plugin] [ORPHAN] chh_article_custom
yes, I did have a custom field named “Time”, and your new version definitely did the trick! Thanks so much, the plugin works great now. Thanks for you hard work.
Offline
#89 2006-02-08 06:00:08
- theonlydrew
- Member
- Registered: 2006-01-10
- Posts: 21
Re: [plugin] [ORPHAN] chh_article_custom
What about including override=“form” in chh_article_custom. It would respect individual article’s specific overrides, but allow all those listed in the article_custom to use the override specified in the tag. Does that make sense?
slap me if being stupid, but wouldn’t it be a cool feature to add.
Offline
Re: [plugin] [ORPHAN] chh_article_custom
@ takshaka
thanks for your reply in the “rss_suparchive – article archive list” thread
I’m using Textpattern version: 4.0.2 (r1076)
and I’m trying to use chh_article_custom to display future articles from two particular categories,
but I get this error:
“Fatal error: Call to undefined function: chh_sql_category() in /home/pieman/public_html/clients/BMF/admin/lib/txplib_misc.php(455) : eval()’d code on line 211”
can you tell… is there a bug or am I using it incorrectly?
Offline