Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

How to place adsense code in between literal tagg ?

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Frameworks
View previous topic :: View next topic  
Author Message
techaddict
Smarty Rookie


Joined: 19 Jul 2011
Posts: 8

PostPosted: Tue Jul 19, 2011 2:57 pm    Post subject: How to place adsense code in between literal tagg ? Reply with quote

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
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7368
Location: Lincoln Nebraska, USA

PostPosted: Wed Jul 20, 2011 3:01 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
techaddict
Smarty Rookie


Joined: 19 Jul 2011
Posts: 8

PostPosted: Wed Jul 20, 2011 4:56 pm    Post subject: Reply with quote

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
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7368
Location: Lincoln Nebraska, USA

PostPosted: Wed Jul 20, 2011 4:58 pm    Post subject: Reply with quote

that looks identical to what is inside the {literal} tags, so Smarty appears to be doing the correct thing (?)
Back to top
View user's profile Send private message Visit poster's website
techaddict
Smarty Rookie


Joined: 19 Jul 2011
Posts: 8

PostPosted: Wed Jul 20, 2011 5:07 pm    Post subject: Reply with quote

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
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7368
Location: Lincoln Nebraska, USA

PostPosted: Wed Jul 20, 2011 5:10 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
techaddict
Smarty Rookie


Joined: 19 Jul 2011
Posts: 8

PostPosted: Wed Jul 20, 2011 5:13 pm    Post subject: Reply with quote

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
View user's profile Send private message
techaddict
Smarty Rookie


Joined: 19 Jul 2011
Posts: 8

PostPosted: Wed Jul 20, 2011 5:22 pm    Post subject: Reply with quote

@mohrt


ru der??

can please get me out of this trouble ??
Back to top
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7368
Location: Lincoln Nebraska, USA

PostPosted: Wed Jul 20, 2011 6:24 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
techaddict
Smarty Rookie


Joined: 19 Jul 2011
Posts: 8

PostPosted: Wed Jul 20, 2011 6:26 pm    Post subject: Reply with quote

i tried to do as u said

still it gets converted into error....
Back to top
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7368
Location: Lincoln Nebraska, USA

PostPosted: Wed Jul 20, 2011 6:28 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
techaddict
Smarty Rookie


Joined: 19 Jul 2011
Posts: 8

PostPosted: Wed Jul 20, 2011 6:29 pm    Post subject: Reply with quote

thanx will do it...
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Frameworks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP