Ice Theme Sidebar Ad Placement

flippingheck
flippingheck's picture

Joined: 2009-06-08
Posts: 25
Posted: Mon, 2011-01-24 14:48

How do I get an advert to show in the sidebar? If I add the code below </div> in sidebar.tpl the advert appears above the sidebar menu.
I have found I can add html to the description of the album and that will appear in the right place. But when adding javascript the code disappears when saved.
Thanks.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Mon, 2011-01-24 15:13

gallery filters html in descriptions/comment/titles...
http://gallery.menalto.com/node/96882#comment-348236

As for the sidebar, can't you just add your code to the bottom of sidebar.tpl in your theme?

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
flippingheck
flippingheck's picture

Joined: 2009-06-08
Posts: 25
Posted: Mon, 2011-01-24 17:04

Thanks very much it worked brilliantly.

As for the sidebar.tpl, adverts or text appear above the sidebar menu and can stretch across the entire page.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Mon, 2011-01-24 17:13
Quote:
As for the sidebar.tpl, adverts or text appear above the sidebar menu and can stretch across the entire page.

I'm not familiar with the ice theme, don't even have a copy laying around.
But it makes me think the sidebar content is being added from elsewhere after sidebar.tpl gets parsed.
Like sidebar.tpl just sets the initial structure and the rest is finished elsewhere.
Find where it is being included in theme.tpl or photo.tpl or album.tpl to look for clues.

Or you can write your ad to the sidebar after the DOM loads.
with jQuery it's amazingly easy:

$('#sidebar').append('<h3>My add html here</h3>');

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
flippingheck
flippingheck's picture

Joined: 2009-06-08
Posts: 25
Posted: Mon, 2011-01-24 18:15

Thanks again suprsidr. I will use your code if needed in the future as editing the GalleryUtilities.class has done the trick for now. :)

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Mon, 2011-01-24 18:29
Quote:
editing the GalleryUtilities.class has done the trick for now

Oh, boo hiss bad user.

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2