Indexhibit
Index + Exhibit

Login:

Created by
Daniel Eatock
Jeffery Vaska
And You

Indexhibit was updated to version 2.1.4 on April 10, 2017.

Plugin: Random Background main page

 

Indexhibit version: Legacy
Thread is not resolved.

simsim
FRANCE
7 year(s) ago
Permalink Post

hi,
for few hours i try to set my main backgroud as a random set of images. til not working, no images are showned
i installed the plug in and did the modifications on my index, set the folder and so on.
i understand the general fonctions of the codes but i'm not a professional nor an amateur.
would anyone be kind and have a quick look on my page and give me any possible explanation on why it's not working
thanks

www.etc-projects.eu

johangafvels
SWEDEN
7 year(s) ago
Permalink Post

Hi all!

I installed the random image plugin and it seems to work ok .However, now in the very upper left corner of my site is a piece of code showing that looks like the greater than/less than symbols.

Here's my site http://www.johandemo.se/
Im just starting building this site...

Seems like this might be an easy fix I'm just not sure where to do this at. How do I get rid of the greater than/less than symbols?

johangafvels
SWEDEN
7 year(s) ago
Permalink Post

Hi all!

I installed the random image plugin and it seems to work ok. However, now in the very upper left corner of my site is a piece of code showing that looks like the greater than/less than symbols.

Here's my site http://www.johandemo.se/
Im just starting building this site...

Seems like this might be an easy fix I'm just not sure where to do this at. How do I get rid of the greater than/less than symbols?

Best/
Johan (Sweden)

johangafvels
SWEDEN
7 year(s) ago
Permalink Post

Sorry for the dubbelpost :P

keevin0909
UK
7 year(s) ago
Permalink Post

Hi there, i've downloaded the plugin and and made the changes as per instruction. The random background images worksbut it doesn't cover the whole screen and i'm getting the below javascript error

Webpage error details

Message: 'style' is null or not an object
Line: 9
Char: 5
Code: 0
URI: http://www.darrenbonello.com/ndxz-studio/site/js/full_background.js.

i've check the css the class #the-background has been define, not really sure what going on can someone please help.

www.darenbonello.com

cheers

arsondpi
GREECE
7 year(s) ago
Permalink Post

...this works if you update the current version of jquery - be careful though you may need to update the thickbox plugin cause it won't work.

keevin0909
UK
7 year(s) ago
Permalink Post
  1. function rnd_full_background($folder='')
  2. {
  3.     
  4. ¬†¬†¬†¬†// this is for global file handling:
  5.     
  6. ¬†¬†¬†¬†global $rs;
  7.     
  8. //¬†¬†¬†¬† ¬†¬†¬†¬†the following (inactive) if-rule makes the random image choice affect only the home site "/". 
  9. //¬†¬†¬†¬†¬†¬†¬†¬†if you want this to be the case, uncomment lines 29-30 & don't forget to un-comment the corresponding bit at the end
  10. //¬†¬†¬†¬†¬†¬†¬†¬†of the plugin!¬†¬†¬†¬†¬†¬†¬†¬†
  11.         
  12. ¬†¬†¬†¬†¬†¬†¬†¬†if ($rs['url'] == '/')
  13.         {

//        Here we check whether there is a background defined in indexhibit cms and if so, scale it.
                
        if ($rs['bgimg'] != '') {
        //     here, we get the dimensions of the browser window for the image
            $size = getimagesize(DIRNAME . '/files/' . $rs['bgimg']);
        //    ..and make a html tag of it.    
            return "";
        }    
        
//        if there isn't a set image, well take a rondom one.
        else
        {
            // get the images from the specified folder (thanks, Vaska!)
            $path = DIRNAME . "/$folder/";

            if (is_dir($path))
            {
                if ($fp = opendir($path))
                {
                    while (($module = readdir($fp)) !== false)
                    {
                        if ((eregi("jpg$", $module)) || (eregi("gif$", $module)) || (eregi("png$", $module)))
                        {
                            $images[] = $module;
                        }
                    }
                }
                closedir($fp);
            }

            $image = count($images);
            $rand = rand(0, $image-1);

            $show = BASEURL . "/$folder/" . $images[$rand];

            // get the dimensions (Note the variable show being used for the url to the rnd image)
            $size = getimagesize($show);
            return "";

        // I decided to comment out the output of the $style, since the image is not set as background picture
        // but just a regular . This would be a nice place to input some style, though.
        
            // Vaska says: this 215px setting may need to be adjusted if you have altered your Index in the template
            // $style = "body { background: url($show) no-repeat #333 0 0 }\n";
            // return $style;

// !!! See line 19: Don't forget to un-comment this following bit, (74-76) if you want the randomness only on the main page!!!

//         }
//        else
//        {
        }
        return;
        }

}

