Random full background the lost php

deadchildstar / 2010-10-17 03:42:41   

OK, I've read all the random full background posts, and am trying to figure this out - how to get a scalable, random image on the main page only.

This is what I've got so far:

The index file, modified as suggested, and with code above the expanding menu code:







path = '/files/gimgs/';

$(document).ready(function() {
    setTimeout('move_up()', 1);
    expandingMenu(0);
    expandingMenu(1);
    expandingMenu(2);
    expandingMenu(3);
    expandingMenu(4);
    expandingMenu(5);
    expandingMenu(6);
});

Then, the random plugin:

  1. Uncommented these lines:
  2. if ($rs['url'] == '/')
  3. {
  1. And at the bottom:
  2. //¬†¬†¬†¬† ¬†¬†¬†¬†}
  3. //        else
  4. //        {
  5.     
  6.     }
  7.         return;
  8.     }

}
?>

  1. This is my first post, and my first indexhibit site (at <a href="http://www.roymeuwissen.com/index.php">this link</a>.... let me know if there's any way you can help - thanks!
  2. d
deadchildstar / 2010-10-17 03:43:31   

OK, I've read all the random full background posts, and am trying to figure this out - how to get a scalable, random image on the main page only.

This is what I've got so far:

The index file, modified as suggested, and with code above the expanding menu code:







path = '/files/gimgs/';

$(document).ready(function() {
    setTimeout('move_up()', 1);
    expandingMenu(0);
    expandingMenu(1);
    expandingMenu(2);
    expandingMenu(3);
    expandingMenu(4);
    expandingMenu(5);
    expandingMenu(6);
});

Then, the random plugin:

  1. Uncommented these lines:
  2. if ($rs['url'] == '/')
  3. {
  1. And at the bottom:
  2. //¬†¬†¬†¬† ¬†¬†¬†¬†}
  3. //        else
  4. //        {
  5.     
  6.     }
  7.         return;
  8.     }

}
?>

  1. This is my first post, and my first indexhibit site (at <a href="http://www.roymeuwissen.com/index.php">this link</a>.... let me know if there's any way you can help - thanks!
  2. d
deadchildstar / 2010-10-17 03:44:33   

OK, I've read all the random full background posts, and am trying to figure this out - how to get a scalable, random image on the main page only.

This is what I've got so far:

The index file, modified as suggested, and with code above the expanding menu code:







path = '/files/gimgs/';

$(document).ready(function() {
    setTimeout('move_up()', 1);
    expandingMenu(0);
    expandingMenu(1);
    expandingMenu(2);
    expandingMenu(3);
    expandingMenu(4);
    expandingMenu(5);
    expandingMenu(6);
});

Then, the random plugin:

  1. Uncommented these lines:
  2. if ($rs['url'] == '/')
  3. {
  1. And at the bottom:
  2. //¬†¬†¬†¬† ¬†¬†¬†¬†}
  3. //        else
  4. //        {
  5.     
  6.     }
  7.         return;
  8.     }

}
?>

  1. This is my first post, and my first indexhibit site (at <a href="http://www.roymeuwissen.com/index.php">this link</a>.... let me know if there's any way you can help - thanks!
  2. d
deadchildstar / 2010-10-17 17:33:25   

Hmm, I'm having a bit of trouble with the forum....

BUT - I just solved my own problem in looking at the error message - dumb mistake on my part, didn't specify my custom folder properly in the index.

Thanks to everyone for the helpful instructions - they do work if you follow them carefully!

simsim / 2010-10-25 10:33:18   

hello everybody,

i'm trying to set the random full background plug on my website, i'm not use to work on codes, but i managed to have the full background thing working. At this point i think i've set everything well but my website disappear! the only thing left is "built with indexhibit".

my website is www.etc-projects.eu

would anybody be kin and have a look on this ? any suggests ?

sawatzki / 2010-11-02 03:51:57   

Ok, here I am again - sorry it took so long!

I tried several times to post a tutorial in here, but I simply can't get my head around how to decently format a post in this forum... So I have made a PDF tutorial on how to get those full-screen random background images going on your page.

You can download the tutorial and the necessary files here:

  1. http://rapidshare.com/files/428420417/Fullscreen_Random_Background.zip

There are 3 files in the zip:

  1. FSRB Instructions.pdf
  2. full_background.js
  3. plugin.rnd_full_background.php

See how they work at my site:

  1. http://www.raphaelarmin.nl

Hope this clears it all up... ;-)

