Textpattern CMS support forum

You are not logged in. Register | Login | Help

#21 2004-07-24 17:12:02

takshaka
Plugin Author
From: Below the Manson-Nixon line
Registered: 2004-06-02
Posts: 97
Website

Re: [plugin] [ORPHAN] chh_article_custom

> rajo said:
> Basically I want to show future dates as upcoming events, but I want to show future dates that are relative to the current month instead of showing something first in the list that occurs months away.

Hmm. I think you’d be better off setting a relatively small limit for the list. Also, if you’re just showing future articles, you’d probably want to order them in ascending order instead of the default decending order (<code>sortdir=“asc”</code>).

Last edited by takshaka (2004-07-24 17:38:35)

Offline

#22 2004-08-05 17:42:58

asarbogast
Member
From: Arcata, CA
Registered: 2004-05-21
Posts: 33
Website

Re: [plugin] [ORPHAN] chh_article_custom

Does this plugin support override forms? I am not able to get them to work.

Thanks,
Andrea

Offline

#23 2004-08-06 04:32:34

takshaka
Plugin Author
From: Below the Manson-Nixon line
Registered: 2004-06-02
Posts: 97
Website

Re: [plugin] [ORPHAN] chh_article_custom

Overrides originally worked in single-article mode but not in article lists (sorry, not documented). This was a fairly arbitrary decision since I haven’t had a use for override forms. My starting point was txp:article_custom; I just went along with the way it handled article lists.

Anyway, I’ve updated the plugin for anyone who needs more control over overrides. v0.41 adds a new attribute:

<code>allowoverride=“all”</code>

By default, chh_article_custom uses an article’s Override Form only in single-article mode. Article lists ignore it. Use <em>allowoverride</em> to change this behavior. The attribute value may be one of the following: <em>single</em>, <em>list</em>, <em>all</em>, or <em>none</em>.

Last edited by takshaka (2004-08-06 04:42:35)

Offline

#24 2004-08-06 15:12:36

asarbogast
Member
From: Arcata, CA
Registered: 2004-05-21
Posts: 33
Website

Re: [plugin] [ORPHAN] chh_article_custom

Works like a charm! Thanks so much for your quick response.

Andrea

Offline

#25 2004-08-08 23:27:19

abilstein
New Member
Registered: 2004-06-12
Posts: 5

Re: [plugin] [ORPHAN] chh_article_custom

Are there any issues with using this inside an article? It works fine for me when used in a template, but fails in an article.

I tested using a very limited parameter set. I used the exact same code in the same article using only the default article_custom and it worked fine, but chh_article_custom fails.

Any thoughts?

Offline

#26 2004-08-09 02:14:43

takshaka
Plugin Author
From: Below the Manson-Nixon line
Registered: 2004-06-02
Posts: 97
Website

Re: [plugin] [ORPHAN] chh_article_custom

Mmm. Use of chh_article_custom within article text is, shall we say, not recommended. I imagine if you are not careful you could end up with some lovely infinite recursion.

I really don’t think it’s a good idea to use any txp tags within article text unless they are specifically designed for it — like the various excerpt-related plugins — not because doing so may produce undefined results (though that’s possible, too) but because this breaks the separation of code and content.

FWIW, using txp:article_custom with no attributes within an article crashed my apache process whether I used txp:article or txp:article_custom in the page template.

Offline

#27 2004-08-09 14:00:01

abilstein
New Member
Registered: 2004-06-12
Posts: 5

Re: [plugin] [ORPHAN] chh_article_custom

Interesting.

The reason I wanted to do this was to avoid making multiple templates (Pages) within one section. In this case, it’s a News section with one static page, one page displaying a list of articles from multiple categories, and several pages displaying a list of articles from one category.

Since the template is otherwise identical aside from the display of articles, I wanted to minimize the number of templates I had to maintain. I can’t seem to do this without moving some of the display logic into the articles themselves.

I should also menteion that I want to use clean URL’s so passing the category name through the URL is undesirable.

I guess I’ll have to make another template, but it would be nice if I didn’t have to do this.

Interesting that it crashed your process. Is there a resource of what should be used in templates and what should be used in articles? It’s not quite clear to me I guess.

Offline

#28 2004-08-11 17:30:27

vaughn-taylor
Member
From: New Orleans
Registered: 2004-08-06
Posts: 17
Website

Re: [plugin] [ORPHAN] chh_article_custom

I really think this plug-in will resolve many issue I have, however, I must make it work first. I’m using version .41…

This works: <code><txp:chh_article_custom form=“faq_article” listform=“faq_list” limit=“1000” /></code>

When I change it to this: <code><txp:chh_article_custom form=“faq_article” listform=“faq_list” limit=“1000” category=“General” /></code>

I get the following message: <code>Warning: array_push(): First argument should be an array in /home/www/server/beta/textpattern/publish.php(764) : eval()’d code on line 227</code>

Any suggestions?

Last edited by vaughn-taylor (2004-08-11 17:30:44)


Work until your carpal tunnel makes you cry.
—————————-
My “bloggy” TP site >> liberalrevolt.com

Offline

#29 2004-08-11 17:54:35

vaughn-taylor
Member
From: New Orleans
Registered: 2004-08-06
Posts: 17
Website

Re: [plugin] [ORPHAN] chh_article_custom

I may have resolved my problem … I guess I need to include the children attribute if I’m using the category attribute? It fixed the issue anyway.


Work until your carpal tunnel makes you cry.
—————————-
My “bloggy” TP site >> liberalrevolt.com

Offline

#30 2004-08-12 21:29:01

takshaka
Plugin Author
From: Below the Manson-Nixon line
Registered: 2004-06-02
Posts: 97
Website

Re: [plugin] [ORPHAN] chh_article_custom

> vaughn-taylor wrote:
> I may have resolved my problem … I guess I need to include the children attribute if I’m using the category attribute? It fixed the issue anyway.

No, it’s a bug. I’ll have a look at it. I may have been victimized by PHP’s lack of DWIMery.

Offline

Board footer

Powered by FluxBB