Hi,

Thanks for those who have created and contributed to this module. I'm locking down a subdomain Drupal installation for an intranet. Instead of showing the default restricted message in the module I would like to have the user automatically redirected to the main public website (the non-subdomain website). So it would be great if there was an option to set a custom URL for the restriction message. It would also be great if we could set our own text for the restriction message through the admin interface.

Thanks!

Comments

jaypan’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

As of version 7.x-2.0-alpha1, the access denied page can now be fully customized, by implementing hook_restrict_ip_access_denied_page_alter(), and altering the page render array, either to add, change, or remove existing elements. If you need support with this, please re-open and give an example of what you would like to see.

If you would like to redirect to another site altogether, you can implement drupal_goto() in hook_restrict_ip_access_denied_page_alter(). Again, let me know if you need an example of how to implement this.

It's possible that I may add the functionality to set the text or to set a custom redirect through the admin interface in future versions of the module, however it is not something that will be part of the 7.x-2.0 branch.

Leeteq’s picture

For admins (non-programmers) who want to use this module and make use of such functionality, does it not make sense to at least document the examples on how to do it in the README.txt?

If not, that part of this module would be reserved for programmers only. That is not good for the adoption of this module, IMHO.

jaypan’s picture

Sure. But obviously I didn't think of it, so no need to get snippity, just ask. Version 2.0 is still in development.

I'll add that to alpha3.

jaypan’s picture

README.txt has been created and committed. It will be part of the 7.x-2.0-alpha3 release.