View previous topic :: View next topic |
Author |
Message |
techaddict Smarty Rookie
Joined: 19 Jul 2011 Posts: 8
|
Posted: Tue Jul 19, 2011 2:57 pm Post subject: How to place adsense code in between literal tagg ? |
|
|
hi when i place adsense code in between {literal} tagg in smarty at my smsyug.com site it gets converted to
{literal}
<script type="text/javascript">function error(error_message){alert(error_message);}function result(result_message){alert(result_message);}</script>
{/literal}
error
is there any solution for it |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Wed Jul 20, 2011 3:01 pm Post subject: |
|
|
it should work fine, is it a PHP error or javascript error?
check the HTML source of the page, see that it is exactly as you want it. |
|
Back to top |
|
techaddict Smarty Rookie
Joined: 19 Jul 2011 Posts: 8
|
Posted: Wed Jul 20, 2011 4:56 pm Post subject: |
|
|
this below msg is displayed in the script
<script type="text/javascript">function error(error_message){alert(error_message);}function result(result_message){alert(result_message);}</script>
if u want to see live check out smsyug.com
i have posted above stuff just before </head
thanx in advance for the help. |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Wed Jul 20, 2011 4:58 pm Post subject: |
|
|
that looks identical to what is inside the {literal} tags, so Smarty appears to be doing the correct thing (?) |
|
Back to top |
|
techaddict Smarty Rookie
Joined: 19 Jul 2011 Posts: 8
|
Posted: Wed Jul 20, 2011 5:07 pm Post subject: |
|
|
thnx but there seem to be an problem
{literal}
<!-- BEGIN UAT - 728x90 - eYuva: eYuva - DO NOT MODIFY -->
<script type="text/javascript" src="http://ad-cdn.technoratimedia.com/00/19/87/uat_8719.js?ad_size=728x90"></script>
<!-- END TAG -->{/literal}
i posted this but when i saved the page it converted to above error..
i also tried this after parsing the code and pasted bt once again after i save it gets converted to same error wht to do ? |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Wed Jul 20, 2011 5:10 pm Post subject: |
|
|
That should do the same thing, and you don't even need {literal} tags since there are no {} characters in the content. Is the error a javascript error or PHP error? You didn't specify. |
|
Back to top |
|
techaddict Smarty Rookie
Joined: 19 Jul 2011 Posts: 8
|
Posted: Wed Jul 20, 2011 5:13 pm Post subject: |
|
|
i didnt get whts the dif between java error or php error..
see i explain wht i do and wht it happens/..
i posted this before /head
in header.tpl
{literal}
<!-- BEGIN UAT - 728x90 - eYuva: eYuva - DO NOT MODIFY -->
<script type="text/javascript" src="http://ad-cdn.technoratimedia.com/00/19/87/uat_8719.js?ad_size=728x90"></script>
<!-- END TAG -->{/literal}
its an ad code of technorati similar to adsense
when i save the page and reopen it
it gets converted to above eorro
is there any solution to it ?? |
|
Back to top |
|
techaddict Smarty Rookie
Joined: 19 Jul 2011 Posts: 8
|
Posted: Wed Jul 20, 2011 5:22 pm Post subject: |
|
|
@mohrt
ru der??
can please get me out of this trouble ?? |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Wed Jul 20, 2011 6:24 pm Post subject: |
|
|
This:
Code: | {literal}
<!-- BEGIN UAT - 728x90 - eYuva: eYuva - DO NOT MODIFY -->
<script type="text/javascript" src="http://ad-cdn.technoratimedia.com/00/19/87/uat_8719.js?ad_size=728x90"></script>
<!-- END TAG -->{/literal} |
Does not need literal tags, since there are no {} characters in the code. So just put this in the template:
Code: | <!-- BEGIN UAT - 728x90 - eYuva: eYuva - DO NOT MODIFY -->
<script type="text/javascript" src="http://ad-cdn.technoratimedia.com/00/19/87/uat_8719.js?ad_size=728x90"></script>
<!-- END TAG --> |
As far as the tag itself giving off an error, that is not Smarty's doing. Contact tech support for whomever the tags come from. |
|
Back to top |
|
techaddict Smarty Rookie
Joined: 19 Jul 2011 Posts: 8
|
Posted: Wed Jul 20, 2011 6:26 pm Post subject: |
|
|
i tried to do as u said
still it gets converted into error.... |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Wed Jul 20, 2011 6:28 pm Post subject: |
|
|
Smarty doesn't convert anything, this is happening in your browser after Smarty is finished generating the HTML. Contact technorati tech support, tell them the error with the tag. |
|
Back to top |
|
techaddict Smarty Rookie
Joined: 19 Jul 2011 Posts: 8
|
Posted: Wed Jul 20, 2011 6:29 pm Post subject: |
|
|
thanx will do it... |
|
Back to top |
|
|