2005-10-13 02:57:02

Rachel Rachel
Member
beta

Re: in a section, choice of viewing articles by date or category

so yeah, if you want to see the plugin at work, it’s up at my site: intensify.org/movies

Offline

 

2005-12-16 19:35:15

alexandra
Member
upsilon
From: Cologne, Germany
Known languages: German, English
Website

Re: in a section, choice of viewing articles by date or category

Can somebody please help me understanding how the chs_if_urlvar plugin is implemented. Locally i can install it but i could not figure out how to get it to work – even though i read Rachels post a couple of times.

Offline

 

2005-12-16 23:03:26

Mary
Sock Enthusiast
omega
From: Canada

Re: in a section, choice of viewing articles by date or category

Alexandra, try out this example, it may help:

<p>Question: what is your favourite kind of dark carbonated beverage?</p>

<ul>
	<li><a href="?soda=root-beer">A&amp;W Root Beer</a></li>
	<li><a href="?soda=coke">Coca-Cola</a></li>
	<li><a href="?soda=pepsi">Pepsi</a></li>
</ul>

<txp:chs_urlvar_default var="soda">

	<txp:chs_if_urlvar var="soda" value="root-beer">
		<p>Your answer: A&amp;W Root Beer Root Beer</p>
	</txp:chs_if_urlvar>

	<txp:chs_if_urlvar var="soda" value="coke">
		<p>Your answer: Coca-Cola</p>
	</txp:chs_if_urlvar>

	<txp:chs_if_urlvar var="soda" value="pepsi">
		<p>Your answer: Pepsi</p>
	</txp:chs_if_urlvar>

</txp:chs_urlvar_default>

Edit: corrected code

Last edited by Mary (2006-02-26 18:13:02)


My email address has changed recently. If you need to contact me, use the forum contact form.

Offline

 

2005-12-16 23:27:14

alexandra
Member
upsilon
From: Cologne, Germany
Known languages: German, English
Website

Re: in a section, choice of viewing articles by date or category

Thanks sooo much mary!!! That is a great step forward. I checked your code locallly and it works perfect. I hope to figure out the rest on my own. Thx again.

btw. mary´s code example above is not quite correct.

Correct ist:

<code><txp:chs_if_urlvar var=“soda” value=“root-beer”>
<p>Your answer: A&amp;W Root Beer Root Beer</p>
</txp:chs_if_urlvar> … </code>

Last edited by alexandra (2005-12-17 21:57:08)

Offline

 

2006-03-23 23:10:33

nardo
Member
xi
From: tuvalahiti

Re: in a section, choice of viewing articles by date or category

is it possible to use this plugin with messy urls?

on IIS and the plugin doesn’t work with the IIS clean URL hack…

Offline

 

2006-06-01 12:16:26

johnny_fx
New Member
alpha
Real name: Ivan Yonkov
From: Bulgaria
Website

Re: in a section, choice of viewing articles by date or category

Mary wrote:

<p>Question: what is your favourite kind of dark carbonated beverage?</p>

<ul>
	<li><a href="?soda=root-beer">A&amp;W Root Beer</a></li>
	<li><a href="?soda=coke">Coca-Cola</a></li>
	<li><a href="?soda=pepsi">Pepsi</a></li>
</ul>

<txp:chs_urlvar_default var="soda">

	<txp:chs_if_urlvar var="soda" value="root-beer">
		<p>Your answer: A&amp;W Root Beer Root Beer</p>
	</txp:chs_if_urlvar>

	<txp:chs_if_urlvar var="soda" value="coke">
		<p>Your answer: Coca-Cola</p>
	</txp:chs_if_urlvar>

	<txp:chs_if_urlvar var="soda" value="pepsi">
		<p>Your answer: Pepsi</p>
	</txp:chs_if_urlvar>

</txp:chs_urlvar_default>

Why this doesn’t work for me.

I always get this errors:

<code>
tag_error <txp:chs_urlvar_default var=“soda”> -> Notice: Undefined index: soda on line 8
tag_error <txp:chs_if_urlvar var=“soda” value=“root-beer”> -> Notice: Undefined index: soda on line 3
tag_error <txp:chs_if_urlvar var=“soda” value=“coke”> -> Notice: Undefined index: soda on line 3
tag_error <txp:chs_if_urlvar var=“soda” value=“pepsi”> -> Notice: Undefined index: soda on line 3
</code>

Offline

 

2006-06-01 13:31:50

Mary
Sock Enthusiast
omega
From: Canada

Re: in a section, choice of viewing articles by date or category

You’ll need to talk to the plugin’s creator to fix it, but, if you change your production status from debugging Textpattern will hide those notices.


My email address has changed recently. If you need to contact me, use the forum contact form.

Offline

 

2006-06-02 07:20:48

johnny_fx
New Member
alpha
Real name: Ivan Yonkov
From: Bulgaria
Website

Re: in a section, choice of viewing articles by date or category

Yes I can hide the notices, but the real problem is that the plugin doesen’t work.

Offline

 

2006-06-02 09:58:54

noamsml
New Member
alpha

Re: in a section, choice of viewing articles by date or category

johnny_fx wrote:
<blockquote> Mary wrote:

<p>Question: what is your favourite kind of dark carbonated beverage?</p>

<ul>
	<li><a href="?soda=root-beer">A&amp;W Root Beer</a></li>
	<li><a href="?soda=coke">Coca-Cola</a></li>
	<li><a href="?soda=pepsi">Pepsi</a></li>
</ul>

<txp:chs_urlvar_default var="soda">

	<txp:chs_if_urlvar var="soda" value="root-beer">
		<p>Your answer: A&amp;W Root Beer Root Beer</p>
	</txp:chs_if_urlvar>

	<txp:chs_if_urlvar var="soda" value="coke">
		<p>Your answer: Coca-Cola</p>
	</txp:chs_if_urlvar>

	<txp:chs_if_urlvar var="soda" value="pepsi">
		<p>Your answer: Pepsi</p>
	</txp:chs_if_urlvar>

</txp:chs_urlvar_default>

Why this doesn’t work for me.

I always get this errors:

<code>
tag_error <txp:chs_urlvar_default var=“soda”> -> Notice: Undefined index: soda on line 8
tag_error <txp:chs_if_urlvar var=“soda” value=“root-beer”> -> Notice: Undefined index: soda on line 3
tag_error <txp:chs_if_urlvar var=“soda” value=“coke”> -> Notice: Undefined index: soda on line 3
tag_error <txp:chs_if_urlvar var=“soda” value=“pepsi”> -> Notice: Undefined index: soda on line 3
</code>
</blockquote>

First of all, it shouldn’t work, since chs_urlvar_default will only activate if the variable is not passed to the page. Thus, if the chs_if_urlvar tags are reached, you know that the value of “soda” is null. If you change chs_urlvar_default to chs_urlvar_exists it will work.

As for the debug messages, they can be solved too. I’ll look into them when I’m slightly more awake.

Offline

 

2006-11-06 21:42:34

jayrope
Plugin Author
lambda
Real name: jane ko
From: Berlin
Known languages: de, en, fr // all frequencies
Website

Re: in a section, choice of viewing articles by date or category

intensify.org/movies is an awesome idea btw 8-)


jayrope

Offline

 

Powered by FluxBB