Thats the one i'm using isn't it the latest one?

vikki
UK
7 year(s) ago
Permalink Post

My site was working perfectly and then I added this plugin. The plugin works perfectly but has somehow disabled my expanding menu and randomly the link to the blog which was added in the post nav text box. Double checked the code for the menu and link to the blog and everything looks the same as it did before I added the background plugin.

Really stuck and no clue why this has happened, any help would be great.

Thxs

http://www.fearlesslyfrank.com/

vikki
UK
7 year(s) ago
Permalink Post

In fact no external links work???

carmesine
SPAIN
7 year(s) ago
Permalink Post

I've placed the code in the line 28 of my index.php inside the folder sample, inside site...

with this code:



and I placed the plugin on the plugin folder...
and the folder on the root, directly inside my folder Public.

Did I've made something wrong? as it is not working...

Thank you very much for your help and for the template. I love it.

  1. www.carmesine.com<strong></strong><em></em><blockquote></blockquote>
ftm
UK
7 year(s) ago
Permalink Post

Hello,

Trying to get this plugin to work and stumbled at first hurdle! - where in my root folder do I load my images to? - can't seem to find a background folder.

any help greatly appreciated

thanks!

zema
ITALY
7 year(s) ago
Permalink Post

Hello everyone, great plugin!
I would like to show the background images in every pages of my site, any suggestions?

thanks!

zema
ITALY
7 year(s) ago
Permalink Post

Hello everyone, great plugin!
I would like to show the background images in every pages of my site, any suggestions?

thanks!

noemicaruso
ITALY
7 year(s) ago
Permalink Post

ciao zema could you explain me ho you did your background images???...I'm really bad and I need a step by step!

thanks a lot!

zema
ITALY
7 year(s) ago
Permalink Post

ciao noemi, ho seguito le istruzioni ed è andato.

copia questo

plug:ndxz_rand_bg 'files/rndm_imgs','false' nella pagina index.php del tuo tema

al posto di 'backgrounder'.

'files/rndm_imgs': è il percorso della cartella (rndm_imgs) dove ho messo le immagini, ovvero nella cartella files

'false': è il parametro per non visualizzare lo sfondo ripetuto, se lo vuoi ripetuto devi scrivere 'true'.

spero di esserti stato d'aiuto, io non sono troppo ferrato, non so come ci son riuscito!

cristinatorres
SPAIN
7 year(s) ago
Permalink Post

I've had installed the plugin, and It appears this error in my webpage:

Parse error: syntax error, unexpected ':' in /homepages/1/d321491657/htdocs/proves/ndxz-studio/site/plugin/plugin.ndxz_rand_bg.php on line 49

check the web:www.hrsolimar.es

Can somebody help me? thanks!

cristinatorres
SPAIN
7 year(s) ago
Permalink Post

I've had installed the plugin, and It appears this error in my webpage:

Parse error: syntax error, unexpected ':' in /homepages/1/d321491657/htdocs/proves/ndxz-studio/site/plugin/plugin.ndxz_rand_bg.php on line 49

check the web:www.hrsolimar.es

Can somebody help me? thanks!

katu
NETHERLANDS
7 year(s) ago
Permalink Post


thanks to indexhibit!!! great, I started from zero and came a bit further :-)

my site: www.salonsurplus.org (link under contact)

I installed the random- background- plugin, it works, but I want the background also behind the menu (full- browser), but it doesn´t work. (backgroundcolor is transparent)
any remarks?

katu
NETHERLANDS
7 year(s) ago
Permalink Post

oh yeah...the link:

salonsurplus

katu
NETHERLANDS
7 year(s) ago
Permalink Post

SORRY...NEVERMIND! I solved it (because I used wrong style- sheet)

gcolefla
UNITED STATES
7 year(s) ago
Permalink Post

I fixed the error in the random background plugin to allow for the correct tiling of images without further modification.

Random Background Fixed

Install information copied and updated from top of this thread.

How to install?
Download and add the plugin into your /ndxz-studio/site/plugin folder.

