Custom Site Pages Download 1.5

This component/theme works with latest OSSN version.
5.0
Indonesian Arsalan Shah 6 years ago

Add a custom page for your website. You may use menu builder component to link those pages to any menu.

Custom Page
Custom Page View

1.4

  • Fixed the issue with OSSN 6.6

1.5

  • Allow you to use style and script tags.
Comments
German Michael Zülsdorff Replied 3 years ago

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
enter image description here

German Dominik L Replied 3 years ago

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?

German Dominik L Replied 3 years ago

thank you! :)

German Michael Zülsdorff Replied 3 years ago

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',
	));
German Dominik L Replied 3 years ago

locale is not translated properly:

enter image description here

This is the language file:

enter image description here

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

Welsh Thomas Nikidiotis Replied 4 years ago

So to make my own page with php, js and html code i ned to set up my custom component??

Breton Rafael [redcrested.net] Replied 4 years ago

Thanks

Indonesian Arsalan Shah Replied 4 years ago

Done

Breton Rafael [redcrested.net] Replied 4 years ago

@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?

Indonesian Arsalan Shah Replied 4 years ago

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

Component

Developer: Arsalan
License ossnv3
Type: Site admin
Requires OSSN Version : 5.0
Latest Version: 1.5
Last Updated 3 years ago
Repository Url View Repository