Closed (fixed)
Project:
Background Images
Version:
7.x-1.0-beta2
Component:
Miscellaneous
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
29 Nov 2011 at 20:25 UTC
Updated:
19 Jul 2012 at 01:15 UTC
Is it currently possible to have this module switch out backgrounds automatically by schedule?
I haven't tested this module yet, but from initially reading the description, since it uses content types, is it possible to put the published backgrounds into a nodequeue so that it could randomly activate a set of background images?
Or is there another way?
Thank you,
Joe
Comments
Comment #1
drclaw commentedYou can't do what you want with this module. Even though it uses content types, it doesn't support modules like nodequeue to select the background image. It just uses context to select a specific background image for a particular element and that's it.
Random background images is a neat idea, but it may be a while before I'll be able to do something like that.
You could get the functionality you want pretty easily though by creating a view of the images you want, using the sort order "random". Then in a custom module, execute the view in a hook_init() and pull the image path and add the css inline with drupal_add_css()...
Comment #2
pkchoo commenteddrclaw, thanks for your reply. Unfortunately, I'm not a developer so what you're saying is not so easy :(. I did stumble across an example and snippet of php code I think I can use to make this happen.
Thank you,
Joe
Comment #3
drclaw commentedSounds good!
Comment #4
kirkcaraway commentedpkchoo, did you find a solution for rotating background images? If so, can you share? I'm looking for same solution. Thanks.
Comment #5
pkchoo commentedNo, I haven't implemented a solution for this yet. The client has allowed this to be put on the back burner for a little bit. I did find some solutions online that utilize some php to pull images from a folder. I will see about implementing that and will post my results here.
-Joe
Comment #6
drclaw commentedJust a question: Are we talking about rotating background images in some sort of slideshow-like way? Or do you just want the background image to be random when the page is loaded? (i.e. If you reload the same page over and over, each time a new random image will be applied to the bg)
Comment #7
pkchoo commentedHello drclaw,
Actually, yes. I just want the site's background to randomly change each time the pages are loaded.
So, this module will do that? I do NOT need slideshow functionality. I was just looking for a way set up a bunch of different backgrounds that will randomly display on pageload, sitewide.
-Joe
Comment #8
drclaw commentedDoesn't do it right now... but maybe this could be something that I add as an option to the bg_image context module? Instead of choosing a specific node, you could maybe just tick a box that chooses a random image from all the nodes of the configured node type? That would be quite easy actually...
Comment #9
pkchoo commentedThis would be great!
I haven't had an opportunity to use the module yet, does it only control the background per node? Does it allow us to control the background sitewide, as well?
Thank you!
Comment #10
drclaw commentedYou can change the background any way you like using the background image context module (included in the project download). Nodes are just used as the interface to upload and manage the images.
Comment #11
drclaw commentedThis will be committed soon!
Comment #12
pkchoo commentedAh... can't wait for the release :)
Comment #13
drclaw commentedOkay, I committed a first attempt at random image generation - 7.x-1.0-beta2. Give it a try. Hopefully it's what you need. Let me know what you think!
Comment #14
drclaw commentedI think it's working pretty well. We can re-open if problems arise.
Comment #15
pkchoo commenteddrclaw, thank you for working on this. I haven't had an opportunity to test this out yet. Hopefully, I can in the next week or two.
Thank you!
-Joe
Comment #16
drclaw commentedGreat. No problem. It was a good idea. Let me know if it works for you when you get a chance.
Comment #18
freescholar commentedAwesome work drclaw:)
Comment #19
drclaw commentedThank you DrupalConnection!