How do i use a custom index.php page i built as an index in OSSN 4.x Component development
Hi @Zet Man
i have resolve the issue, but i have 1 problem left.
how do i use an icon for menu?
Your component is missing a page handler.
Study the code and structure of the TETRIS game component. That's a simple example and you'll get an idea.
I am not trying replacing the OSSN custom index
i want a plugin to use a custom page for it's page
here's my code .
For ossn_com.php
<?php
function hellos_init(){
$hellos_url = ossn_site_url().'hellos';
$icon = ossn_site_url('components/hellos/images/hi.png');
ossn_register_sections_menu('newsfeed', array(
'text' => 'Hello World',
'url' => $hellos_url,
'section' => 'links',
'icon' => $icon
));
ossn_register_page('hellos', 'hellos_page');
}
function hellos_page(){
$title = 'Hellos';
$contents = array('content' => ossn_view('components/hellos/index'));
$content = ossn_set_page_layout('contents', $contents);
echo ossn_view_page($title, $content);
}
ossn_register_callback('ossn', 'init', 'hellos_init');
?>
and my index.php
<?php
echo "Hello World";
?>
Pardon? It's not quite clear what you are trying to achieve.
A component may replace Ossn's default index.php. Yes. But it's completely up to YOU what code you're putting on it. :)
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)