So currently, to add a new page in a component, you do it like this
function some_component_init() {
ossn_extend_view('profile/pages/profile', 'js/somejs');
ossn_register_page('new-page', 'ossn_new_page');
}
ossn_register_callback('ossn', 'init', 'some_component_init');
This works but to access the page http://yourwebsite.com/new-page
you need to be authenticated.
Is there a method that allows anonymous/unauthenticated users to access this page?
Any help would be much appreciated.
Update:
Adding require_once('system/start.php');
fixed it. Though it would be nice to have a registered unauthenticated page component.
@Bansh33 because if I do that, I don't have access to things like ossn_user_by_email('[email protected]');
. I get 500 error ( Call to undefined function ossnuserby_email()). Or is there a way to access functions like this in an unauthenticated page?
why do you need/want to do it through a component if you don't care whether or not the user is unauthed? Why not just make a new directory called 'new-page' in your public_html directory?
Due to the many requests in the past for additonal features and components we have decided to develope a premium version. Features like Hashtags, Videos, Polls, Events, Stories, Link Preview, etc included in it.
$199 (Life Time)