Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#31 2008-12-01 23:58:41

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,254
Website

Re: Php

Works for me on my site

Edited: Looks like somethings wrong since I see the smd_if tag in your source.

Last edited by MattD (2008-12-02 20:10:44)


My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

#32 2008-12-02 00:02:02

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

Re: Php

know what the issue is? x


~ Cameron

Offline

#33 2008-12-02 00:04:02

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,254
Website

Re: Php

Looks like you missed part of the first smd_if tag. Click Quote on my post to make sure you see the entire thing. For some reason the forum seems to run off the right side of the page sometimes.

EDIT: or get it from here

Last edited by MattD (2008-12-02 00:05:44)


My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

#34 2008-12-02 00:10:55

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

Re: Php

are you sure? i have the exact same code:

<txp:chs_set_cookie cookie="simplecandy_warned" value="warned" />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<body>
<txp:smd_if field='svrvar:HTTP_USER_AGENT, <txp:chs_echo_cookie cookie="simplecandy_warned" />'
     operator="contains, not"
     value="WebKit, warned">
Warning Message
<li><form action="<txp:permlink />" method="get" accept-charset="utf-8">
	<input type="submit" value="Continue &rarr;" />
</form>	</li></ul>
<txp:else/>
Ok to see content. 
</txp:smd_if>
</body>
</html>

~ Cameron

Offline

#35 2008-12-02 00:13:32

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,254
Website

Re: Php

Turn debugging on and lets look at the tag trace.

EDIT: Will only work with the new tag parser in 4.0.7

Last edited by MattD (2008-12-02 00:15:17)


My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

#36 2008-12-02 00:32:51

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

Re: Php

Okies problems, first being that can this code work across Forms? I have my code between the body tags like shown, but the body starts in one form and ends in other, likewise for the if statement, this then cuts off my </body></html> tags!

Secondly, the tag doesnt seem to be complaining about IE even when im using IE???

here is my header form:

<txp:chs_set_cookie cookie="simplecandy_warned" value="warned" />

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 2.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml2.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

	<head profile="http://gmpg.org/xfn/11">

		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta name="generator" content="Textpattern" />
		<meta name="description" content="hand-coded webprojects" />
		<meta name="keywords" content="Design, Development, XHTML, CSS, Web 2.0, Web Standards" />

		<title><txp:output_form form="title" /></title>

		<link rel="shortcut icon" type="image/png" href="/favicon.png" />
		<link rel="apple-touch-icon" href="/webclip.png" />

		<txp:feed_link flavor="rss" format="link" label="RSS" />
		<txp:feed_link flavor="atom" format="link" label="Atom" />

		<txp:rvm_css format="link" n="simplecandy" />

		<script type="text/javascript" src="http://simplecandy.com/mint/?js"></script>

		<txp:js n="jQuery" />
		<txp:js n="jQueryDimensions" />
		<txp:js n="jQueryMouseWheel" />
		<txp:js n="jQueryScrollPane" />
		<txp:js n="finder" />
		<txp:js n="swfobject" />
		<txp:js n="FancyZoom" />
		<txp:js n="FancyZoomHTML" />
		<txp:js n="CustomFormElements" />
		<txp:js n="jQueryEasing" />
		<txp:js n="jQueryEasingCompatibility" />
		<txp:js n="jQueryGradient" />
		<txp:js n="CodaSlider" />
		<txp:js n="jQueryLocalScroll" />
		<txp:js n="jQueryScrollTo" />
		<txp:js n="jQueryAccordion" />
		<txp:js n="MatchingHeight" />
		<txp:js n="SCFunctions" />

	</head>

	<body id="<txp:if_section name="default">home<txp:else /><txp:section /></txp:if_section>">

<txp:smd_if field='svrvar:HTTP_USER_AGENT, <txp:chs_echo_cookie cookie="simplecandy_warned" />' operator="contains, not" value="WebKit, warned">

Warning Message
<li><form action="<txp:permlink />" method="get" accept-charset="utf-8">
	<input type="submit" value="Continue &rarr;" />
</form>	</li>

<txp:else/>

MY PAGE GOES HERE>>>

and the footer form:

</div><!--//container-->

	<div id="footer">
	<div id="footer-outside">
	<div id="footer-inside" style="width:980px;margin:auto;">

			<p>&copy; <txp:php>echo date(Y);</txp:php> SIMPLECANDY</p>

			<ul style="float:left;">
				<li class="seperator"><a href="/contact/">Contact Info</a></li>
				<!--<li class="seperator"><a href="/">FAQ's</a></li>-->
			</ul>

			<ul>
				<li class="sep"><a href="http://textpattern.com/" title="A flexible, elegant and easy-to-use content management system">Published with Textpattern v4.0.6</a></li>
				<li class="sep"><a href="http://www.apple.com/" title="?">Made on a Macintosh</a></li>
				<li><a href="/backstage/" title="?">BACKSTAGE</a></li>
			</ul>

	</div>
	</div><!--//footer-->
	</div><!--//footer-->

</txp:smd_if>
</body></html>

Last edited by driz (2008-12-02 00:53:03)


~ Cameron

Offline

#37 2008-12-02 06:55:42

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,254
Website

Re: Php

driz wrote:

Okies problems, first being that can this code work across Forms? I have my code between the body tags like shown, but the body starts in one form and ends in other, likewise for the if statement, this then cuts off my </body></html> tags!

As long as both forms are called on the page in the correct order. Make sure both conditions will build a complete html page. Your warning has no closing body tag.

Secondly, the tag doesnt seem to be complaining about IE even when im using IE???

You’re showing the warning if it’s a webkit browser.


My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

Board footer

Powered by FluxBB