Full sized background image that is randomized only on page refresh
Permalink 1 user found helpful
Is there an addon that will accomplish this... a full sized image for the page background that changes upon refresh only. It looks like there are a couple options to create rotating full-paged background slideshows in the addons Vegas & Dojo Supersized. Then, in the Backstretch addon it doesn't employ a slideshow but also doesn't appear to randomize either. Any thoughts?
Well I'm not sure whether any add-on do this or not. But here is a piece of code that might help you.
You need to put the code into your themes header.php file. Just put it before the closing head tag. Then go to dashboard -> File Manager and upload your preferred background images and put them all into a set. Then copy the file set name and replace it into the above code where it says "Your File Set Name".
That's it. I hope it will help you.
Rony
<?php Loader::model("file_set"); Loader::model('file_list'); $fs = FileSet::getByName('Your File Set Name'); $fl = new FileList(); $fl->filterBySet($fs); $files = $fl->get(); $key = array_rand($files); $files_value = $files[$key]; ?> <style type="text/css"> body { background-image:url('<?php echo $files_value->getRelativePath() ?>'); background-position: 0 0; background-repeat: no-repeat;
Viewing 15 lines of 18 lines. View entire code block.
You need to put the code into your themes header.php file. Just put it before the closing head tag. Then go to dashboard -> File Manager and upload your preferred background images and put them all into a set. Then copy the file set name and replace it into the above code where it says "Your File Set Name".
That's it. I hope it will help you.
Rony
However, I could create one for you within a couple days that does this. Private message me if interested, and let me know what your budget is.