Module: Banner Manager

Posted by Maurice Makaay 
Re: Module: Banner Manager
June 08, 2012 02:15PM
I thought I'd contribute for a change instead of just asking questions...

The following code in the banner manager is a open source "Simple Gallery" javascript I found online that is cross platform browser friendly (works on all smart phones!) that is a simple rotating jpg code so you can rotate through various jpg banners and link each one accordingly...

[code="javascript"]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"[www.w3.org];
<html xmlns="[www.w3.org]; lang="en" xml:lang="en">

<head>

<script type="text/javascript" src="[ajax.googleapis.com];

<style type="text/css">

/*Make sure your page contains a valid doctype at the top*/
#simplegallery1{ //CSS for Simple Gallery Example 1
position: relative; /*keep this intact*/
visibility: hidden; /*keep this intact*/
border: 0px solid darkred;
}

#simplegallery1 .gallerydesctext{ //CSS for description DIV of Example 1 (if defined)
text-align: center;
padding: 2px 5px;
}

</style>

<script type="text/javascript" src="simplegallery.js">

/***********************************************
* Simple Controls Gallery- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at [www.dynamicdrive.com] for this script and 100s more
***********************************************/

</script>
<center>
<script type="text/javascript">

var mygallery=new simpleGallery({
wrapperid: "simplegallery1", //ID of main gallery container,
dimensions: [700, 173], //width/height of gallery in pixels. Should reflect dimensions of the images exactly
imagearray: [
["[your-website-url];, "", "", ""],
["[your-website-url];, "", "", ""],


],
autoplay: [true, 2500, 2], //[auto_play_boolean, delay_btw_slide_millisec, cycles_before_stopping_int]
persist: false, //remember last viewed slide and recall within same session?
fadeduration: 500, //transition duration (milliseconds)
oninit:function(){ //event that fires when gallery has initialized/ ready to run
//Keyword "this": references current gallery instance (ie: try this.navigate("play/pause"))
},
onslide:function(curslide, i){ //event that fires after each slide is shown
//Keyword "this": references current gallery instance
//curslide: returns DOM reference to current slide's DIV (ie: try alert(curslide.innerHTML)
//i: integer reflecting current image within collection being shown (0=1st image, 1=2nd etc)
}
})

</script>
</head>

<body>

<div id="simplegallery1"></div>
<br>
</center>
</body>
</html>
[/code]

This looks very nice, I think others might be able to make good use of it.
Re: Module: Banner Manager
August 06, 2014 12:10PM
Thanks to this thread I bumped the position of the banners to be above the announcements, which is handy. Now I have an additional question/problem.

On the read pages the post title and search box are above the banners, which puts distance between them and the body of the message. What would be the best way to adjust this positioning?

Appreciate any assistance or guidance.



Wallet Friendly Watch Forum
www.wf-wf.com
Re: Module: Banner Manager
August 11, 2014 12:55PM
Answered my own question, apparently.

Turned on "Do not display the banner code automatically"

Inserted { MOD_BANNER_MANAGER } in header.tpl right before the search-area div.

That seems to have done the trick and not broken anything (that I have found, anyway).

Wallet Friendly Watch Forum
www.wf-wf.com
Sorry, only registered users may post in this forum.

Click here to login