This module will help you have a super fast loaded blackout content, which will show up as a full-page overlay when enabled and let you manage a blackout for your Drupal site on the flay without the need to code or design, A WYSIWYG editor will do the trick for you.
- Blacks out the site with a custom WYSIWYG content which will show up as a full-page overlay when enabled.
- Have the option to switch the site blackout ON/OFF .
- Website admins are able to preview the Blackout content .. even if the blackout status was off.
- Have the option to exclude some URLs from having the blackout.
- You are able to change the CSS style at the site blackout configurations page.
- You can reset the name of the Cookie, If you want to reset showing the blackout for all users who select to show the old blackout.
- You are able to change the Close button title, Do not show title message .
- You are able to have users wait for number of seconds before they are able Allowed to close the blackout to prevent hiding the blackout if users keeps clicking on the page.
Demo link : http://natshah.com/blog/site-blackout
git clone --branch 7.x-1.x http://git.drupal.org/sandbox/RajabNatshah/2209183.git site_blackout
cd site_blackout
https://www.drupal.org/sandbox/rajabnatshah/2209183
Review Other module URL :
https://www.drupal.org/node/2718335#comment-11158873
https://www.drupal.org/node/2709047#comment-11166311
https://www.drupal.org/node/2718615#comment-11166485
Comments
Comment #1
PA robot CreditAttribution: PA robot commentedProject 1: https://www.drupal.org/node/2310391
Project 2: https://www.drupal.org/node/2065565
As successful completion of the project application process results in the applicant being granted the 'Create Full Projects' permission, there is no need to take multiple applications through the process. Once the first application has been successfully approved, then the applicant can promote other projects without review. Because of this, posting multiple applications is not necessary, and results in additional workload for reviewers ... which in turn results in longer wait times for everyone in the queue. With this in mind, your secondary applications have been marked as 'closed(duplicate)', with only one application left open (chosen at random).
If you prefer that we proceed through this review process with a different application than the one which was left open, then feel free to close the 'open' application as a duplicate, and re-open one of the project applications which had been closed.
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #2
PA robot CreditAttribution: PA robot commentedThere are some errors reported by automated review tools, did you already check them? See http://pareview.sh/pareview/httpgitdrupalorgsandboxRajabNatshah2209183git
We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)
Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #3
Rajab Natshah CreditAttribution: Rajab Natshah commentedComment #4
Mohammed J. RazemComment #5
Rajab Natshah CreditAttribution: Rajab Natshah commentedComment #6
IcreonGlobal CreditAttribution: IcreonGlobal commentedI just noticed few issues in my testing of this module.
1. I think you should also add a module configure link so that a user can quickly reach at module configuration page from modules list.
2. Inside the function _site_blackout_default_css(), i think you should avoid to write inline CSS and you can include this through an external file. See sample code below.
$filename = drupal_get_path('module', 'site_blackout') . "/site_blackout_admin_form.css";
$handle = fopen($filename, "r");
$contents = fread($handle, filesize($filename));
fclose($handle);
return $contents;
Right now coder module is throwing below warning due to inline CSS written in module file.
warning "Line 475: Use of Perl/shell style comments (sun) is discouraged. (Drupal Docs) [comment_comment_shell]
#site-blackout-close-button {" generated by coder module.
3. You can also delete variables set by this module after module uninstallation.
Comment #7
Rajab Natshah CreditAttribution: Rajab Natshah commentedOh Thanks Nikki. I will be having a progress work to have some changes.
1. quickly reach at module configuration page from module : I will do that .
2.CSS : The Idea of the Module is to have a super fast load of the blackout content.
Add to that I want site admins to the change the style in an easy way.
The Background of the Blackout dos not have to be a transparent of Black color it could be a Colored one.
Like Christmases colored Blackout message of the site.
Using some tools like http://www.cssmatic.com/
We could use this big style
So it is an easier way .. to copy the style then past in the background class at the CSS setting page. ( and it will load with the page and it will be faster than in a new file ).
About loading the file to Drupal's Variables is a good Idea I will use it. ( thanks :) )
3. delete variables set by this module after module uninstallation : yes sure it's a must have action.
Thanks a lot for your help ( appreciate your time )
Rewarding :)
Comment #8
Rajab Natshah CreditAttribution: Rajab Natshah commentedComment #9
Rajab Natshah CreditAttribution: Rajab Natshah commentedComment #10
Rajab Natshah CreditAttribution: Rajab Natshah commentedComment #11
Rajab Natshah CreditAttribution: Rajab Natshah commentedComment #12
Rajab Natshah CreditAttribution: Rajab Natshah commentedComment #13
Rajab Natshah CreditAttribution: Rajab Natshah commentedComment #14
Rajab Natshah CreditAttribution: Rajab Natshah commentedI have done many changes to the module and validated by pareview.sh.
http://pareview.sh/pareview/httpgitdrupalorgsandboxrajabnatshah2209183git
Please, Have a look and allow me to release it so that I can include a tutorial or Video tutorial of how to use the module.
Rewarding :)
Comment #15
Rajab Natshah CreditAttribution: Rajab Natshah commentedComment #16
pfu.mi@outlook.com CreditAttribution: pfu.mi@outlook.com commentedHi there,
I tried out your module, it works very nicely. Just a few things I have noticed:
a.) There are a few typos, in README.txt e.g. eidt, contnet, backout, swich. Also in the .module file I found some e.g. Exclud URLs. Maybe you go trough you files again (the translated content to the user) and correct these.
b.) In the exluded URLs tab you have to put every URL in the seperate line. If I have a lot of URLs on some path e.g. /path/url1, /path/url2 etc. I have to write every URL down, if I'm not mistaken. A Wildcard support would be a nice twist here, like /path/* or something.
c.) I noticed I had the permissions only to admin, logged out and I still could change the settings if I went to the URL directly:
/admin/config/system/site_blackout. I think you have to remove the lines "'access callback' => TRUE,'" at the $items in hook_menu. This would be needed if you want your own function to validate access, so for TRUE there would be a string for you function name. But in your case just remove them.
Comment #17
Rajab Natshah CreditAttribution: Rajab Natshah commentedThanks pfumi
a .. Will do that
b .. ( I had a progress work to commit ) Actually I will use a setting as in the block settings.
c .. Ok we will try that.
Thanks again for your time.
Rewarding :)
Comment #18
joachim CreditAttribution: joachim commented> have a super fast loaded blackout content
Could you explain what this means? I've no idea what this module does!
Comment #19
Rajab Natshah CreditAttribution: Rajab Natshah commentedHi Joachim,
This means .. that This Blackout will load faster than any other ways. as it's in the beginning of the page.. and it's CSS at the top of the page too.
So it will Blackout the site from the begging of loading the page. Only after HTML part of the page.
Before loading all image of the page.
Or any other third party services .. Like social buttons.
So this module helps you have a blackout on the site with a configuration page.
and it loads quick while the page still loading.
And no coding.. and you can edit your CSS in the config too.
Site Blackout settings page is at this link admin/config/system/site_blackout
So it's a Super Fast to have and load.
Thanks.
Comment #20
joachim CreditAttribution: joachim commentedWhat's a blackout?
Comment #21
Rajab Natshah CreditAttribution: Rajab Natshah commentedOh Joachim,
It's as you can see at the following links:
Wikipedia joins blackout protest at US anti-piracy moves
http://www.bbc.com/news/technology-16590585
In pictures: Sopa and Pipa protests see the web go dark
http://www.bbc.com/news/technology-16608314
Sites uses Blackouts to send a message to the world or their visitors.
Is that clear now.
Comment #22
joachim CreditAttribution: joachim commentedAh right. Thanks for the screenshots!
So in functionality, it's the same as core's built-in maintenance mode -- the site is inaccessible, apart from a simple front page.
Have you looked into whether you can work with the maintenance mode, rather than invent a whole new functionality?
Comment #23
Rajab Natshah CreditAttribution: Rajab Natshah commentedNo!! Joachim...
The site will still ON and functioning..
but that message or protests in the site blackout will show up on the load of any page in the site.
I think a Demo site is a must have to make sure that Developers or users get the point of the module quickly.
Rewarding :)
Comment #24
Mohammed J. Razem@joachim This doesn't replicate Maintenance mode.
It's a theme-related module to append an overlay that is handled by a cookie. This does not block the website. It blocks the UI and gives the option for the user to close it, and not show it again.
Many websites use an overlay for visitors, see: http://stream.aljazeera.com/.
The Al Jazeera one is implemented using this module.
Comment #25
PA robot CreditAttribution: PA robot commentedClosing due to lack of activity. If you are still working on this application, you should fix all known problems and then set the status to "Needs review". (See also the project application workflow).
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #26
Rajab Natshah CreditAttribution: Rajab Natshah commentedComment #27
ruscoe CreditAttribution: ruscoe commentedCouple of spelling errors in the admin UI
Exclud URLs, spirate lines
"Allow to close after" setting is not being set
You are using the JS setting Drupal.settings.site_blackout_allow_to_close_after, but you are not setting that value in the JavaScript. This breaks the "allow to close after" functionality.
I fixed it locally by adding these lines to
_site_blackout_front_content
insite_blackout.module
."Allow to close after" phrasing is confusing
This option at
/admin/config/system/site_blackout/close
implies the user won't be able to close the blackout window at all until the set time has passed. The user may actually close the blackout window at any time by clicking the close button; this setting only delays closing the window by clicking anywhere other than the close button. This option needs a description field to explain that behavior.Other than these issues, this module functions as described.
Comment #28
Rajab Natshah CreditAttribution: Rajab Natshah commentedThanks Dan,
Your points will be taken into consideration.
I will push more work and changes to the git repository.
Rewarding :)
Comment #29
PA robot CreditAttribution: PA robot commentedClosing due to lack of activity. If you are still working on this application, you should fix all known problems and then set the status to "Needs review". (See also the project application workflow).
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #30
Rajab Natshah CreditAttribution: Rajab Natshah commentedComment #31
Rajab Natshah CreditAttribution: Rajab Natshah commentedComment #32
Rajab Natshah CreditAttribution: Rajab Natshah commentedComment #33
klausiplease don't RTBC your own applications, see the workflow: https://www.drupal.org/node/532400
Comment #34
Rajab Natshah CreditAttribution: Rajab Natshah commentedNoted; I will be waiting .
Thanks.
Rewarded time :)
Comment #35
klausiWe are currently quite busy with all the project applications and I can only review projects with a review bonus. Please help me reviewing and I'll take a look at your project right away :-)
Comment #36
arthurbuliva CreditAttribution: arthurbuliva commentedI used an iframe for the content of the blackout page. Now my site appears all white and cannot undo the settings
Comment #37
Rajab Natshah CreditAttribution: Rajab Natshah commentedSure klausi .. I will help in reviewing. Thanks a lot for the direction.
arthurbuliva ... We do not have an IFrame in this module ... It should work . Make sure that you are using the the right HTML markups in the WYSIWYG.
Rewarded time :)
Comment #38
RavindraSingh CreditAttribution: RavindraSingh commentedThere are few security issues I have noticed:
// Use t() tu put the text.
Find the same in all other places too.
2. Your module name is site_blackout and you are also using _site_blackout in function name. update it with prefix site_blackout or use sommthing else if starts with _ (underscore).
Comment #39
klausi@RavindraSingh: that are not security issues?
And you should NOT use t() in hook_menu(), so the code is correct. See https://api.drupal.org/api/drupal/modules!system!system.api.php/function...
Underscores are used in Drupal to specify "private" functions, that are not part of the module's public API, so that is fine as well.
Comment #40
malcomio CreditAttribution: malcomio commentedAs mentioned in #20, it isn't obvious what a blackout is - the module page should explain this.
Comment #41
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot commentedMalcolm, Have you had a look at this link? https://www.drupal.org/sandbox/rajabnatshah/2209183
This module will help you have a super fast loaded blackout content, and let you manage a blackout for your Drupal site on the flay without the need to code or design, A WYSIWYG editor will do the trick for you.
Comment #42
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot commentedComment #43
ruscoe CreditAttribution: ruscoe as a volunteer commented@RajabNatshah, it would help if you update your description to explain that the module creates a full-page overlay when enabled. Without that context, the "blackout" functionality isn't obvious to everyone.
I was unable to reproduce the iframe issue in #36. iframe elements in the blackout page content functioned normally.
I recommend not showing the blackout overlay on any admin pages. I can't think of any reason you'd want to disable the site for an authenticated admin user.
Comment #44
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot commentedHi Dan,
YOU are right ..
1. I bettered up the description after your comment.
This module will help you have a super fast loaded blackout content, which will show up as a full-page overlay when enabled and let you manage a blackout for your Drupal site on the flay without the need to code or design, A WYSIWYG editor will do the trick for you.
2. I do have a very good Exclude URLs on specific pages at the back-end as you can see from the following screenshots :
http://natshah.com/blog/site-blackout
Rewarded work.
Thank you :)
Comment #45
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot commentedComment #46
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot commentedWe do have a set of permissions too
Comment #47
ruscoe CreditAttribution: ruscoe as a volunteer commentedEnabling excluded URLs works for the admin pages, so that's not a problem. Thanks for pointing that out.
There is a problem with the blackout close delay functionality in your JavaScript. On line 33 of site-blackout.js, you are passing an undefined variable as the time argument to setTimeout().
Please take a look at comment #27 for a suggested fix.
Comment #48
ruscoe CreditAttribution: ruscoe as a volunteer commentedComment #49
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot commentedThank you Dan, for remarking the issue.
Fixed the issue of undefined variable as the time argument for the blackout close delay functionality.To Send the value of variables to the JavaScript. so that we can control the view.
Rewarded work :)
Comment #50
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot commentedComment #51
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot commentedComment #52
ruscoe CreditAttribution: ruscoe as a volunteer commentedMuch better, the delay on closing the overlay works correctly now.
I spotted a security issue on my second pass. In your menu hook, you're setting
'access callback' => TRUE
on all the admin links. This allowed me to change the blackout settings as an anonymous user. You can remove that line from each menu item and the 'access arguments' property you already have will restrict access.You should fix this as soon as you can, as it's possible for any user to change the blackout settings on your demo site right now.
Comment #53
ruscoe CreditAttribution: ruscoe as a volunteer commentedComment #54
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot commentedThanks a lot Dan,
You are doing a real review for the module. Thanks for your time.
I have Removed 'access callback' => TRUE from all admin links.
Rewarded time working on this issue :)
Comment #55
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot commentedComment #56
klausiWe usually add the security tag when we find access bypass issues like this. Please don't remove it, we keep it for statistics and to show examples of security problems.
Comment #57
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot commentedOk .. Noted
Thanks Klaus :)
Comment #58
ashish.verma85 CreditAttribution: ashish.verma85 commentedhi, Nice module, i have tested the module, it works fine, few comments are:
1. it is recommended to add PHP version and package name in your .info file.
2. Hook_install is missing its always good to use it please check it here
3. FAPI elements '#title' and '#description' only accept filtered text, be sure to use check_plain(), filter_xss() or similar to ensure your $variable is fully sanitized. at some places its missing.
Comment #59
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot commentedThanks Ashish for your review.
Rewarded work :)
Comment #60
pburnette CreditAttribution: pburnette as a volunteer commentedDoes this module differ significantly from the Splashify module?
Comment #61
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot commentedHi pburnette,
Thanks for taking time to have a look at the module.
This module will help you have a super fast loaded blackout content, which will show up as a full-page overlay when enabled and let you manage a blackout for your Drupal site on the flay without the need to code or design, A WYSIWYG editor will do the trick for you.
Super fast loaded blackout content The way we did it is to have the fastest blackout .. not to show then cover
No extra libraries or extra modules stand a loan using JQuery only which comes with Drupal.
Completely different way it's a Blackout not random splashing windows.
Only load content from the site only not from other sites. No IFrames.
Rewarded time and work :)
Comment #62
ruscoe CreditAttribution: ruscoe as a volunteer commentedFollowing the Project Application Checklist:
1.1 Project page and repository look good.
- https://www.drupal.org/sandbox/rajabnatshah/2209183
- http://cgit.drupalcode.org/sandbox-RajabNatshah-2209183/tree/
1.2 Project appears to serve a distinct enough purpose to not duplicate the Splashify module or any others.
2.1 Repository contains a suitable amount of code for review.
3.1 All identified security issues have been fixed.
4.1 Repository does not contain a LICENSE.txt file.
4.2 Repository does not appear to contain any third party, non-GPL code.
5.1 Project page contains a detailed description of the module functionality.
5.2 Repository contains a suitably detailed README.txt file.
5.3 Code is well commented and readable.
6.1 An automated review identifies some minor code style issues, but nothing that should be a blocker. Results here.
Comment #63
Mohammed J. RazemThe module has passed Project Application Checklist and is marked as "Reviewed & tested by the community".
The main and most important difference from Spalishify, is that this module is a light-weight standalone module that requires no libraries or dependencies.
Comment #64
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot commentedComment #65
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot commentedMerry Christmas and
Happy new year
From http://rajab.natshah.com/blog/site-blackout
Comment #66
Rahul Seth CreditAttribution: Rahul Seth commentedHi RajabNatshah
Code seems to quite ok. But I noticed one thing while reviewing module.
Suggestion:- It would be good, if you place .tpl files in template folder
Comment #67
kattekrab CreditAttribution: kattekrab at Creative Contingencies commented@RajabNatshah - Congratulations! Your module is now RTBC!
Have you conducted reviews of other projects? If yes, make sure to add them to the issue summary, and then add the "PAReview: review bonus" tag to the issue to speed up approval of your module! More info on that here: https://www.drupal.org/node/1975228
Thanks so much for your contribution. This looks like a useful module.
Comment #68
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot commentedThank you :)
Comment #69
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot commentedComment #70
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot commentedComment #71
klausiRemoving review bonus tag, you have only listed one review of other projects in the issue summary. Make sure to read https://www.drupal.org/node/1975228 again.
Comment #72
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot commentedNoted klausi. Following on that.
Comment #73
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot commentedComment #74
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot commentedComment #75
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot commentedComment #76
klausiReview of the 7.x-1.x branch (commit a58d7cf):
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. You have to get a review bonus to get a review from me.
manual review:
<script>alert('blackout');</script>
as blackout content I will get a nasty javascript popup. Make sure to apply the configured text format and read https://www.drupal.org/node/28984 again.The last point is a security blocker right now. Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.
Comment #77
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot commentedClosing. Thanks for all your work. I lost interest in contributing this module to Drupal 7.
I think Drupal 8 will come with a better way to work
Removing the sandbox.