This project is a simple button that provides a block with a button that "hides" the site. This is useful for sites where the content may be sensitive or "Not Suitable For Work". For example, for those people in vulnerable positions who are viewing private information they may wish others not to see.
The act of hiding the page is either showing a "fake"/cached version of a real page (so the transition is instant, or as close as can be), and/or redirecting to a real page.
- The button is theme-able using the Drupal theming system
- A keyboard shortcut can be assigned that will trigger the "page hide"
- The page cache mechanism is simple and tied to cron - it downloads the specified page and any images it can
- There are configurable options that include the button text, the keyboard shortcut, the page hiding mechanism and the URL to redirect to/cache
Sandbox project page is at http://drupal.org/sandbox/crispymix/1368318 (D7 only for now).
Git access: git clone --branch 7.x-1.x crispymix@git.drupal.org:sandbox/crispymix/1368318.git website_hider
Cheers!
Comments
Comment #1
patrickd commentedYour module has some coding style issues (See http://ventral.org/pareview/httpgitdrupalorgsandboxcrispymix1368318git, you can also use this site to re-test your self)
Your code has too feee...eeew comments, please explain your thoughts in-code so other developers don't have to re-think everything.
Comment #2
crispymix commentedHi - thanks for that. I've updated the code with more comments and it also now passes the coding style report.
Comment #3
crispymix commentedHi - its been more than two weeks since any further feedback has been posted (understandable over the holidays) but in accordance with http://drupal.org/node/539608 I'm changing the status of this application.
Thanks!
Comment #4
crispymix commentedComment #5
michaelmol commentedFirst of all, i think this module is quite funny :-), but you have some work to do:
Review of the 7.x-1.x branch:
This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. Go and review some other project applications, so we can get back to yours sooner.
You can repeat this review on http://ventral.org/pareview/httpgitdrupalorgsandboxcrispymix1368318git-7...
Manual review of the 7.x-1.x branch:
README.txt
website_hider.info
configure = admin/config/user-interface/website_hiderso that in the modules overview there is a link to the configuration page.website_hider.module
Other findings:
Comment #6
crispymix commentedThanks for all of the feedback! I've gone through and made all of the recommended changes.
BTW, I do see how this module could be quite amusing - but it really does have non NSFW based applications though (see http://www.voiceyp.org/ or http://www.childline.org.uk) :-)
Cheers
Comment #7
alex dicianu commentedHi,
There is a small notice when trying to save the admin settings:
Notice: Undefined property: stdClass::$data in _website_hider_fetch_url() (line 250 of .../drupal7/sites/all/modules/website_hider/website_hider.module).It's probably because I'm behind a proxy ...
I have just one question, I didn't understad what the difference is between this module and the maintenance mode ... besides the redirect.
Comment #8
crispymix commentedHmm I'll see if I can try and catch any possible error at the fetch stage.
This is completely different from putting a site in Maintenance Mode - this is for a live/active site and allows users to maintain some privacy if anyone suddenly appears behind their shoulder. Basically, users can press a key (defaults to Escape) or the click button and be navigated away to the designated site (defaults to Google). The cache is used so that it reacts immediately without a delay while the page loads. Its used on sites with sensitive content for people in vulnerable situations who need information without other people knowing (see previous examples). Does that make sense?
Thanks for the input!
Comment #9
patrickd commentedOh wow, at first I thought, that must be an easy module, but you made real science out of it! :D
All your hook_menu stuff should be contained in .module, don't include your admin.inc in global context if it is only needed on the admin page, and as you set the file argument of your menu path to the admin.inc, it will be loaded automatically.
this looks kind of ugly, btw: you only have to make sure that comments are not longer then 80 chars, code is okay!
if you really want to put this on a new line, indent it with 2 spaces. (you should generally do more indentation within arrays)
'cache' => DRUPAL_NO_CACHE,is it really necessary to re-build the block on every page request? if yes, you should waive the tpl file and use a theme function instead.. (to be at least a little more performant)looks like there's something wrong?
// Regenerate the cached page file every day,every day? actually it's regenerated on every cron-run ?the website_hider_redirect value is still in $form_state, saving the settings by system_settings_form_submit and then getting settings with variable get .. seems unnecessary.
print l($button_text, $redirect_to_url);seriously, a tpl file is really not necessary IMHOvalid_url()so long, I'll stop here and let you do some improvements ;)
you can raise the priority up again after another 2 weeks without response.
Comment #10
klausiClosing due to lack of activity. Feel free to reopen if you are still working on this application.