This module allows you to do "more" with the visibility settings for each block, it allows you to use Regular Expressions and allows you to Negate expressions. Pretty much allows you to do anything you want visibility wise.
Sandbox: https://drupal.org/sandbox/dubcanada/2210429
Repo: http://drupalcode.org/sandbox/dubcanada/2210429.git
Git Clone: git clone --branch 7.x-1.0 dubcanada@git.drupal.org:sandbox/dubcanada/2210429.git block_visibility_extras
Pare View: http://pareview.sh/pareview/httpgitdrupalorgsandboxdubcanada2210429git
Reviews:
* https://drupal.org/comment/8543041#comment-8543041
* https://drupal.org/comment/8543027#comment-8543027
* https://drupal.org/comment/8543025#comment-8543025
I've also gone through this before, https://drupal.org/node/2104037 my theme just wasn't big enough to become a "full project" person.
Comments
Comment #1
dubcanada commentedComment #2
dubcanada commentedComment #3
dubcanada commentedComment #4
dubcanada commentedComment #5
PA robot commentedWe 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 #6
iampumaWorks great. Perhaps an extra check of the block module weight could be done in the block_visibility_extras_install() as this can be lower than -6.
Comment #7
dubcanada commentedI put up another check to adjust the weight based upon block module weight.
Also just a note if the project you review is in "Needs Review" after you review it you set it to "Reviewed & tested by the community" if it is good, otherwise you set it to "Needs Work". I've gone ahead and set the project to "RTBC".
Comment #8
dubcanada commentedComment #9
dubcanada commentedComment #10
barrapontoI don't want to hold this back but why does it need to change module weight? Why?
Comment #11
dubcanada commentedIt needs to happen before the block module runs. That way we can do the regex/negating of the blocks, then any that are left over are assumed to be the regular way and can be processed normally.
So it follows this.
-> Get Blocks
-> Check to see if blocks contain regex or negating
--> If blocks do, run the same functions as block module runs to determine visibility just with regex and negating parts.
--> If block doesn't ignore and let block module run.
Otherwise block module would throw up due to unexpected characters (regex).
Comment #12
barrapontoUnderstood. Does hook_module_implements_alter help you?
Relying on module weights is a pain.
Comment #13
dubcanada commentedIf you know another way to do it, let me know. hook_module_implements_alter appears (correct me if I am wrong) to lazy load hook calls? The problem is I need my module hook to run before the system/block.module hook. So it's a little bit trickier.
Comment #14
barrapontonope, hook_module_implements_alter can alter the order the implementations of a hook are called.
Comment #15
dubcanada commentedHrm it appears you are correct, my bad I guess I read that documentation wrong. It's on my list to add this in tomorrow.
Comment #16
klausiIt appears you are working in the "7.x-1.0" branch in git. You should really be working in a version specific branch. The most direct documentation on this is Moving from a master branch to a version branch. For additional resources please see the documentation about release naming conventions and creating a branch in git.
The following git branches do not match the release branch pattern, you should remove/rename them. See http://drupal.org/node/1015226
Review of the 7.x-1.0 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. You have to get a review bonus to get a review from me.
manual review:
Thanks for your contribution, dubcanada!
I updated your account so you can promote this to a full project and also create new projects as either a sandbox or a "full" project.
Here are some recommended readings to help with excellent maintainership:
You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and stay involved!
Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
Thanks to the dedicated reviewer(s) as well.