| | Members: 16,810 Threads: 38,939 Posts: 160,329 Online: 204 Newest Member:
partner123 | | | |  |  | |  |
16.03.2005, 14:56
|
#11 (permalink)
| | Senior Mamber
Join Date: May 2004 Location: Romania
Posts: 180
| Re: Simple logo rotator By doing an extensive search I found this: http://weblogtoolscollection.com/arc...-image-header/
I have no time now for testing but soon I will try it. Code: I did this;
- Created a folder on the server called ‘headers’
- Into that, I uploaded several different images that would suit as a header image.
- I saved the script above as a php file (call it what you will - mine is ‘rotate.php’) and uploaded into the same ‘headers’ folder.
Now I edited the CSS file.
In WP, there is a line in #header which can be used to specify a url for the image to be loaded. This needs a light alteration:
Mine was
#header {
background-image: url(image.jpg)
and it is now
background-image: url(headers/rotate.php);
Now, when the CSS is called, the background image is chosen randomly by the script. Good luck!
__________________  Dont'use excessive force, pick a bigger hammer!
Supported by buyhttp.com |
| |
17.03.2005, 01:41
|
#12 (permalink)
| | Senior Mamber
Join Date: Jan 2005 Location: California, U.S.A.
Posts: 242
| Re: Simple logo rotator Nice, seems like a neat trick. I will play with it and what I get.
Thanks, |
| |
17.03.2005, 01:46
|
#13 (permalink)
| | Senior Mamber
Join Date: Jan 2005 Location: California, U.S.A.
Posts: 242
| Re: Simple logo rotator I actually got it to work using this in the CSS file: PHP Code: background-image: url(<?php echo "templates/$cur_template/images/",rand(1,2),".jpg" ?>) Hope this helps someone. Never used PHP in a CSS file, but hey we all learn something new.  |
| |
17.03.2005, 07:43
|
#14 (permalink)
| | Junior Mamber
Join Date: Jun 2004 Location: Ringkoebing Denmark
Posts: 31
| Re: Simple logo rotator doctorj:
OK, lets rename the images to [itemid].jpg - then I could be sure what image was shown on what page, right.
how would the php line be then ?
something like (what to write where ????????" Code: background-image: url(<?php echo "templates/$cur_template/images/",???????????,".jpg" ?>)
__________________
Morten Knudsen AKA Solsikkehaven
mambo@solsikkehaven.dk
www.solsikkehaven.dk
"LET'S DO THE MAMBO !"
|
| |
17.03.2005, 09:52
|
#15 (permalink)
| | Senior Mamber
Join Date: May 2004 Location: Romania
Posts: 180
| Re: Simple logo rotator How about using the built in function of Mambo for generating dynamic titles for the pages?
"_head['title']"
Just an ideea.
__________________  Dont'use excessive force, pick a bigger hammer!
Supported by buyhttp.com |
| |
17.03.2005, 11:12
|
#16 (permalink)
| | Junior Mamber
Join Date: Jun 2004 Location: Ringkoebing Denmark
Posts: 31
| Re: Simple logo rotator jifor:
Could you elaborate on that (give an example).
the idea that you just set this up in your CSS looks nice to me, that's why I asked about the imageID.....
????
__________________
Morten Knudsen AKA Solsikkehaven
mambo@solsikkehaven.dk
www.solsikkehaven.dk
"LET'S DO THE MAMBO !"
|
| |
13.04.2005, 00:10
|
#17 (permalink)
| | Senior Mamber
Join Date: Jan 2005 Location: California, U.S.A.
Posts: 242
| Re: Simple logo rotator Quote: |
Originally Posted by solsikkehaven doctorj:
OK, lets rename the images to [itemid].jpg - then I could be sure what image was shown on what page, right.
how would the php line be then ?
something like (what to write where ????????" Code: background-image: url(<?php echo "templates/$cur_template/images/",???????????,".jpg" ?>) | Place allof your images inanother folder like images2 or header and it will pick up all the .jpg files in that folder. If it is set for rand(1,2),".jpg" . Does this help at all? |
| |
07.05.2005, 09:27
|
#18 (permalink)
| | Baby Mamber
Join Date: Apr 2005
Posts: 8
| Re: Simple logo rotator Can something like this work for within the Mambo Banner module?
I have tried using the same code, but I have not been able to get it to work. Any suggestions? |
| |
08.05.2005, 00:12
|
#19 (permalink)
| | Senior Mamber
Join Date: Jan 2005 Location: California, U.S.A.
Posts: 242
| Re: Simple logo rotator Never Tried playing with the module. What happens when you edit the CSS it calls? You can also try to edit the actual module. Have you tried these yet? What have you done so far? |
| |
08.05.2005, 01:09
|
#20 (permalink)
| | Baby Mamber
Join Date: Apr 2005
Posts: 8
| Re: Simple logo rotator I have not tried to edit the internal code.. I try and stay away from doing that because I wouldnt know what i'm doing hehe.
I have tried adding the code from the first page into the " Custom banner code " box. making the changes to point to my banners (standard location for the banner module).
Thats all that I have tried. |
| | | Thread Tools | | | | Display Modes | Linear Mode |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | All times are GMT +2. The time now is 13:22. | | | |