[Request] Rotating banner

Modules, Add-ons and custom code that's more than just a quick hack or Mod.
Post Reply
Martin
Site Admin
Site Admin
Posts: 1854
Joined: Wed Jun 17, 2009 6:30 pm
Location: South Yorkshire UK
Contact:

[Request] Rotating banner

Post by Martin »

I would code this myself but frankly I haven't enough time to debug the latest version of ISC (Oh wait that's not my job anyway! :roll: ) or run my business effectively so I figure someone might have some spare time and the willingness to tackle this...

Essentially I'd like the current banner system to be tweaked a little so that banners could be set to display as per the current admin back-end but because the back-end allows you to put in more than just one banner for the same position, could it aggregate them, pick one at random to start and then rotate this banner every $x (admin settable) seconds.

If you want a feature set suggestion:

- pick a banner at random from the selection that have been set for that page/section and display it statically
- rotate through the banners set using Javascript

This is bare bones basic stuff that has been around for ages but my JS is very rusty so I thought I'd throw open the challenge... Any takers?
karl800
Posts: 35
Joined: Sat Oct 03, 2009 8:43 pm
Location: Staffordshire, UK

Re: [Request] Rotating banner

Post by karl800 »

I can't code,
but this would be a nice thing to have..

It would be good to make use of say featured products, so that the banenr could Pull in the the feature products instead of having it listed them as noramal..
Tony Barnes
Posts: 744
Joined: Thu Jun 18, 2009 8:59 am

Re: [Request] Rotating banner

Post by Tony Barnes »

If you can do the php, I can likely do the javascript - quite easy to apply usually.

Looking into class.banner.php, when it searches the banners it pulls up all of them, but then orders them randomly so that it will bring a random one to the top of the list to work with. It does seem to put everything into an array though - maybe another "foreach" or something...?? Or a while statement. Dunno

The new optimizer settings have made things a bit uglier in there though..!!
Martin
Site Admin
Site Admin
Posts: 1854
Joined: Wed Jun 17, 2009 6:30 pm
Location: South Yorkshire UK
Contact:

Re: [Request] Rotating banner

Post by Martin »

Tony Barnes wrote:If you can do the php, I can likely do the javascript - quite easy to apply usually.
Useful to know... I struggle with JS at the best of times, especially JQuery which is doing my nut in at the moment...
Looking into class.banner.php, when it searches the banners it pulls up all of them, but then orders them randomly so that it will bring a random one to the top of the list to work with. It does seem to put everything into an array though - maybe another "foreach" or something...?? Or a while statement. Dunno
Ah... I didn't realise that it was taking banners out at random... That at least is something. I'll have a look at the code for the class.banner.php and figure a way to output an array in JS on the template that you can then use for the rotation...
The new optimizer settings have made things a bit uglier in there though..!!
Hmm... Another bolted on extra... yay! :roll:
Tony Barnes
Posts: 744
Joined: Thu Jun 18, 2009 8:59 am

Re: [Request] Rotating banner

Post by Tony Barnes »

Yeah, I typically find that jquery things just need to randomly put , ; ' " in the file, and the they work :D :lol:

On a serious note, if you can get the php to output a <ul> <li> affair, it should hopefully be a piece of piss. It looks like the array is already built, so I reckon you should be able to get it to output reasonably easily.

The optimizer bit threw me at first when I was looking at the code, couldn't figure why it was done differently, then it twigged.
karl800
Posts: 35
Joined: Sat Oct 03, 2009 8:43 pm
Location: Staffordshire, UK

Re: [Request] Rotating banner

Post by karl800 »

Any update on this guys.
Martin
Site Admin
Site Admin
Posts: 1854
Joined: Wed Jun 17, 2009 6:30 pm
Location: South Yorkshire UK
Contact:

Re: [Request] Rotating banner

Post by Martin »

Just remembered there was this post:
http://www.interspire.com/forum/showpos ... ostcount=3

.. which basically does what you were after... Or there's Steve22's solution which is a lot more complex.
Snooper
Posts: 264
Joined: Sat Jun 26, 2010 9:22 pm

Re: [Request] Rotating banner

Post by Snooper »

Since we are talking about banners here..

Thought I might as well drop my version in the pit and let you guys make use of it.. I’m using flash at the core so you need to be aware from get go on that one..

You can use static .swf output files or add dimension with ‘blocks’ of animation.. The script seamlessly sews the blocks together to create the finished effect -

A static example of this running => http://www.ihost4u.co.uk/xcart2/

http://www.ihost4u.co.uk//inter/banner.zip This .zip file contains the following –

A file called random_flash.html which is actually the script that you would embed (with minimum alteration) in to the file HeaderSearch.html page where you want the banners to be displayed.. Normally between <div id="logo"> and </div>..

A file called random-flash.swf. This is the file called by the html script to view the banner images through.. I have included the .fla file for the adventurous to modify even this to a size of own choice..

A file randon_flash.js , called by the above viewer .swf and is doing all the work (obviously) as it also corrects the display for your choice of viewing browser when run.

A folder called /header that carries the .swf (flash) or banner files numbered 01.swf, 02,.swf and so on.. I have provided my animated examples as used..
ISC 5.5.4 Ultimate : Being used here -- http://www.kdklondon.com
rocket
Posts: 12
Joined: Sat Sep 12, 2009 6:44 am

Re: [Request] Rotating banner

Post by rocket »

I'm getting ready to do this in our cart. it's pretty easy.
netjet
Posts: 74
Joined: Tue Nov 03, 2009 12:03 pm

Re: [Request] Rotating banner

Post by netjet »

Hi guys,

I would like to add a products banner to interspire.
We can do it by creating a swf file with different images but I would prefer to have a better solution more seo friendly like the one in module-shop but it's crazy they sell it at 200euros!!
Do you know another solution cheaper or free?

Thanks
Post Reply