UserDefinedTag issue
Posted: Fri Jun 23, 2006 11:27 pm
So, I set up a user defined tag for code display (so it doesn't parse it, and to look nicer when displaying).
I defined the tag as "code", and typed in the following (the c parameter would be the code I want displayed):
I then went to test this, and found out that it didn't work, because the editor had converted the html character codes back to the characters. The str_replace()s now did nothing.
I decided to try fixing this problem by going to phpmyadmin, finding where this was stored, and putting in the correct code. Now, calling the {code} tag causes a tag-not-found error:
-CMS Made Simple 0.13
-PHP 4.4.0
-Apache 1.3.33
-mySQL 4.0.24
I would appreciate any help.
I defined the tag as "code", and typed in the following (the c parameter would be the code I want displayed):
Code: Select all
if($params['c']!='')
{
echo "<div style='margin-left:10%;font-size:smaller'><b>Code:</b>
<div style='background-color:#eeeeee;border:1px solid black;'>";
$code=$params['c'];
$code=str_replace("<","<",$code);
$code=str_replace(">",">",$code);
$code=str_replace("{","{",$code);
$code=str_replace("}","}",$code);
echo $code;
echo "</div></div>"
}
I decided to try fixing this problem by going to phpmyadmin, finding where this was stored, and putting in the correct code. Now, calling the {code} tag causes a tag-not-found error:
Basic info:Fatal error: Smarty error: [in preview:cmspreviewmGQLao line 740]: syntax error: unrecognized tag 'code' (Smarty_Compiler.class.php, line 580) in /home/www/dev/cms/lib/smarty/Smarty.class.php on line 1095
-CMS Made Simple 0.13
-PHP 4.4.0
-Apache 1.3.33
-mySQL 4.0.24
I would appreciate any help.