Members: 16,996
Threads: 38,866
Posts: 159,475
Online: 40

Newest Member: Kl_broka@rediffmail.com


Odoo.tv - Outdoor Television


Sedo - Domains kaufen und verkaufen das Projekt mambers.com steht zum Verkauf Besucherstatistiken von mambers.com etracker® Web-Controlling statt Logfile-Analyse
Old 07.02.2005, 15:06   #1 (permalink)
ufo
Senior Mamber
 
ufo's Avatar
 
Join Date: May 2004
Location: Romania
Posts: 180
ufo is an unknown quantity at this point
Default Simple logo rotator

There is a simple way to add a radom logo to your page.
  1. Create a few logos with the same height and width.
  2. Upload them in the images folder of your template.
  3. Name them "logo1.jpg, logo2.jpg" and so on.
  4. Modify the line with the img source in the index.php of your template like this:
PHP Code:
<img src="<?php echo $mosConfig_live_site?>/templates/your template/images/logo<?php echo rand(1,5)?>.jpg" />
This line displays 5 different logos!
Modify the (1,5) to (1,10) to rotate randomly 10 logos.
__________________
Dont'use excessive force, pick a bigger hammer!
Supported by buyhttp.com
Where free means FREE!: Codename-Web HQ
ufo is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Old 07.02.2005, 17:05   #2 (permalink)
Elite Mamber
 
-peter-'s Avatar
 
Join Date: Apr 2004
Posts: 1,283
-peter- is an unknown quantity at this point
Default Re: Simple logo rotator

Thx for this little Tut
-peter- is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08.02.2005, 20:10   #3 (permalink)
Senior Mamber
 
Join Date: Aug 2004
Location: Ontario, Canada
Posts: 172
Jifor will become famous soon enough
Default Re: Simple logo rotator

I'm going to copy this to the faq section. Good stuff!
__________________
http://sunspotinteractive.com
Jifor is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 14.02.2005, 13:01   #4 (permalink)
ufo
Senior Mamber
 
ufo's Avatar
 
Join Date: May 2004
Location: Romania
Posts: 180
ufo is an unknown quantity at this point
Default Re: Simple logo rotator

Quote:
Originally Posted by Jifor
I'm going to copy this to the faq section. Good stuff!
Thank you, I think the meaning of this community is to make knowledge available to all. Maybe others will join this ideea.
__________________
Dont'use excessive force, pick a bigger hammer!
Supported by buyhttp.com
Where free means FREE!: Codename-Web HQ
ufo is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 15.02.2005, 00:43   #5 (permalink)
Baby Mamber
 
Join Date: Feb 2005
Posts: 1
walkeraj is on a distinguished road
Default Simple logo rotator enhancement.

I was working on a website for a nonprofit client, and I wanted a simple banner at the top of the page to rotate between a few different images. Yours fit the bill for simplicity and ease-of use, but flaws in IE prevented me from being able to use it correctly due to the fact that IE improperly rendered whitespace at the bottom of my banner div unless the image was the background image.

I solved the problem by using your code snippet and altering it somewhat so that it could be used in multiple templates with no modification.

Here's what I did:

PHP Code:
<div style="height:180px; width:770px; background: url(<?php echo "templates/$cur_template/images/banners/banner",rand(1,2),".jpg" ?>) no-repeat; ">
So long as you have an images/banners directory in your template directory, this little snippet will return a valid image in that directory without requiring an explicit pathname. This will allow for easy copying of your template, because the path will be calculated each time.

The height and width of the banner must be explicitly set, of course, but what a payoff.
walkeraj is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 17.02.2005, 13:19   #6 (permalink)
Baby Mamber
 
Join Date: Sep 2004
Posts: 12
trench is on a distinguished road
Question Re: Simple logo rotator

how can I accomplish this same feat using css? My banner is called via css? What changes must be made?
trench is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 17.02.2005, 14:10   #7 (permalink)
Professional Mamber
 
eyezberg's Avatar
 
Join Date: Apr 2004
Location: Gap / France
Posts: 860
eyezberg is an unknown quantity at this point
Default Re: Simple logo rotator

the above style declaration IS css..?!
__________________
joe / ex Mambo ex Doc Team
Eyezberg.com
eyezberg is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 17.02.2005, 14:14   #8 (permalink)
ufo
Senior Mamber
 
ufo's Avatar
 
Join Date: May 2004
Location: Romania
Posts: 180
ufo is an unknown quantity at this point
Default Re: Simple logo rotator

I think the only way is to change the template to use the banner in php, the css is not processed by the server but only by the browser.

Eliminate the banner from the css and try to implement-it in the index.php file of your template.

If there is a way to do this (the rotator) using css it will be a great addition to the knowledge base.
__________________
Dont'use excessive force, pick a bigger hammer!
Supported by buyhttp.com
Where free means FREE!: Codename-Web HQ
ufo is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 18.02.2005, 08:18   #9 (permalink)
Baby Mamber
 
Join Date: Sep 2004
Posts: 12
trench is on a distinguished road
Default Re: Simple logo rotator

Quote:
Originally Posted by eyezberg
the above style declaration IS css..?!
This is what Im using to produce my banner image.

Quote:
#header {
float: left;
padding: 0px;
margin: 0px;
width: 802px;
height: 150px;
background: url(../images/banner.jpg) no-repeat;
}
trench is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 14.03.2005, 17:58   #10 (permalink)
Senior Mamber
 
doctorj's Avatar
 
Join Date: Jan 2005
Location: California, U.S.A.
Posts: 242
doctorj is on a distinguished road
Send a message via AIM to doctorj Send a message via MSN to doctorj Send a message via Yahoo to doctorj
Default Re: Simple logo rotator

Anyone able to get this to work in CSS? I have tried a few modifications and had no luck. If anyone gets this working I think it would be a great resource for the community.

Thanks,
__________________
until next time,

ThA DoC
www.gotgtek.com
Expose Project Admin
doctorj is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
I'm looking for a SIMPLE chat room! drunkenantics Mambo 4.5.1 'How Do I' Questions 1 01.12.2004 17:53
Designer für Template und Logo gesucht thefifa Jobs 4 26.11.2004 10:31
Simple Gallery mikegiles Mambo 4.5.1 General Talk 1 25.11.2004 09:39
Logo problems a1nerd Mambo 4.5.1 'How Do I' Questions 1 10.10.2004 02:32
Logo problems a1nerd Mambo 4.5.1 'How Do I' Questions 0 29.09.2004 08:38


All times are GMT +2. The time now is 12:08.

Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0
A vBSkinworks Design
© Copyright 2004-2008 by Arthur Konze Webdesign.