this is an extension patch of http://drupal.org/node/168403. by using access_*(), block visibility will able to define in Apache-mode, with Apache mod_authz_host syntax. e.g. if we hope to display a block for front page, user login page and admin pages only, we can define rules as:
Order Deny,Allow
Deny from all
Allow from <front>
Allow from user
Allow from ^admin.*
default style will be define as Order Deny,Allow. therefore if NO rules defined, the behavior will equal as "Show on every page except the listed pages." with empty rules.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | drupal-6.x-dev-apache_mode-0.2.1.patch | 7.38 KB | hswong3i |
| drupal-6.x-dev-apache_mode-0.2.patch | 7.06 KB | hswong3i |
Comments
Comment #1
hswong3i commentedminor update: bulky code cleanup, minor bug fix.
a small bug with no idea: if use <front> and then change front page setting, rules will not update since cached. a simple re-submit of block configuration page can solve this problem.
patch required: http://drupal.org/node/168403#comment-295952
Comment #2
hswong3i commentedsorry that this patch IS TOOOOO late within D6 development life cycle, and so i will postpone it for D7.
BTW, please consider about its powerful feature: we will able to define rules with a very powerful syntax, with very flexible handling, on the other hand without implementing our own filter rules by using complicated PHP-mode syntax (which is usually something TOOOOO much for normal site and project maintainers).
P.S. this syntax is something that i am even DREAMING for, during implement http://asia.playstation.com/ (a Drupal 4.7 + Oracle project). i can't imagine how many OT hours can be saved, if we are able to have this feature 1 year ago ;p
Comment #3
lilou commentedPatch no longer works against HEAD.
Such feature should be in a contrib module. Related discussion : #228594: UMN Usability: split access rules into an optional module
Comment #4
casey commentedI agree this definitely should be a contrib module.
Instead of pushing this to D8 a suggest setting this to won't fix.
Feel free to reopen however.
Comment #5
casey commentedwhoops