Public page on a limited site
Jamroom Developers
The next option is to do it with a module. Then you can allow anything through.
Looks like you already know this, but will outline anyhow.
If you create a simple module it will have its unique module url, say 'info' ( call the module xxInfo )
Its url on your site will be
yoursite.com/info
which will display whatever is in the file found at:
/modules/xxInfo/templates/index.tpl
Use the index.php file in your module to create a 'view' at whatever page you want to display
yoursite.com/info/about
would correspond to this function in your modules index.php
function view_xxInfo_about($_post, $_user, $_conf)
{
$_rep = array();
return jrCore_parse_template('about.tpl', $_rep, 'xxInfo');
}
That function reads
"When the url yoursite.com/info/about is accessed, go and find the template that exists at /modules/xxInfo/templates/about.tpl and display it."
So that takes care of getting the page displaying, put whatever you want in about.tpl. Its still not displaying for logged out users yet on limited privacy.
To get that working we need to register a listener in our include.php files _init() funciton. That looks like this:
function xxInfo_init(){
jrCore_register_event_listener('jrUser', 'site_privacy_check', 'xxInfo_site_privacy_check_listener');
return true;
}
function xxInfo_site_privacy_check_listener($_data, $_user, $_conf, $_args, $event)
{
switch ($_args['option']) {
case 'about':
$_data['allow_private_site_view'] = true;
break;
}
return $_data;
}
Is that enough to get you going?