Forums / Basic Configuration / Using banner software to rotate main page images?

Using banner software to rotate main page images?

Locked

Views: 5,094

Results 1 to 12 of 12
This thread is locked. New replies are disabled.
21 Jul 2006, 4:11 PM
#1
cudaboy71 avatar

cudaboy71

New Zenner

Join Date:
Apr 2006
Posts:
54
Plugin Contributions:
0

Using banner software to rotate main page images?

There may be an easier way to do this. I'm open to suggestions.

I have a center graphic on the front page of my site that i would like to rotate like a banner (currently the 'quiet powerful' red graphic).

I figured I might have a go at making the banner software do this. But, it doesnt appear to want to operate like this.

  1. Is there a more preferred way to accomplish this task before i break my head trying to get the banners to work?

  2. If the banner software may be the best method, any suggestions on getting it to work.

Currently running ZC 1.2.6D

7 Aug 2006, 9:58 PM
#2
cudaboy71 avatar

cudaboy71

New Zenner

Join Date:
Apr 2006
Posts:
54
Plugin Contributions:
0

Re: Using banner software to rotate main page images?

thanks on both counts.

that's a good idea. i will give that a go.

8 Aug 2006, 3:05 AM
#3
designbydemeter avatar

designbydemeter

Zen Follower

Join Date:
Jun 2006
Location:
Taos,NM
Posts:
225
Plugin Contributions:
0

Re: Using banner software to rotate main page images?

I used to have a slideshow on my old site (I may put it back on this one). I used a javascript file which worked nicely. I really don't like Flash and tend to avoid sites with it.

You can do a search engine on free javascripts or if you want the code I have, PM me.

Laura

Laura M Collins Invitation Designs

"The best way to navigate in a new area is to first get totally lost in it."...Mike L. Stein

8 Aug 2006, 6:14 AM
#4
samad64 avatar

samad64

Totally Zenned

Join Date:
May 2006
Location:
Texas
Posts:
554
Plugin Contributions:
2

Re: Using banner software to rotate main page images?

DesignbyDemeter:

I used to have a slideshow on my old site (I may put it back on this one). I used a javascript file which worked nicely. I really don't like Flash and tend to avoid sites with it.

You can do a search engine on free javascripts or if you want the code I have, PM me.

Laura

i like lightweight flash stuff.. nothing that takes over 30 seconds to load over a DSL line. i absolutely hate java applets running on my computer, because half the time they tend to use up all my memory.. and being on a laptop with not too much memory basically makes it start to drag.. so its like the lesser of two evils :)

8 Aug 2006, 1:47 PM
#5
cudaboy71 avatar

cudaboy71

New Zenner

Join Date:
Apr 2006
Posts:
54
Plugin Contributions:
0

Re: Using banner software to rotate main page images?

i absolutely hate java applets running on my computer, because half the time they tend to use up all my memory.

while JS may eat up some resources, there's quite a difference between java and javascript (they were not even developed by the same company). a few lines of JS running isn't going to be that noticable even on a slow, memory starved machine. a java applet on the other hand, is a compiled app running in the JRE which is probably what you're not thrilled with running.

just trying to unmuddle the water there.

8 Aug 2006, 2:33 PM
#6
madk avatar

madk

Zen Follower

Join Date:
Jun 2006
Location:
Michigan
Posts:
162
Plugin Contributions:
0

Re: Using banner software to rotate main page images?

Oops! I double posted. Please see below.

8 Aug 2006, 2:35 PM
#7
madk avatar

madk

Zen Follower

Join Date:
Jun 2006
Location:
Michigan
Posts:
162
Plugin Contributions:
0

Re: Using banner software to rotate main page images?

I wrote a small image rotator in php and it is used at my site (www.beadhaven.com). I don't use it for the main header but for the smaller banner beneath. I have mine setup so that I manually have to add the links to an array but you could easily remove this if you are just looking to display a banner. Just name images 1.jpg, 2.jpg etc.

<? //start of random image rotator thingy
$file_type = ".jpg";
$image_folder = "../../images/banners";
$start = "1";
$total = "6"; // total number or images

$links = array("null",
	"index.php?main_page=index&cPath=175", //1
	"index.php", //2
	"index.php", //3
	"index.php", //4
	"index.php?main_page=index&cPath=12_7_179_182", //5
	"index.php?main_page=infopages&pages_id=32"); //6

