Loading...
 
Skip to main content

Features / Usability


Java script in banners

Assuming it's possible, how can I run a java script in a banner? Seems like everything betwees a and a gets deleted.

> Assuming it's possible, how can I run a java script in a banner? Seems like everything betwees a and a gets deleted.

You can add javascript code by using the smarty LITERAL tag:

Copy to clipboard
{literal}javascript{/literal}


HTH,

-RickQuestion
Now Available: TikiWiki for Dummies SmartiesQuestion — A beginner's guide to using ))TikiWiki((.

Still does the same thing. I'm probably doing something else wrong. Here's what I have in the "Use HTML" section of "Edit Banners"

{literal]


var AdBrite_Title_Color = '0000FF';
var AdBrite_Text_Color = '000000';
var AdBrite_Background_Color = 'FFFFFF';
var AdBrite_Border_Color = 'FFFFFF';


{/literal}
Your Ad Here


The only things that gets displayed are the 4 Var lines and the "Your ad here" link

> > Assuming it's possible, how can I run a java script in a banner? Seems like everything betwees a and a gets deleted.
>
> You can add javascript code by using the smarty LITERAL tag:
>

>
Copy to clipboard
> {literal}javascript{/literal} >

>
> HTH,
>
> -RickQuestion
> Now Available: TikiWiki for Dummies SmartiesQuestion — A beginner's guide to using ))TikiWiki((.

As far as I know, Javascript is stripped out of all web-submitted content in Tiki (except via the wikiplugin), including banner html code. JS works in templates, wrapped in literal tags for Smarty compatibility, because these are FTPed to the server and so don't pose the same security risk. If I'm mistaken and banners can in fact use input Javascript, then I need to update my info on this.

Given that, the banner Javascript has to be external. For banners, you could make an HTML banner that lays out an iframe that loads an external html file that is your ad script. Or there is a "Fixed URL" type when creating a banner; maybe this could point to the script html file, but I haven't tried it.

-- Gary