Greetings

Raphael

sawatzki / 2010-11-02 15:49:42   

Ok, I'm going to try to post the tutorial here. Hope the formatting will work out this time... ;-) Here it comes:

sawatzki / 2010-11-04 08:45:37   

edited by ArsonDPI for the common good... ;-)

sawatzki / 2010-11-04 08:47:05   

Full Browser Random Background Images:
Introduction

While I have made a detailed step-by-step-guide for the modification of both the index.php and the style.css/ie.css, it is good to understand the underlying system. The random background image will in fact not be a „real“ background image but just a normal image which is placed behind the rest of the website. We achieve this with the CSS-attribute z-index.
Note: An element with z-index: 1 resides behind an element with z-index: 2.
To do this, we are going to make a < div> called „the-background“ for our background-image and style it with a z-index of 1. Then, we will wrap everything else until the < /body> - tag in a < div> called „wrapper“.
In order to get this running, it is very helpful to basically understand what we are doing here to make this work.
    
Usage Note: All Background-images will be scaled to the size of your browser window.
You can decide which exhibits should have a fixed background and which are random.
If you have set a (fixed) background image in the exhibit, it will be scaled to full window size, but no randomness will happen.
If you want random background images on a certain exhibit, don‘t set a background image in indexhibit! If you already have a background set, remove it.

Getting it Up and Running:
The whole procedure, step by step.

There are two essential files to upload to your server:
full_background.js is a javascript file which scales the background image according to the size of the browser window.
plugin.rnd_full_background.php is a php plugin which picks a random image from a folder. It also outputs the size of the browser window.

1: UPLOAD full_background.js
    upload full_background.js to your server at the following location:
    
    (SITE ROOT)/ndxz-studio/site/js

2: UPLOAD plugin.rnd_full_background.php
    upload plugin.rnd_full_background.php to your server at the following location:
    
    (SITE ROOT)/ndxz-studio/site/plugin

Now is a good time to create a folder for the background images on your server. I recommend to create it in the existing folder /files and to call it /bgbig.
Then, we can upload some images to that folder.

3: CREATE /files/bgbig
    Create a folder for the images and call it:

    (SITE ROOT)/files/bgbig

4: UPLOAD some images
    Upload the background images to the new folder called

    (SITE ROOT)/files/bgbig

5: MODIFY index.php

Navigate to /ndxz-studio/site/[..your theme..]/index.php and open that file in your favorite text/code editor.

The first modification will take place at the end of the < head> - section of the file:
You want to link to the javascript file full_background.js that calculates the image sizes.

Enter the following code just before the closing < /head> -tag:

  1. ¬†¬†¬†¬†¬†¬†¬†¬†<!-- Full-Screen-Background... -->
  2. ¬†¬†¬†¬†¬†¬†¬†¬†<script type='text/javascript' src='<%baseurl%><%basename%>/site/js/full_background.js'></script>

The next two modifications takes place in the very beginning and at the very end of the < body> - section:
We are going to create a division < div> that will hold our background image. In this division, we refer to plugin.rnd_full_background.php and the path to the folder with background images. In this example, the folder is /files/bgbig !!Please note that there is no / after the folder name!!

Add the following code directly after < body class='section-'>:

  1. ¬†¬†¬†¬†¬†¬†¬†¬†<div id='the-background'><plug:rnd_full_background files/bgbig /></div>