$random = mt_rand($start, $total);
$image_name = $random . $file_type;

// echo html
echo "<a href = \"$links[$random]\"><img src=\"$image_folder/$image_name\" width = 460 height = 125 border = 0></a>";
?>
8 Aug 2006, 3:49 PM
#8
cudaboy71 avatar

cudaboy71

New Zenner

Join Date:
Apr 2006
Posts:
54
Plugin Contributions:
0

Re: Using banner software to rotate main page images?

THANKS MADK! that's great.

i'm working on it right now. but, i've already got the images loading properly. i only have two images to rotate right now--so, i'll be working on that and their respective links this afternoon. this is going to work perfectly.

and, thanks to you as well Laura. I just got this to tinker with first ;)

8 Aug 2006, 3:54 PM
#9
madk avatar

madk

Zen Follower

Join Date:
Jun 2006
Location:
Michigan
Posts:
162
Plugin Contributions:
0

Re: Using banner software to rotate main page images?

cudaboy71:

THANKS MADK! that's great.

i'm working on it right now. but, i've already got the images loading properly. i only have two images to rotate right now--so, i'll be working on that and their respective links this afternoon. this is going to work perfectly.

and, thanks to you as well Laura. I just got this to tinker with first ;)

Glad I could be of assistance. I was planning up updating this so that I could store the links in a database and pull the data from that. I just got too lazy and the small script is working fine..although a pain in the ace to update or add links.

If you need any help feel free to ask.

8 Aug 2006, 4:14 PM
#10
designbydemeter avatar

designbydemeter

Zen Follower

Join Date:
Jun 2006
Location:
Taos,NM
Posts:
225
Plugin Contributions:
0

Re: Using banner software to rotate main page images?

No prob - that scripts looks way simpler than what I had anyway - I think I'll give it a try:thumbsup:

Laura M Collins Invitation Designs

"The best way to navigate in a new area is to first get totally lost in it."...Mike L. Stein

3 Feb 2010, 7:01 PM
#11
rebekah avatar

rebekah

Zen Follower

Join Date:
Mar 2006
Posts:
183
Plugin Contributions:
0

Re: Using banner software to rotate main page images?

madk:

I wrote a small image rotator in php and it is used at my site (www.beadhaven.com). I don't use it for the main header but for the smaller banner beneath. I have mine setup so that I manually have to add the links to an array but you could easily remove this if you are just looking to display a banner. Just name images 1.jpg, 2.jpg etc.

<? //start of random image rotator thingy $file_type = ".jpg"; $image_folder = "../../images/banners"; $start = "1"; $total = "6"; // total number or images $links = array("null", "index.php?main_page=index&cPath=175", //1 "index.php", //2 "index.php", //3 "index.php", //4 "index.php?main_page=index&cPath=12_7_179_182", //5 "index.php?main_page=infopages&pages_id=32"); //6 $random = mt_rand($start, $total); $image_name = $random . $file_type; // echo html echo "<a href = \"$links[$random]\"><img src=\"$image_folder/$image_name\" width = 460 height = 125 border = 0></a>"; ?>

Can you please give a little instruction on how to use this? I put it in the "html text" field of the banner manager in ZC admin. My ZC is installed in a folder named "shop" so I added that to the image path in your code.  It flashes an image (with a blank image)  box but then disappears and leaves "; ?> in it's place. 

I uploaded six images, named 1-6.jpg respectively, to the shop/images/banners directory on our site. 

Can you tell me what I'm doing wrong?

Thanks in advance for any help.
Rebekah

**TheWindCutter.com**
Professional Microphone Windscreens
*Got wind noise? We've got you covered. *

6 Apr 2010, 1:02 AM
#12
daffy avatar

daffy

Zen Follower

Join Date:
Jul 2008
Posts:
114
Plugin Contributions:
0

Re: Using banner software to rotate main page images?

This thread is really old. I found a more up-to-date solution.

I found a very easy javascript slideshow. All you have to do is paste the code onto the define_main_page

Here's the thread that has the code and explains what I did:
http://www.zen-cart.com/forum/showthread.php?t=151991

I'm using the slideshow to put sale announcements or to feature certain products. It works great!

This slideshow doesn't have transition affects, but it works very smoothly so I don't think it matters. I tried working with some similar javascript codes but they had behavior problems. This particular one is really a gem, in my opinion.