Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: [plugin] [ORPHAN] chh_article_custom
If you apply the fix in this thread you can use if_article_list:
<code>
<txp:if_article_list><ul></txp:if_article_list>
<txp:chh_article_custom form=“itsme” />
<txp:if_article_list></ul></txp:if_article_list>
</code>
Or you can use straight php:
<code>
<?php if (empty($GLOBALS[‘id’])) echo “<ul>”; ?>
<txp:chh_article_custom form=“itsme” />
<?php if (empty($GLOBALS[‘id’])) echo “</ul>”; ?>
</code>
Edit: Just fixed the post so the code displays properly.
Last edited by takshaka (2005-12-18 00:20:38)
Offline
#17 2004-07-10 23:16:48
- lee
- Member
- From: Normandy, France
- Registered: 2004-06-17
- Posts: 831
Re: [plugin] [ORPHAN] chh_article_custom
Any way your plugin can be made to work with article custom fields?
Thanks
Lee
Offline
#18 2004-07-23 09:24:14
- rajo
- Member
- Registered: 2004-03-13
- Posts: 43
Re: [plugin] [ORPHAN] chh_article_custom
is there a way to show future dates with this plugin via the current month? If not, would you be willing to add this functionality in a future version.
Offline
Re: [plugin] [ORPHAN] chh_article_custom
> rajo wrote:
> is there a way to show future dates with this plugin via the current month? If not, would you be willing to add this functionality in a future version.
Can you give me an example? I’m not sure what you mean.
Offline
#20 2004-07-23 16:31:44
- rajo
- Member
- Registered: 2004-03-13
- Posts: 43
Re: [plugin] [ORPHAN] chh_article_custom
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. I guess I could achieve this just by making articles that occur way in the future to be in draft or hidden mode and then at the appropriate time make them “live”, I was just wondering if I could use this plugin to make things a little more automatic.
Offline
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
Re: [plugin] [ORPHAN] chh_article_custom
Does this plugin support override forms? I am not able to get them to work.
Thanks,
Andrea
Offline
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
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
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
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
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
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