Now, we are going to wrap everything else that is in the body in a div called „wrapper“:

    a) Add the following code directly after your last addition (from Step 2):

  1. ¬†¬†¬†¬†¬†¬†¬†¬†<div id='wrapper'>

        b) Add the following code just before the closing - tag; close to the end of your file:

  1. ¬†¬†¬†¬†¬†¬†¬†¬†</div> 

    6: MODIFY style.css

    Navigate to [SITE-ROOT]/ndxz-studio/site/[..your theme..]/style.css and open that file in your favorite text/code editor.

    We will add two new sets of instructions, one for the id ‚Äûthe-background‚Äú and one for the id ‚Äûwrapper‚Äú:

        Add the following code to your stylesheet:

  1. ¬†¬†¬†¬†¬†¬†¬†¬†#the-background {
  2. ¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†position: fixed;
  3. ¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†overflow: hidden;
  4. ¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†z-index: 1;
  5. ¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†width: 100%;
  6. ¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†height: 100%;
  7. ¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†top: 0;
  8. ¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†left: 0;
  9.         }
  1. ¬†¬†¬†¬†¬†¬†¬†¬†#wrapper {
  2. ¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†position: absolute;
  3. ¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†z-index: 2;
  4. ¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†width: 100%;
  5. ¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†height: 100%;
  6. ¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†top: 0;
  7.             left:0;
  8.         }

    When that‚Äòs done, add the same code to [SITE-ROOT]/ndxz-studio/site/[..your theme..]/ie.css
    That‚Äòs it, now it should work! Have fun with it!

sawatzki / 2010-11-04 08:49:31   

MODS: PLEASE DELET THE FIRST OF THE TWO POSTS, it has a mistake! Thanks

flashbar / 2010-11-10 21:56:51   

This question regards modifying the random_full_background plugin I believe: Currently, the plugin is working correctly (!), and set to only display on the home site- not on every exhibit page. I want to insert a constant image that will display on top of the random background. When I inserted the image code into the index.php file then the image displays undesirably on all the exhibit pages.
-How do I insert an image over the background only on the home site?
-Is this a style or condition of the plugin or an omission in writing on the index.php?

site
Design Steward

Thanks indexhibit!

flashbar / 2011-01-17 16:10:11   


I tried replacing this code:

  1. img src='/files/webtext.png' style="position: absolute; right: 30px; top: 0px;"
  1. With this:
  2. ?php } if ( is_page('Index') ) { ?
  3. div style="position: absolute; right: 30px; top: 0px;"
  4. img src='/files/webtext.png' /
  5. /div
  6. ?php } ?

So as to limit the image "webtext.png" from showing up on the exhibit sites. No luck, any suggestions out there?

Vaska A / 2011-01-17 16:19:03   

Where did you get that code? That's not...normal...

Which file are you trying to edit this with?

flashbar / 2011-01-23 17:46:45   

Trying to edit the index file...
Sorry about the crazy code Vaska

jmra / 2011-02-01 10:22:06   

Hi there! Please could someone help me to fix this error:

warning: getimagesize() [function.getimagesize]: URL file-access is disabled in the server configuration in /usr/home/bledayrosa.com/web/ndxz-studio/site/plugin/plugin.random_full_background.php on line 68

