Simple Machines Community Forum

Customizing SMF => Graphics and Templates => Topic started by: kuroitaka on December 11, 2010, 06:06:02 PM

Title: Banner/Header/Logo Rotation
Post by: kuroitaka on December 11, 2010, 06:06:02 PM
Hello SMF. This is my first time as a webmaster and I'm having a lot of hard time with it.

I started modifying a theme for SMF 1.1 called DS-Natural. I made a lot of modifications on images and on the codes, but I couldn't do something: make the header banner/header/logo rotation feature.

I tried to use the php script in the folder with the banner images, but it isn't showing at all. Also the logo image for this theme is located at the css file:
#header {
   position: relative;
   height: 155px;
   overflow: hidden;
   background: ;
}

#logo a {
   position: absolute;
   left: 10px;
   top: 5px;
   display: block;
   width: 940px;
   height: 150px;
   background: url(images/banner/waka.jpg) no-repeat;
}


If you wish to see my website, it's hajime dot com dot br.

I hope someone can help me, coz the idea about the random header is to advertise the designers work.

Thanks a lot.
Title: Re: Banner/Header/Logo Rotation
Post by: sAce on December 12, 2010, 01:15:18 PM
Have you searched the Modifications site ?
- http://custom.simplemachines.org/mods/
Title: Re: Banner/Header/Logo Rotation
Post by: kuroitaka on December 12, 2010, 02:04:18 PM
Yeah, unfortunately I've tried it already. But I can't do that, because the instructions say that I have to change the "Logo image URL" in the Current Theme settings. But this theme does not have this feature. As I said before, the image appears to be in the CSS...

I've tried the Header Rotator mod made by Cyclon Boy...
Title: Re: Banner/Header/Logo Rotation
Post by: sAce on December 12, 2010, 02:15:08 PM
YOu can make the mod work on custom themes by following
- Manual Installation of Mods (http://docs.simplemachines.org/index.php?topic=402.0)
Title: Re: Banner/Header/Logo Rotation
Post by: kuroitaka on December 12, 2010, 03:25:02 PM
I installed it manually, everything went good but for some reason the rotator.php can't be read by the forum as an image. I think this is the problem.

For some reason, it just doesn't show up, as if there wasn't an image at all. I've tried to use the regular CSS instead of the Theme CSS and the rotator.php didn't show up.

I don't know much about SMF, but I think it may be a compatibility issue...
Title: Re: Banner/Header/Logo Rotation
Post by: sAce on December 13, 2010, 08:12:28 AM
Have you tried asking the mod author about this problem ?
Title: Re: Banner/Header/Logo Rotation
Post by: willemjan on December 13, 2010, 09:02:52 AM
I actually did quite the same as you. I used an image rotator for it. I have attached the script. The only thing you do is change this:


background: url(images/banner/waka.jpg) no-repeat;


to


background: url(images/banner/rotate.php) no-repeat;


And ofcourse follow the instructions in the file to make it work ;)
Title: Re: Banner/Header/Logo Rotation
Post by: kuroitaka on December 13, 2010, 09:14:31 AM
@S-Ace
Oh yeah, I didn't know the mod's creator had a thread for support. I'll try it, thank you.

@willemjan
I've tried all this, man... I could even change the CCS/index template to make it work like the Default one and show the Logo Image URL; it worked with the average header image, but didn't with the php file...

But thanks for the help. :D
Title: Re: Banner/Header/Logo Rotation
Post by: willemjan on December 13, 2010, 09:29:06 AM
Have you used the exact same script as mine? I got this working in my first try...
Title: Re: Banner/Header/Logo Rotation
Post by: Deaks on December 13, 2010, 10:48:52 AM
kuroitaka, you could try thjis attached script, its what I use for the banner in my sig, simply all you do is add it to the folder where your banners are then call on index.png (make sure that its only the banners in there and they are .png's)
Title: Re: Banner/Header/Logo Rotation
Post by: kuroitaka on December 14, 2010, 07:28:46 AM
@willemjan
http://www.simplemachines.org/community/index.php?topic=224543 This mod?

@Scrooge
Damn, I thought it was solving my problem. But for some reason, my forum is accepting ONLY .jpg files in the header. I tried to put a random PNG and it didn't work. I transformed it into JPG and it worked. And yeah, I've changed the codes in both rotator and .htaccess to make it work like a jpg, but the forum still detects it as a rotator and it doesn't work...

As I thought, it should be an incompatibility issue.

Does anybody have any idea how I can config it?


Edit: After some CSS and index.template manipulation I finally made it. Thanks to Scrooge and his .htaccess file.

Thanks for everyone who helped. :)
Title: Re: Banner/Header/Logo Rotation
Post by: snyperthugs on January 18, 2011, 01:37:19 PM
You are the man! Lol I just came across this thread when I was about to give up on a rotator. Its works and its easy, No editing at all
Title: Re: Banner/Header/Logo Rotation
Post by: MartyHunter on June 21, 2023, 11:52:52 AM
Does anyone know if this script still works in 2023? I'd like to rotate images in header