Welcome, Guest. Please login or register.
July 29, 2010, 07:09:23 PM

Login with username, password and session length
Search:     Advanced search
WB 2.8.1 veröffentlicht!
Download und weitere Informationen gibt es hier .
119280 Posts in 17081 Topics by 9086 Members
Latest Member: Emiliano
* Home Help Search Login Register
+  WebsiteBaker Community Forum
|-+  English
| |-+  Modules (Moderators: Argos, BerndJM)
| | |-+  random image as random background image?
Pages: [1] Go Down Print
Author Topic: random image as random background image?  (Read 1281 times)
Aaaarco

Offline Offline

Posts: 25


« on: December 31, 2008, 02:51:04 PM »

is it possible to have a random backgound image for a div

something like this:

<div id="content" style="background-image: url(<?php RandomImage ('url(/media/headers-home/'); ?>)>
Logged
Stefek

Online Online

Posts: 3495



WWW
« Reply #1 on: December 31, 2008, 03:13:21 PM »

As I seeyou allready did install the RandomImage Module, right?

And you also have the "headers-home" directory in the media directory, right?

<div id="content" style="background-image: url(<?php RandomImage ('url(/media/headers-homeX'); ?>)>

I didn't test, but what will happen if you delete the last backslash? X

(Never used this Module, just have found this piece of code via the search function:
http://www.websitebaker2.org/forum/index.php/topic,8498.msg51125.html#msg51125 )

Regards,
Stefek

Let me know.
Ifnot working I will finally test this module  wink
« Last Edit: December 31, 2008, 03:14:57 PM by Stefek » Logged

Bowling in Kiel Halle Aschaffenburg

"Es gibt viele Pfade am Fuße des Berges,
doch von der Spitze aus, erblicken wir alle den selben Mond."
jap. Sprichwort
Aaaarco

Offline Offline

Posts: 25


« Reply #2 on: December 31, 2008, 03:46:00 PM »

thanks for the reply,

yes I installed the module and the headers-home folder is present in the media

but no, even without a slash it still turns out giving me no image



Logged
Stefek

Online Online

Posts: 3495



WWW
« Reply #3 on: December 31, 2008, 03:49:42 PM »

All right.

In this case I will take a deeper look into it.
But won't be this year anymore  smiley

Probably another User has the right hint for you earlier than me.

Best Regards and a Happy New Year!

Christian Stefan
Logged

Bowling in Kiel Halle Aschaffenburg

"Es gibt viele Pfade am Fuße des Berges,
doch von der Spitze aus, erblicken wir alle den selben Mond."
jap. Sprichwort
BerndJM
Moderator

Offline Offline

Posts: 1703



WWW
« Reply #4 on: December 31, 2008, 05:19:12 PM »

Hi,
as far as I remember the randomimage function returns a
<img src="...." />
that means the whole html-string to reference an image, and this can not work as a css-call for a background image.
Long time ago I posted a solution for a random function that can do both a random image and a random background via a additional parameter, but can't find it at this moment.

Regards Bernd
Logged

Recommended site of the day: Help-Projekt | no support via email or pm !!!
mr-fan
Forum Team
*****
Offline Offline

Posts: 1318

ingcosi - ugxa ;)


WWW
« Reply #5 on: December 31, 2008, 06:48:09 PM »

Hi,

maybe this is important hint the topic is german but code is code  wink

many examples....http://www.websitebaker2.org/forum/index.php/topic,7593.0.html

maybe its possible to implement random snippet to one of the hint from this threat

good new year

martin
Logged

Aaaarco

Offline Offline

Posts: 25


« Reply #6 on: December 31, 2008, 07:51:58 PM »

http://www.websitebaker2.org/forum/index.php/topic,6376.0.html

this is the s***

thanks al whole lot mr BerndJM

Logged
Pages: [1] Go Up Print 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
-->