Warning: getimagesize(http://bledayrosa.com/bgbig/tipo.jpg) [function.getimagesize]: failed to open stream: no suitable wrapper could be found in /usr/home/bledayrosa.com/web/ndxz-studio/site/plugin/

My site
main

Many thanks!

flashbar / 2011-02-01 22:33:10   

Vaska,

My apologies for my last question, which I went about totally backwards, trying to edit the Index.php file. I figured it out, and posted the solution under the proper thread here:

Thread

meltedpop / 2011-06-05 15:42:01   

bingo
again...lotsa thanks
www.meltedpop.com
comments appreciated

acristobal / 2011-07-14 19:47:20   

Hi.
Where is the full_background.js?
I hade been looking for but the threads are hugue and there are a lot of mistakes.
I got the php but need the JS
Thanks

www.alejandrocristobal.com

panti / 2011-08-12 06:04:18   

Hello everybody.
I'm looking to resolve a big problem on my site; I've download the .dmg guide for the full_background, and follow it step by step.
I don't know why but it doesn't go.. is there someone that would check my css and php?!

Style : http://dl.dropbox.com/u/8519549/style.css
Index: http://dl.dropbox.com/u/8519549/index.php

Please help me, i don't know where i'm wrong...

panti / 2011-08-12 06:04:50   

Hello everybody.
I'm looking to resolve a big problem on my site; I've download the .dmg guide for the full_background, and follow it step by step.
I don't know why but it doesn't go.. is there someone that would check my css and php?!

Style : http://dl.dropbox.com/u/8519549/style.css
Index: http://dl.dropbox.com/u/8519549/index.php

Please help me, i don't know where i'm wrong...

panti / 2011-08-12 06:05:12   

Hello everybody.
I'm looking to resolve a big problem on my site; I've download the .dmg guide for the full_background, and follow it step by step.
I don't know why but it doesn't go.. is there someone that would check my css and php?!

Style : http://dl.dropbox.com/u/8519549/style.css
Index: http://dl.dropbox.com/u/8519549/index.php

Please help me, i don't know where i'm wrong...

panti / 2011-08-12 06:05:58   

Hello everybody.
I'm looking to resolve a big problem on my site; I've download the .dmg guide for the full_background, and follow it step by step.
I don't know why but it doesn't go.. is there someone that would check my css and php?!

Style : http://dl.dropbox.com/u/8519549/style.css
Index: http://dl.dropbox.com/u/8519549/index.php

Please help me, i don't know where i'm wrong...

delekat / 2011-08-25 06:16:57   


good morning,
first of all I would like to say (or write in this case) a big thanks to the creators of Indexhibit and all the participants of this foruns. it allows people like me (that don't know a thing about coding) to build decent websites.
i'm having a problem with my website. I'm using an exhibit plugin that allows my work to appear on top of the text and permits the viewers to click on the images to advance from image to image. This plugin is Slideshow Exhibition format @version 1.0.0.0.0.0.0.0.0.0.1 (Because Simon ate a banana for lunch) and the authors were Simon Lagneaux and Vaska.
everything was working great before i applied the "full screen background image resize". Now, when I click on the images or on the "previous/next" navigation buttons I can only advance from the fist to the second image and then, the only thing that changes is the text that becomes superimposed.
The link to my site is www.joaoleal.org
Can any of the great code wizards of this forums help me?
Thank you in advance.
joao leal

delekat / 2011-08-25 06:17:16   

good morning,
first of all I would like to say (or write in this case) a big thanks to the creators of Indexhibit and all the participants of this foruns. it allows people like me (that don't know a thing about coding) to build decent websites.
i'm having a problem with my website. I'm using an exhibit plugin that allows my work to appear on top of the text and permits the viewers to click on the images to advance from image to image. This plugin is Slideshow Exhibition format @version 1.0.0.0.0.0.0.0.0.0.1 (Because Simon ate a banana for lunch) and the authors were Simon Lagneaux and Vaska.
everything was working great before i applied the "full screen background image resize". Now, when I click on the images or on the "previous/next" navigation buttons I can only advance from the fist to the second image and then, the only thing that changes is the text that becomes superimposed.
The link to my site is www.joaoleal.org
Can any of the great code wizards of this forums help me?
Thank you in advance.
joao leal

Marc_DarZahia / 2011-08-28 09:55:56   

@ Sawatzki

Hello,
where can I get that 2 files, please :

full_background.js

plugin.rnd_full_background.php

That link is deprecated :
http://rapidshare.com/files/428420417/Fullscreen_Random_Background.zip

Thanks

Marc_DarZahia / 2011-08-28 09:56:26   

@ Sawatzki

Hello,
where can I get that 2 files, please :

full_background.js

plugin.rnd_full_background.php

That link is deprecated :
http://rapidshare.com/files/428420417/Fullscreen_Random_Background.zip

Thanks

pjotr / 2011-09-17 18:37:00   

Hi,

after a lot of reading on this forum, i managed to add the random background plugin to a site i'm working on (see it here).

I'm having two problems:

First of all, when resizing the browser window, the image can get too small, and you see the background-color of the website. I saw another example of Verena (see it here), where this isn't the case. There the image is like 'magnetic' to every border of the browser window. I can't find what i'm doing wrong.

Second, since i'm working with top-navigation, i would like the background image to start 110px from the top. I can't find out how to do that.

Any help would be apreciated...

pjotr / 2011-09-19 13:57:20   

solved the second problem, thanks to flashbar's post here.

In the plugin itself, at the bottom where it says:

  1. return 'img src='$url' width='$size[0]' height='$size[1]' alt='' /> 

i added the css style, flashbar suggested, after the alt=' '

  1. style='position: absolute; top: 100px;' 

Be sure to use single quotation marks.

Happy this is solved. Now the first problem...

mmejarkitektura / 2011-10-07 06:34:37   

Hi there!

I read all threads in this post, the random background works perfectly, but I still don't know how to make the random full background to work ONLY on my site's main page.

I followed the instructions in the dmg file by sawatzki for the installation, and also followed the questions/answers writen by verena and flashbar, but I still can't find out.

This is my site: mmej

Thanks in advance!

mmejarkitektura / 2011-10-13 07:30:06   

Finally found out!

I couldn't understand tomcardoso's fix until I opened the plugin.random_full_background.php and read all perfectly expained instructions by sawatzki. Everything was right there, waiting to be read.

For those who still haven't figured it out, just open the plugins plugin.random_full_background.php file and follow the given instructions inside the file's code:

  1. 1#Uncomment on lines 29&30.
  2. if ($rs['url'] == '/') 
  3. }

2#Add a single } bracket at the very end of the code, just before the closing ?>.

As easy as that.
Read, read, read!

sawatzki / 2011-12-06 15:56:41   

Hi guys, sorry - long time no see!

I have re-uploaded the poackage to here:

http://adf.ly/1166076/fullscreen-random-background

All instructions included.

Have fun!

pernin / 2011-12-06 16:16:15   

Good job, excellent walkthrough! Thank you :)

Tom_Jef / 2012-01-17 06:41:19   

Hi,

sawatzki, tried your last posted link, it doesn't seem to work I afraid.

I've got random background to work, but still having troubles with image resizing. Could someone please take a quick look at my site.

Maybe there's something wrong with my full_background.js? This is what I've got at the mo:

  1. /**
  2. * Full Size Backgrounded
  3. * @version 1.0
  4. * @author Vaska 
  5. */
  6. function bg_img_resize() 
  7. {
  8.     var w = $(window).width();
  9.     var h = $(window).height();
  10.     var iw = $('#the-background img').attr('width');
  11.     var ih = $('#the-background img').attr('height');
  12.     var rw = iw / ih;
  13.     var rh = ih / iw;
  14.     var sc = h * rw;
  15.     if (sc >= w) {
  16.         nh = h;
  17.         nw = sc;
  18.     } else {
  19.         sc = w * rh;
  20.         nh = sc;
  21.         nw = w;
  22.     }

$('#the-background img').css({height: nh, width: nw});
}

$(document).ready(function(){ bg_img_resize(); });
$(window).resize(function(){ bg_img_resize(); });

$(window).resize(function(){
bg_img_resize();
$('#the-background').css({ 'top' : 0, 'left' : 0 });
});
$(window).scroll(function(){
bg_img_resize();
$('#the-background').css({ 'top' : 0, 'left' : 0 });
});

Thanks in advance!
Tom

mgushanasjr / 2012-01-23 14:33:20   

is it possible if someone could host sawatzki's tutorial on their site or put it somewhere else? it's not available in my area from adf.ly

http://adf.ly/1166076/fullscreen-random-background

mgushanasjr / 2012-01-23 14:34:50   

is it possible if someone could host sawatzki's tutorial on their site or put it somewhere else? it's not available in my area from adf.ly

http://adf.ly/1166076/fullscreen-random-background

pernin / 2012-01-24 12:53:31   

it's there, but it's an ad-driven site, you have to click on top right: 'skip ad', and then wait for 15 seconds for the free download link to activate :/

yves / 2012-01-26 05:08:38   

It works well even in I.E.
However, in Safari 4.1.3 you get the full background image only, looks like the site disappears beneath it. Any way to fix this for those who still use Tiger?

Site

Screenshot

mariamontes / 2012-01-26 16:38:53   

Hi,

Was wondering if some "Guru" could help me with the issue i'm facing and for the life of me i can't work it out.....(Pulling out my hair!)

Site is www.mariamontes.net

Basically all the text won't go away, And suggestions?

mariamontes / 2012-01-26 16:39:23   

Hi,

Was wondering if some "Guru" could help me with the issue i'm facing and for the life of me i can't work it out.....(Pulling out my hair!)

Site is www.mariamontes.net

Basically all the text won't go away, And suggestions?

mgushanasjr / 2012-01-26 16:44:52   

@pernin adf.ly redirects me to uploaded.to/file/11x4jwvg where I get the message:

Not available
Our service is currently unavailable in your country. Sorry about that.

pernin / 2012-01-26 16:54:04   

@mariamontes: you're cross-posting, please read the forum rules, thank you. Already answered in your other thread

pernin / 2012-01-26 16:57:56   

@mgushanasjr: download works for me, do as I told you in my post

and please, read the forum rules regarding your other thread

yves / 2012-01-28 19:36:20   

^ (Edit) removed Google Fonts code - it now also works in in Safari 4.1.3 with no error

Thanks.

MRPW / 2012-02-12 15:29:41   

I had this working a while back, but something has changed, it may be because I have removed the expanding menus function.

Anyways, I download the new package and followed the instructions to sort of 'reinstall' it. I have the basics running - but not perfectly. The image is not fully see, so it cuts off a part, and there are scroll bars everywhere. I feel like this could be fixed easily if someone takes a quick look at my code. There is some conflict.

www.philwilson.ca

MRPW / 2012-02-12 15:29:51   

I had this working a while back, but something has changed, it may be because I have removed the expanding menus function.

Anyways, I download the new package and followed the instructions to sort of 'reinstall' it. I have the basics running - but not perfectly. The image is not fully see, so it cuts off a part, and there are scroll bars everywhere. I feel like this could be fixed easily if someone takes a quick look at my code. There is some conflict.

www.philwilson.ca

MRPW / 2012-02-12 15:31:06   

I had this working a while back, but something has changed, it may be because I have removed the expanding menus function.

Anyways, I download the new package and followed the instructions to sort of 'reinstall' it. I have the basics running - but not perfectly. The image is not fully see, so it cuts off a part, and there are scroll bars everywhere. I feel like this could be fixed easily if someone takes a quick look at my code. There is some conflict.

www.philwilson.ca

MRPW / 2012-02-12 16:24:37   

So I have also just realized that my iframed tumblr and all exhibits are not displaying correctly, this may be due to the z ordering. ARGH. I really need some help here. I am looking back over the install instructions and seeing if I fucked something up.

thevoyd / 2012-11-22 05:33:32   

Any chance someone can re-upload this plugin? every link seems to be dead for me. Thanks.

This thread has been closed, thank you.