Add a custom page for your website. You may use menu builder component to link those pages to any menu.
1.4
1.5
Yes, you didn't add the two slashes to the line I left in place as a reference
// ossn_register_admin_sidemenu('admin:cpages', 'admin:cpages', ossn_site_url('administrator/settings/cpages?mpage=list'), ossn_print('admin:sidemenu:settings'));
Instead of disabling it this way, you can remove the line completely
The entry will appear like
I changed it like that:
function com_pages_init() {
ossn_extend_view('css/ossn.default', 'cpages/css');
ossn_extend_view('js/opensource.socialnetwork', 'cpages/js');
ossn_register_site_settings_page('cpages', 'settings/admin/cpages');
ossn_register_admin_sidemenu('admin:cpages', 'admin:cpages', ossn_site_url('administrator/settings/cpages?mpage=list'), ossn_print('admin:sidemenu:settings'));
ossn_register_menu_item('admin/sidemenu', array(
'name' => 'admin:cpages',
'text' => ossn_print('admin:cpages'),
'href' => ossn_site_url('administrator/settings/cpages?mpage=list'),
'parent' => 'admin:sidemenu:settings',
));
if(ossn_isAdminLoggedin()) {
ossn_register_action('cpages/add', PAGES . 'actions/add.php');
ossn_register_action('cpages/edit', PAGES . 'actions/edit.php');
ossn_register_action('cpages/delete', PAGES . 'actions/delete.php');
}
ossn_register_page('p', 'com_pages_page_handler');
}
but it's not working, did I do something wrong?
thank you! :)
Yes, v1.3 is not yet compatible with latest way of admin menu registering. The com file needs a change like
// ossn_register_admin_sidemenu('admin:cpages', 'admin:cpages', ossn_site_url('administrator/settings/cpages?mpage=list'), ossn_print('admin:sidemenu:settings'));
ossn_register_menu_item('admin/sidemenu', array(
'name' => 'admin:cpages',
'text' => ossn_print('admin:cpages'),
'href' => ossn_site_url('administrator/settings/cpages?mpage=list'),
'parent' => 'admin:sidemenu:settings',
));
locale is not translated properly:
This is the language file:
The word "Einstellungen" is translated, but not in the way I wrote it
"admin:cpages" should be "benutzerdefinierte Seiten", but it isn't
I just copied the english locale file and changed it, like I do it always
So to make my own page with php, js and html code i ned to set up my custom component??
Thanks
Done
@Thomas
What kind of php code inside of custom pages you want?
A modification in component to allow some codes with specific tag, such as << USERNAME >> or << SITE_NAME >> (whitout spaces) to show user or site name is not a hard job. But this is just an idea
@Arsalan
GitHub page shows version 1.0. Can you update the repository?
Thomas, you can't set php code using the component for a custom php code see a Hello World component https://www.opensource-socialnetwork.org/component/view/167/hello-world