I would like to be able to test the banner to ensure that it displays in a way that looks appropriate for my site... is there a way to do this?
I would like to be able to test the banner to ensure that it displays in a way that looks appropriate for my site... is there a way to do this?
Comments
Comment #1
mgiffordIt's enabled by a block and blocks can be restricted to particular roles, so you can certainly do this.
Setting it up so that the view is exposed only to a particular role would do it also (and could be done by adding in user_access('view earth hour'); into the earth_hour_block() function). However that would make it harder to set up. Best to just use the blocks to do this I think.
Might also be useful to set up a test mode to display what the site will look like when it is disabled. Maybe a link in a configure page that would display a page that is what the users will see.
Could see about changing this next year, however earth hour is starting in a few hours in some parts of the world, so don't want to be rushing to put out a new release.
I do like the idea however and there will be other events where a countdown like this is useful to raise awareness that this could be applied to.
Comment #2
pumpkinkid commentedRight the configuration page method is the way I was hoping for, I just wanted to trigger it and ensure it would look right when Earth Hour Started!
Thanks for the module btw!
Comment #3
mgiffordMaybe we could put in a 30 second test button for the current user.
Comment #4
pumpkinkid commentedActually, I guess now more importantly is, how does the March 26, 2011 date fit into this module? do we upgrade just to change the date it is to trigger?
Comment #5
mgiffordI haven't looked at this code in a while, but I took out any hard coded dates in it. It should all be auto-generated. There shouldn't be a need to upgrade the module ever year, unless we add a new graphic or find a security problem with it.
With the upgrade to D7, I'm hoping to add a function to allow folks to more easily test this as I outlined above. Give folks more confidence in what it will look like in Earth Hour.
Comment #6
pumpkinkid commentedVery cool, but how are you having the code generate the date? Last year it was March 27th, this year its March 26th
Comment #7
mgiffordThere is probably a more elegant way to do it, but I wrote (or possibly borrowed) this function:
I don't think this was from the WordPress plugin, but not 100% sure.
Comment #8
pumpkinkid commentedVery nice! I didn't realize it always fell on the last Saturday of March.
So do you need any help coding the functionality to test the "blackout"? I was thinking the 30 second test button sounded great, and as you said, just for the current user testing it.
Comment #9
mgiffordAbsolutely, I could use some help testing.
I think I have it fixed for D7 actually, although that needs more testing too.
Which version are you interested in testing with? I have to back port the changes to D6 but definitely need to do that and reach out to get folks to upgrade too. I discovered an annoying bug with last year's code.
Comment #10
pumpkinkid commentedgrr, sorry for the double post...
Comment #11
pumpkinkid commentedSo you're saying D7 has the demo option? I use D6 primarily, but either one you need help with, Eventually my goal would be to move to D7, and I don't want to sacrifice functionality to do so... It would also benefit me as well to have a D7 install so just let me know. :-)
Comment #12
mgiffordI'm very frustrated trying to put out both a D6 & D7 version of this project.
I have a D6 version, but can't seem to force out a release. Send me an email and I'll send you a tarball to test.
Comment #13
mgiffordI've now put out a new d6/d7 version with the new git repository.
Worth checking out the versions for the testing functions.