Add banner with javascript in single album

Astor

Joined: 2005-12-15
Posts: 154
Posted: Wed, 2007-10-31 08:13

Excuse bad english.
Can i add banner (tradedoubler) with javascript code in a single album in the 'description' field?
Can you help me?

Thanx in advance

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Wed, 2007-10-31 22:27

I am sure the 'description' field gets sanitized even with html and not BBCode enabled.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
Astor

Joined: 2005-12-15
Posts: 154
Posted: Tue, 2007-11-06 12:58

I have selevt 'raw html' in the 'configuration gallery' and the code work perfectly but for safety reasons I would want select bbcode.

Can i select 'raw html' only for one album?

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Wed, 2007-11-07 05:42
Quote:
Add banner with javascript in single album

Why not just add it to the template file?
not tested but I think I have the syntax correct.

{if $theme.item.title == 'test'}
{literal}
YOUR JS CODE HERE
{/literal}
{/if}

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team

 
Astor

Joined: 2005-12-15
Posts: 154
Posted: Wed, 2007-11-07 11:16

Great. Work perfectly http://www.alefoto.it/v/famiglia/disneyland+resort+paris/

Any suggestion for add the same code to the all photos in this specific album only?
I must modify the photo.tpl?

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Wed, 2007-11-07 23:41

on the photo page:

{if $theme.parent.title == 'test'}
....
...

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
Astor

Joined: 2005-12-15
Posts: 154
Posted: Tue, 2007-12-11 08:24
Astor wrote:
Can i select 'raw html' only for one album?

In this post we have the same problem for add embedd Youtube code.

Any idea for use 'raw html' only in specific album in a gallery set with BBCode ?

I have suggested this idea to fix

{if $theme.parent.title == 'testnobbcode'}
{literal}
{$theme.item.description|delete markup}
{/literal}
{/if}

Excuse bad english.

 
evilj@rcn.com

Joined: 2006-04-10
Posts: 1
Posted: Thu, 2007-12-13 16:36

Astor your page looks good. I'm trying to accomplish something similar to that ie javascript banner. But I am not sure where it is within the theme.tpl you are placing Floriave's code.

It is inside the <div> of the gsheader?

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2007-12-14 05:22
Astor wrote:
I have suggested this idea to fix

{if $theme.parent.title == 'testnobbcode'}
{literal}
{$theme.item.description|delete markup}
{/literal}
{/if}

Excuse bad english.

I don't understand what you want to do why the {literal} {/literal} tags?
It was my original code but inside the {literal} tags should be JavaScript, not smarty tags.

perhaps One topic per post is better, so we can understand each other.

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team

 
Astor

Joined: 2005-12-15
Posts: 154
Posted: Fri, 2007-12-14 07:39
evilj@rcn.com wrote:
It is inside the <div> of the gsheader?

This code in album.tpl

{if $theme.item.title == 'test'}
{literal}
YOUR JS CODE HERE
{/literal}
{/if}
 
Astor

Joined: 2005-12-15
Posts: 154
Posted: Fri, 2007-12-14 07:53
floridave wrote:
I don't understand what you want to do why the {literal} {/literal} tags?
It was my original code but inside the {literal} tags should be JavaScript, not smarty tags.

Excuse me but I have much difficulty to write also simple questions.

I found a solution for my original post.

Can i add javascript code in a single album ,in the 'description' field , in a gallery with general options--BBcode enabled?

or

Can i select 'raw html' only for one album in a gallery with general options--BBcode enabled?

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2007-12-14 15:17

Astor this is why peopel get confused. Your original post has nothing do do with the question you have now.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
Astor

Joined: 2005-12-15
Posts: 154
Posted: Fri, 2008-06-06 12:01
floridave wrote:
Why not just add it to the template file?
not tested but I think I have the syntax correct.

{if $theme.item.title == 'test'}
{literal}
YOUR JS CODE HERE
{/literal}
{/if}

I have this situation:

Album1
-subalbum1.1
-subalbum1.2
Album2
-subalbum2.1
-subalbum2.2
--subsubalbum2.2.1

Which is the code for add JS in Album2 and its subalbums ?

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2008-06-06 14:09

{if $theme.item.title == 'Album2'}
{if $theme.item.title == 'subalbum2.1'}
{if $theme.item.title == 'subalbum2.2'}
{if $theme.item.title == 'subsubalbum2.2.1'}

{/if}
{/if}
{/if}
{/if}

There is better syntax so I will leave it up to you to look at smarty OR statements.

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team