I'm using CMSMS version 1.0.2 on a Linux server.
I have trouble getting the {literal}{/literal} tag to get accepted when I use it to make a user-defined tag (UDT). I am trying to make a UDT with Javascript in it, but it seems I can't get CMSMS to accept the literal-tag at all.
I have tried to save the UDT-tag even with only {literal}{/literal}, but it won't accept it.
The error code I get is:
Parse error: syntax error, unexpected '}' in /home/cms/admin/adduserplugin.php(84) : eval()'d code on line 1
Any ideas what I am doing wrong?
How to get the {literal}-tag to work?
-
cyberman
Re: How to get the {literal}-tag to work?
Have you tried to use javascript in udt without literal tags ?basicus wrote: but it won't accept it.
-
basicus
Re: How to get the {literal}-tag to work?
Yup. I have tried all combinaltions I could come up with, including without the literal tag. It just wont accept any of them.
That was also the reason I tried using {literal}{/literal} alone without any Javascript. It does not accept the tag at all. In the error message it looks to me like it has problems with the first }.
It's really weird that it does not accept it.
The site I'm working on is a new installation, and I had no errors when installing it. That indicates that everything has been installed correctly.
That was also the reason I tried using {literal}{/literal} alone without any Javascript. It does not accept the tag at all. In the error message it looks to me like it has problems with the first }.
It's really weird that it does not accept it.
The site I'm working on is a new installation, and I had no errors when installing it. That indicates that everything has been installed correctly.
Last edited by basicus on Sun Jan 28, 2007 6:30 pm, edited 1 time in total.
-
basicus
Re: How to get the {literal}-tag to work?
Sure. I guess you mean the source for the Javascript?
var googleSearchIframeName = "results_0000XXXXXX";
var googleSearchFormName = "searchbox_0000XXXXXXXX";
var googleSearchFrameWidth = 600;
var googleSearchFrameborder = 0;
var googleSearchDomain = "www.google.com";
var googleSearchPath = "/cse";
I have removed the site specific code, and replaced them with XXXXX
var googleSearchIframeName = "results_0000XXXXXX";
var googleSearchFormName = "searchbox_0000XXXXXXXX";
var googleSearchFrameWidth = 600;
var googleSearchFrameborder = 0;
var googleSearchDomain = "www.google.com";
var googleSearchPath = "/cse";
I have removed the site specific code, and replaced them with XXXXX
-
basicus
Re: How to get the {literal}-tag to work?
The thing is I find most strange about this, is that it fails even without any Javascript. Just with {literal}{/literal} tags and nothing else.
Re: How to get the {literal}-tag to work?
When you put it in do you check, in source view, to make sure it's not getting formatted?... or ....
-
basicus
Re: How to get the {literal}-tag to work?
Hm. Not sure what you mean by that mark. In adduserplugin.php I can't see the content of the area where I write the tag. However, I have turned off the wysiwig editor to prevent what you mention from happening.
Since I can't get it to accept the tag, I can't check it in the front eighter I suppose.
Since I can't get it to accept the tag, I can't check it in the front eighter I suppose.
-
cyberman
Re: How to get the {literal}-tag to work?
Upps, the answer is too simple ... it's not a bug, it's a featurebasicus wrote: is that it fails even without any Javascript. Just with {literal}{/literal} tags and nothing else.
In userdefined tags you are in "php only" modus. Smarty will NOT parse udt. You can include javascript like you know from php like this
Code: Select all
?>
<!-- Google Search Result Snippet Begins -->
<div id="results_0000XXXXXXX"></div>
<__script__ type="text/javascript">
var googleSearchIframeName = "results_0000XXXXXX";
var googleSearchFormName = "searchbox_0000XXXXXXXX";
var googleSearchFrameWidth = 600;
var googleSearchFrameborder = 0;
var googleSearchDomain = "www.google.com";
var googleSearchPath = "/cse";
</__script>
<__script__ type="text/javascript" src="http://www.google.com/afsonline/show_afs_search.js"></__script>
<!-- Google Search Result Snippet Ends -->
<?php-
basicus
Re: How to get the {literal}-tag to work?
Ah. I see. The first suggestion you have in your code-box here does not work. But, echo does.
Thanks a lot for the help guys
Thanks a lot for the help guys

