Textpattern CMS support forum

You are not logged in. Register | Login | Help

#11 2006-04-21 19:07:02

chariscomp
Member
Registered: 2006-03-02
Posts: 14

Re: [plugin] [ORPHAN] chh_if_data

Hello,

I am running into a problem with this plugin. I am attempting to use this plugin with another plugin, jmc_event_manager. The relevant portion of my form code looks like this:
<code>
<txp:chh_if_data>
<br />
<txp:jmc_venue_address1 /><br />
</txp:chh_if_data>

<txp:chh_if_data>
<txp:jmc_venue_suburb />,
</txp:chh_if_data>

<txp:chh_if_data>
<txp:jmc_venue_state />
</txp:chh_if_data>
</p>
</code>

After some debugging, it appears that the output of the jmc_venue_* tags are being parsed even before the chh_if_data can process it unparsed. I.e. when I use dmp on the value of $thing, I get the value of that field. For example, say venue_address1 for this record is equal to “400 Mont Clair” with some HTML formatting. When I use dmp, I get “400 Mont Clair” not
<code>
<txp:jmc_venue_address1 /><br />
</code>
which is what I am expecting to get. The error I am getting is that it always says there is no data even when there is. Best I can figure out, it is because the output is being parsed before it can be compared unparsed and parsed. Does anyone have any suggestions on how to fix this problem?

Offline

#12 2006-04-21 22:52:18

The-Exit
Member
From: Berlin
Registered: 2005-07-16
Posts: 175
Website

Re: [plugin] [ORPHAN] chh_if_data

As far as I understand, this plugin works only with textpattern tags, and not with other plugin tags… but maybe I’m wrong.

Offline

#13 2006-05-10 06:06:04

Logoleptic
Plugin Author
From: Kansas, USA
Registered: 2004-02-29
Posts: 482

Re: [plugin] [ORPHAN] chh_if_data

Dragan wrote:

I wanted to use this plugin to control the output the category links, because when I don’t assign a category2 it outputs an empty a element, and I don’t want that to happen. So I need something along these lines: if there is a category2 assigned output it, if there isn’t, output nothing. Can this be done?

This will produce the two category names, separated by a comma:

<txp:category1 title="1" link="1" /><txp:if_article_category number="2">, <txp:category2 title="1" link="1" /></txp:if_article_category>

Offline

#14 2006-05-10 06:19:14

The-Exit
Member
From: Berlin
Registered: 2005-07-16
Posts: 175
Website

Re: [plugin] [ORPHAN] chh_if_data

You can use the else tag.

if_data … txp-tag … else …. other tag …. if_data

Offline

#15 2006-05-11 00:41:48

Logoleptic
Plugin Author
From: Kansas, USA
Registered: 2004-02-29
Posts: 482

Re: [plugin] [ORPHAN] chh_if_data

Suggested enhancement

Support testing more than one Txp tag per <txp:chh_if_data> block; provide something like a comparison attribute that can be set to “and” or “or” for the following effect:

  • comparison="or" — plugin returns “true” if any of the enclosed tags produce data
  • comparison="and" — plugin returns “true” if all of the enclosed tags produce data

Thanks for all the cool plugins. Keep up the awesome work. :-)

Offline

#16 2006-06-21 11:28:03

jufemaiz
Plugin Author
From: nth narrabeen, sydney, nsw, au
Registered: 2005-03-17
Posts: 91
Website

Re: [plugin] [ORPHAN] chh_if_data

charisomp: there’s an if_variable that works for jmc_event_manager

more info


BE + MEngSc = engineer with a side dish of frustrated designer/developer with a penchant for photography outside

Offline

#17 2006-11-06 00:24:28

scdoody
Member
Registered: 2006-10-18
Posts: 129

Re: [plugin] [ORPHAN] chh_if_data

I uploaded the plugin and added the plugin code to my site. But I get this message:

tag_error <txp:chh_if_data> -> Textpattern Warning: unknown_tag: chh_if_data on line 968

I assume the unknown_tag is because there is something wrong with the plugin upload? How do I know if the plugin was installed correctly?

Thanks!

Offline

#18 2006-11-06 00:54:12

soulship
Member
From: Always Sunny Charleston
Registered: 2004-04-30
Posts: 669
Website

Re: [plugin] [ORPHAN] chh_if_data

This may sound silly, but did you double check that it was enabled?

Offline

#19 2006-11-06 01:16:39

scdoody
Member
Registered: 2006-10-18
Posts: 129

Re: [plugin] [ORPHAN] chh_if_data

I checked and it says that it installed correctly. Here is my code on my mail default display page:

<txp:article limit=“4” />

<txp:chh_if_data>

<txp:if_individual_article > <p><txp:link_to_prev><txp:prev_title /></txp:link_to_prev> <txp:link_to_next><txp:next_title /></txp:link_to_next></p>
<txp:else /> <p style=“float:right; padding:0px 0px 15px 0px;”><txp:older><txp:text item=“Next Page >>” /></txp:older> </p>

<p style=“float:left;”><txp:newer><txp:text item=”<< Previous Page”/></txp:newer></p>
</txp:if_individual_article>
<txp:else /> <p>article_custom had nothing to say.</p>
</txp:chh_if_data>

Any thoughts on why I am getting the unknown tag error of:

tag_error <txp:chh_if_data> -> Textpattern Warning: unknown_tag: chh_if_data on line 968

Thanks.

Offline

Board footer

Powered by FluxBB