Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
if_moderated/thank you message
The current project I’m working on needs a special “Thank you” message page for when a user submits a comment. The requirements go a little bit beyond editing the text in that a new background image will be used. All I really need is a class or id added on to the body, but it isn’t possible with TXP tags (hopefully I overlooked something).
Aside from an if_moderated tag, what PHP would work to find “&commented=0” in the URL (comments are moderated)? It seems like it’d be easy, but I get the following error using <txp:php>$uri = $_SERVER['REQUEST_URI'];</txp:php> (not that I know what to do after that!).
ob_start() [<a href=‘ref.outcontrol’>ref.outcontrol</a>]: Cannot use output buffering in output buffering display handlers in …taghandlers.php on line 1723
Thanks
Offline
Re: if_moderated/thank you message
Would chs_if_url_var help solve your problem?
Offline
Re: if_moderated/thank you message
Why yes it would!
For anyone else in the same quandry, this is what I used:
<code>
<body class=“comments-form<txp:chs_if_urlvar var=“commented” value=“0”> commented</txp:chs_if_urlvar>”>
</code>
The CSS is something like this (simplified):
<pre>
body.comments-form #secondary {
background: url(/img1.png) no-repeat;
}
body.commented #secondary {
background: url(/img2.png) no-repeat;
}
</pre>
Offline
Pages: 1