-
☆ A M B ☆
- 24,524 Posts
What’s it doing or not doing?
Are you sure you checked the OnPageUnauthorized checkbox in the plugin’s system events tab?
Check the plugin to make sure there’s no typos or extra <?php tags or any other PHP errors like that; an error in the plugin will most likely just skip it and send you to your default unauthorized page.
Are you sure you have the template IDs correct? The pages you want to use as unauthorized pages exist, are not themselves protected and are published?
To debug, you can echo various values followed by exit() to see what is happening.
-
☆ A M B ☆
- 24,524 Posts
Try getting rid of the <? and ?> tags; in the first place you should never use short open tags (<? as opposed to <?php).
Thanks, that was perfect! Any idea why you need to include the open tags in snippets but not plugins?
-
☆ A M B ☆
- 24,524 Posts
With snippets the tags are included in the source automatically in the form textarea field as a convenience, to assist with syntax coloring editors. The code is passed as a parameter to the eval() function, so the tags actually don’t exist in the database.
Hm. I guess that makes sense? I just assumed it was a standard across all resources. Thanks.