You need to edit your template's index.php file in a text or code editor.

  1. Replace the 'backgrounder' plugin on line 29 
  2. <plug:backgrounder color='... />
  3. with
  4. <plug:ndxz_rand_bg folder_name,tiling >
  5.  
  1. corect examples would be examples would be 
  2. <plug:ndxz_rand_bg http://yoursite.com/files/randomBG,false /> 
  3. or 
  4. <plug:ndxz_rand_bg /files/randomBG,true /> 
  5.  

in the examples above, /randomBG would be a folder of images created in /files (a folder shown in the root directory

gcolefla
UNITED STATES
7 year(s) ago
Permalink Post

I fixed the error in the random background plugin to allow for the correct tiling of images without further modification.

Random Background Fixed

Install information copied and updated from top of this thread.

How to install?
Download and add the plugin into your /ndxz-studio/site/plugin folder.

You need to edit your template's index.php file in a text or code editor.

  1. Replace the 'backgrounder' plugin on line 29 
  2. <plug:backgrounder color='... />
  3. with
  4. <plug:ndxz_rand_bg folder_name,tiling >
  5.  
  1. corect examples would be examples would be 
  2. <plug:ndxz_rand_bg http://yoursite.com/files/randomBG,false /> 
  3. or 
  4. <plug:ndxz_rand_bg /files/randomBG,true /> 
  5.  

in the examples above, /randomBG would be a folder of images created in /files (a folder shown in the root directory

BrendanRyan
UNITED STATES
7 year(s) ago
Permalink Post

I'm having no luck with this! Is there anyway some other code could be conflicted with it? I can't see how I could have gone wrong on the installation, but have been chipping and adding to the index.php and style.css?

www.brendanryan.ie

BrendanRyan
UNITED STATES
7 year(s) ago
Permalink Post

Nevermind! ROOT FOLDER!!!

The "Fixed" plugin was behaving oddly though so I reverted to the old one & changed the trues to false.

The top half of the image was off screen.

gcolefla
UNITED STATES
7 year(s) ago
Permalink Post

I made an error in the code, I forgot I was playing around with some centering and forgot to revert back to the original. The file has been updated, should work now. It will load a random background at the normal location. Sorry about that, Thanks for testing it for me.

zematz
FRANCE
7 year(s) ago
Permalink Post

Hi all,
I just don't get it
Here is my installation but i've nothing

I put "plugin.ndxz_rand_bg.php" here :
mysite.fr/ndxz-studio/site/plugin

I changed the code in this file :
mysite.fr/ndxz-studio/site/sample/index.php

For that in line 28 :
plug:ndxz_rand_bg http://www.mysite.fr/files/rndm_imgs,false

I created a folder here with my random images :
mysite.fr/files/rndm_imgs

I've several images in there but i just don't see them in my main page.

http://www.mathieulagarderephoto.fr/

Any tips ?
Thanks
Mat

albertom
ITALY
7 year(s) ago
Permalink Post
I wrote this code in index.php ,
but I would like the image is not repeated http://www.serenaclessi.com/

Thanks

albertom
ITALY
7 year(s) ago
Permalink Post

I wrote this code in index.php plug:ndxz_rand_bg files/bg,false,
but I would like the image is not repeated http://www.serenaclessi.com/

collie
CANADA
7 year(s) ago
Permalink Post

I still don't understand.

Whenever I look at my index.php text file I can't see what the "old" backgrounder plugin should look like?

I'm looking at the index.php file from the plugins directory, the current snippet of code I'm looking to replace is: (/site/plugin/index.php)

// background image is fixed attachment
function backgrounder($color='', $img='', $tile='')
{
    if (($color == '') && ($img = '')) return;
    
    $style = (strtolower($color) != 'ffffff') ? "background-color: #$color;" : '';
    
    $tile = ($tile != 1) ? 'no-repeat' : 'repeat';
    
    $style .= ($img != '') ? "nbackground-image: url(".BASEURL."/files/$img);nbackground-repeat: $tile;nbackground-position: 215px 0;nbackground-attachment: fixed;n" : '';
    
    // nothing to add
    if ($style == '') return;

    return "nbody { $style }n";
}

So I replace all this with the new piece of code? For example pasting this in:

It doesn't seem to work for me, I can't find any bits of code with plug: in there either?

collie
CANADA
7 year(s) ago
Permalink Post

Basically I can fix this but every index.php file I've looked at I simply cannot find

plug:backgrounder

It's not on line 29??

05531N
MEXICO
7 year(s) ago
Permalink Post

Hello, I have already installed the random background image plugin without a problem, but still I can't change the background color, It remains in white even tough I already add the pieces of code posted in this thread before to modify it. Any clues?

Here is the correspondent link:

http://marybijoucabaret.co.cc/main/Webpage

05531N
MEXICO
7 year(s) ago
Permalink Post

Hello, I have already installed the random background image plugin without a problem, but still I can't change the background color, It remains in white even tough I already add the pieces of code posted in this thread before to modify it. Any clues?

Here is the correspondent link:

http://marybijoucabaret.co.cc/main/Webpage

collie
CANADA
7 year(s) ago
Permalink Post

Finally! I didn't click that the theme I was working on was the wrong one!

http://christophercollie.com/

However, the image doesn't auto scale? I thought it did?

Soldeus
SPAIN
7 year(s) ago
Permalink Post
  1. Hi Vaska, im trying to use this plugin on a website im working on. I did all the things like you say in the installing guide. Uploaded the plugin, changed the Sample/index.php backgrounder plugin to:
  2. <plug:ndxz_rand_bg 'files/image',false />
  3. but it doesnt seem to work. The images have no strange characters(just uppercase, and numbers). Any idea?

Thanks for your help.

pernin
SWEDEN
7 year(s) ago
Permalink Post

url?

Soldeus
SPAIN
7 year(s) ago
Permalink Post
  1. Hi Vaska, im trying to use this plugin on a website im working on. I did all the things like you say in the installing guide. Uploaded the plugin, changed the Sample/index.php backgrounder plugin to:
  2. <plug:ndxz_rand_bg 'files/image',false />
  3. but it doesnt seem to work. The images have no strange characters(just uppercase, and numbers). Any idea?

The website is : www.restaurantecasaagustin.es
Thanks for your help.

Soldeus
SPAIN
7 year(s) ago
Permalink Post
  1. Hi Vaska, im trying to use this plugin on a website im working on. I did all the things like you say in the installing guide. Uploaded the plugin, changed the Sample/index.php backgrounder plugin to:
  2. <plug:ndxz_rand_bg 'files/image',false />
  3. but it doesnt seem to work. The images have no strange characters(just uppercase, and numbers). Any idea?

The website is : www.restaurantecasaagustin.es
Thanks for your help.

Soldeus
SPAIN
7 year(s) ago
Permalink Post
  1. Hi Vaska, im trying to use this plugin on a website im working on. I did all the things like you say in the installing guide. Uploaded the plugin, changed the Sample/index.php backgrounder plugin to:
  2. <plug:ndxz_rand_bg 'files/image',false />
  3. but it doesnt seem to work. The images have no strange characters(just uppercase, and numbers). Any idea?

The website is : www.restaurantecasaagustin.es
Thanks for your help.

Soldeus
SPAIN
7 year(s) ago
Permalink Post
  1. Hi Vaska, im trying to use this plugin on a website im working on. I did all the things like you say in the installing guide. Uploaded the plugin, changed the Sample/index.php backgrounder plugin to:
  2. <plug:ndxz_rand_bg 'files/image',false />
  3. but it doesnt seem to work. The images have no strange characters(just uppercase, and numbers). Any idea?

The website is : www.restaurantecasaagustin.es
Thanks for your help.

Soldeus
SPAIN
7 year(s) ago
Permalink Post

omfg, sorry por this uber multipost, first time posting here and appeared and error So I though I didnt post anything :S

hhasan
UNITED STATES
6 year(s) ago
Permalink Post

So I read through all the posts (perhaps not entirely carefully) but I can't find a certain issue I'm having.

My background randomly scales, and I've checked the plugin code as well as the index.php for my template (Sample). If you hit the reload button (or command/control R) and see the reloading action, you'll notice how the images randomly scale. This is annoying, and no one else seems to have this problem.

What do you all think the problem could be? Thanks for all the help, and excellent forum community out there.

My site is at hhasan.com.

gsadesign
UNITED STATES
6 year(s) ago
Permalink Post

Hello all...

I have done everything I can find to make the random background plug-in work on this site - http://www.davidbenzler.com

I am trying to get it to look like this site, with the homepage image rotating - http://alexkopps.com/

The plug-in keeps repeating the background, even though I have it set as 'false'.

Please let me know any ideas you have.
I REALLY appreciate it.

Thanks, Geoff

golgoth13
FRANCE
6 year(s) ago
Permalink Post

@David:
did you edit the original plugin ? line 46
from: $tile = ($tile == true) ? 'repeat' : 'no-repeat' etc.
to: $tile = ($tile == "true") ? 'repeat' : 'no-repeat' etc.

golgoth13
FRANCE
6 year(s) ago
Permalink Post

@David:
did you edit the original plugin ? line 46
from: $tile = ($tile == true) ? 'repeat' : 'no-repeat' etc.
to: $tile = ($tile == "true") ? 'repeat' : 'no-repeat' etc.

golgoth13
FRANCE
6 year(s) ago
Permalink Post

for people like me, having a pain in the ass struggling since days to fix the tiling and white background issues, I attempt to release a 1.0.2 fixed version, following 1.0.1 fixed version by gcolefa.
So there you have to edit the plugin in order to have the desired background color...
Enjoy people !
plugin.ndxz_rand_bg_fixed

danielamr
GERMANY
6 year(s) ago
Permalink Post

Hello everybody, hello Vaskia,

I think I follow the instructions, but I don't see it doesn't work on my website

I put "plugin.ndxz_rand_bg.php" in my ftp application :
ndxz-studio/site/plugin

I changed the code in the file :
ndxz-studio/site/sample/index.php

For that in line 28 :
plug:ndxz_rand_bg http://www.mysite.com/files/random,true
I also tried this :
plug:ndxz_rand_bg random,true
and also different combinaisons

I created a folder here with my random images :
mysite.com/files/random

I can't see any image on my main page, and now I even can't see the others sections.
I have this message :
Fatal error: Call to undefined function backgrounder() in /homez.424/danielam/www/ndxz-studio/site/plugin/plugin.ndxz_rand_bg.php on line 54

Do you have an idea please??

Thank you,

www.danielamacerossiter.com

danielamr
GERMANY
6 year(s) ago
Permalink Post

Hello everybody, hello Vaskia,

I think I follow the instructions, but I don't see it doesn't work on my website

I put "plugin.ndxz_rand_bg.php" in my ftp application :
ndxz-studio/site/plugin

I changed the code in the file :
ndxz-studio/site/sample/index.php

For that in line 28 :
plug:ndxz_rand_bg http://www.mysite.com/files/random,true
I also tried this :
plug:ndxz_rand_bg random,true
and also different combinaisons

I created a folder here with my random images :
mysite.com/files/random

I can't see any image on my main page, and now I even can't see the others sections.
I have this message :
Fatal error: Call to undefined function backgrounder() in /homez.424/danielam/www/ndxz-studio/site/plugin/plugin.ndxz_rand_bg.php on line 54

Do you have an idea please??

Thank you,

www.danielamacerossiter.com

danielamr
GERMANY
6 year(s) ago
Permalink Post

Hello everybody, hello Vaskia,

I think I follow the instructions, but I don't see it doesn't work on my website

I put "plugin.ndxz_rand_bg.php" in my ftp application :
ndxz-studio/site/plugin

I changed the code in the file :
ndxz-studio/site/sample/index.php

For that in line 28 :
plug:ndxz_rand_bg http://www.mysite.com/files/random,true
I also tried this :
plug:ndxz_rand_bg random,true
and also different combinaisons

I created a folder here with my random images :
mysite.com/files/random

I can't see any image on my main page, and now I even can't see the others sections.
I have this message :
Fatal error: Call to undefined function backgrounder() in /homez.424/danielam/www/ndxz-studio/site/plugin/plugin.ndxz_rand_bg.php on line 54

Do you have an idea please??

Thank you,

www.danielamacerossiter.com

danielamr
GERMANY
6 year(s) ago
Permalink Post

Hello everybody, hello Vaskia,

I think I follow the instructions, but I don't see it doesn't work on my website

I put "plugin.ndxz_rand_bg.php" in my ftp application :
ndxz-studio/site/plugin

I changed the code in the file :
ndxz-studio/site/sample/index.php

For that in line 28 :
plug:ndxz_rand_bg http://www.mysite.com/files/random,true
I also tried this :
plug:ndxz_rand_bg random,true
and also different combinaisons

I created a folder here with my random images :
mysite.com/files/random

I can't see any image on my main page, and now I even can't see the others sections.
I have this message :
Fatal error: Call to undefined function backgrounder() in /homez.424/danielam/www/ndxz-studio/site/plugin/plugin.ndxz_rand_bg.php on line 54

Do you have an idea please??

Thank you,

www.danielamacerossiter.com

danielamr
GERMANY
6 year(s) ago
Permalink Post

...sorry for the "invasion", it didn't look like it was working, now i see it did!

Showing 1 - 50 of 218 posts in Forum » Announcements » Plugin: Random Background main page
 

This thread has been closed, thank you.