It's possible to forbid links in comment form?
12 years 3 months ago #130586
<?php echo strip_tags($comment->commentText); ?><?php echo strip_tags($this->item->extraFields->NAME->value); ?>Edited 11 years 6 months ago by Krikor Boghossian
<?php
$cleanfield = $this->item->extraFields->NAME->value;
$cleanfield = htmlspecialchars($cleanfield, ENT_QUOTES);
echo $cleanfield;
?><?php
$doc->addCustomTag('<meta name="anything" content="'.$this->item->extraFields->AAA->value.'" />');
?><?
$doc->addCustomTag('<meta name="anything" content="'.str_replace($nonsafe, $safe, $this->item->extraFields->AAA->value).'" />');
?>Edited 11 years 5 months ago by Joe Campbell
<?php
if( isset($this->item->extraFields->AAA->value) && $this->item->extraFields->AAA->value != '' ) {
// extrafield AAA is set and has a value
echo $this->item->extraFields->AAA->value;
} else {
// no extrafield AAA or it has no value so assign the BBB instead
echo $this->item->extraFields->BBB->value;
}
?><?php
if( isset($this->item->extraFields->AAA->value) && $this->item->extraFields->AAA->value != '' ) {
// extrafield AAA is set and has a value so render it as is
$doc->addCustomTag('<meta name="anything" content="'.$this->item->extraFields->AAA->value.'" />');
} else {
// no extrafield AAA or it has no value so render the str_replace code
$doc->addCustomTag('<meta name="anything" content="'.str_replace($nonsafe, $safe, $this->item->extraFields->AAA->value).'" />');
}
?><?php $doc->addCustomTag('<meta property="anything" content="'if(isset($this->item->extraFields->AAA->value)) {$this->item->extraFields->AAA->value} else: {$this->item->extraFields->BBB->value} endif;'" />'); ?><?php $doc->addCustomTag('<meta property="anything" content="'if(isset($this->item->extraFields->AAA->value)) {str_replace($nonsafe, $safe, $this->item->extraFields->AAA->value)} else: {str_replace($nonsafe, $safe, $this->item->extraFields->BBB->value)} endif;'" />'); ?>Edited 11 years 6 months ago by Joe Campbell
Log in or create an account to reply.