Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-06-20 20:07:55

driz
Member
From: Huddersfield, UK
Registered: 2008-03-18
Posts: 441
Website

PHP output Txp Form

Hi, can anyone see what the problem is with this, as basically it works but the TXP code isn’t being executed:

<txp:php>
	$browser = strpos($_SERVER['HTTP_USER_AGENT'],"MSIE");
	if ($browser == true)  {
		echo '<txp:output_form form="msie" />';
		exit;
	}
</txp:php>

~ Cameron

Offline

#2 2009-06-20 20:12:48

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: PHP output Txp Form

echo output_form(array('form' => 'msie'));

or the less-efficient:

echo parse('<txp:output_form form="msie"/>');

Offline

#3 2009-06-20 20:27:27

driz
Member
From: Huddersfield, UK
Registered: 2008-03-18
Posts: 441
Website

Re: PHP output Txp Form

Why is the second one less efficient? thanks


~ Cameron

Offline

#4 2009-06-20 20:32:31

the_ghost
Plugin Author
From: Minsk, The Republic of Belarus
Registered: 2007-07-26
Posts: 907
Website

Re: PHP output Txp Form

driz wrote:

Why is the second one less efficient? thanks

Because it calls tag parsing once againg – it uses more process time than direct calling form.


Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?

Offline

Board footer

Powered by FluxBB