HOW to create custom page?

I tried to create custom page. what i did is clone about_us.php and rename it to fec.php, inside the file I've change

the content/language keys and after that i went to menu builder and add new_item with link to fec.php.

so far it was good.

the problem is that i need to add blocks (like in pages builder) to the page, and i don't know ho to insert this page

into the pages builder list.

also i don't know how to add the font awesome icon, i found icons.css but there are number which i don't know

what that means.

and the menu looks different, don't have the blue overlay.

 

i searched the forum but didn't find what i need. need some experts advice.

the code page look like this:

<?php
/**
 * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
 * CC-BY License - http://creativecommons.org/licenses/by/3.0/
 */
 
require_once( 'inc/header.inc.php' );
require_once( BX_DIRECTORY_PATH_INC . 'design.inc.php' );
require_once( BX_DIRECTORY_PATH_INC . 'profiles.inc.php' );
 
// --------------- page variables and login
 
$_page['name_index'] = 17;

 

check_logged();

 

$_page['header'] = _t( "_MyTitel_H" );
$_page['header_text'] = _t( "_MyContent_H1" );

 

// --------------- page components

 

$_ni = $_page['name_index'];
$_page_cont[$_ni]['page_main_code'] = PageCompMainCode();

 

// --------------- [END] page components

 

PageCode();
 
// --------------- page components functions
 
/**
 * page code function
 */
function PageCompMainCode()
{
    $sRet = str_replace( '<site_url>', $GLOBALS['site']['url'], _t( "_MyTitel_H" ));
    return DesignBoxContent( _t( "_MyContent_H1" ), $sRet, $GLOBALS['oTemplConfig'] -> PageCompThird_db_num);
}
 
p.PNG · 3.2K · 221 views
Always remember that the future comes one day at a time.
Quote · 6 Sep 2015

Why not just create the new page in pages builder?

Drag the blocks as you would any other page.

ManOfTeal.COM a Proud UNA site, six years running strong!
Quote · 6 Sep 2015

because it don't give the option of drop down menu (and more).  it just give simple plain dolphin page.

what i did if you saw the in pic give me the drop down menu, icon. its similar to a module appearance 

Always remember that the future comes one day at a time.
Quote · 6 Sep 2015

you can see in the search page in 7.2 . there is first "serach_home.php"

and when you click on the menu (arrow) there are link to other pages.

i thought to make something like this exactly but in other name and content.

Always remember that the future comes one day at a time.
Quote · 6 Sep 2015

Have a look at inc/classes/BxDolPageView.php.

Dedicated servers for as little as $32 (28 euro) - See http://denre.com for more information
Quote · 6 Sep 2015

i don't understand it. it way beyond my knowledge in php.

maybe a reference to db would help, i guess the list of pages is where it came from.

it must be simple. all i want is to set my page in pages builder.

 

 

Always remember that the future comes one day at a time.
Quote · 6 Sep 2015

i found how to put the page in pages list.Cool

its located in "sys_page_compose_pages" table in the db

now what i want to find is how to connect between the custom page to the costume page in pages builder list,

so i can put blocks

$_page['name_index'] = 80;

is this should be connected to the costume page?

Always remember that the future comes one day at a time.
Quote · 8 Sep 2015

sorry if i am annoying about this Foot in Mouth

but how do i connect between this page (fec.php) to the pages builder for editing.

Always remember that the future comes one day at a time.
Quote · 10 Sep 2015

not really sure about what you did, but as stated earlier, the BxDolPageView.php page will give all the info you need to make a custom page. Granted a lot of things can be confusing - I will do my best to simplify.

 

Step 1 - create a page called fec.php and save in your dolphin root directory. I see you have already done this.

 

Step 2 - make sure your fec.php is exactly like this:

 

 <?php

 require_once( 'inc/header.inc.php' );
 require_once( BX_DIRECTORY_PATH_INC . 'design.inc.php' );
 bx_import('BxDolPageView');

 class BxFecPageView extends BxDolPageView {
     function BxFecPageView() {
         parent::BxDolPageView('fec'); // Attention! Here should be name which you will insert into sys_page_compose_pages in next step.
     }

     // Here is functions that generate blocks on page. They are contain only contents of blocks.
     // You do not have to worry about it's title, design, etc. PageView class will make it itself.

     // This function creates first block
     function getBlockCode_BlockOne() {
         return 'Hello world!';
     }

     // This function creates another block with dynamic menu tabs
     function getBlockCode_BlockTwo() {
         return array(
              'I am Block Two. I have top menu!',
            array(
                _t('_View') => array(
                    'href' => $_SERVER['PHP_SELF'] . '?view=true',
                      'dynamic' => true,
                      'active' => !$this->isEditable,
                  ),
                  _t('_Edit') => array(
                      'href' => $_SERVER['PHP_SELF'] . '?edit=true',
                      'dynamicPopup' => true,
                      'active' => $this->isEditable,
                  )
              )
        );
     }
 }

 $_page['name_index']    = 0; // choose your own index of template or leave if in doubt
 $_page['header'] = 'Fec page';
 $_ni = $_page['name_index'];

 $oEPV = new BxFecPageView();
 $_page_cont[$_ni]['page_main_code'] = $oEPV->getCode();

 PageCode();

 ?>

 

Step 3 - Add Fec page to sys_page_compose_pages table in database

 

INSERT INTO `sys_page_compose_pages` (`Name`, `Title`, `Order`, `System`) VALUES ('fec', 'FEC', '0', '1');

 

Step 4 - Insert into sys_page_compose the info for each block.

 

INSERT INTO `sys_page_compose` (`ID`, `Page`, `PageWidth`, `Desc`, `Caption`, `Column`, `Order`, `Func`, `Content`, `DesignBox`, `ColWidth`, `Visible`, `MinWidth`, `Cache`) VALUES (NULL, 'fec', '1140px', 'block one', 'block one', '0', '0', 'BlockOne', '', '1', '0', 'non,memb', '0', '0'), (NULL, 'fec', '1140px', 'block two', 'block two', '0', '0', 'BlockTwo', '', '1', '0', 'non,memb', '0', '0');

 

Step 5 - clear all caches

 

Step 6 - go to page builders and your fec page should be there.

caredesign.net
Quote · 10 Sep 2015

THANK U!

THANK U!

THANK U!

Always remember that the future comes one day at a time.
Quote · 11 Sep 2015

 So Boonex how about someone's first 5 posts are moderated with a starter account? Then they can post freely..

 

Die meisten Männer werden keine Antworten erleben, bei der Einnahme von Kamagra. Für den Fall, dass Nebenwirkungen passieren sie sind in der Regel zart und brief.kamagra Kaufen erfüllt Wünsche durch Auflockerung der Muskelzellen in den Adern, die Versorgung der Stipendiaten-Orgel, so dass mehr Blut es streamen

 

BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin
Quote · 11 Sep 2015
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.