admin panel module settings (developer help needed)

Hi! all

I was trying the boonex module tutorial and i want to know how to create two or more design box in the admin panel or create a tab menu in the below image in red

I know to create a block this is the code in nameModule.php

 

$this->_oTemplate->pageStart(); // all the code below will be wrapped by the admin design

 

   $iId = $this->_oDb->getSettingsCategory(); // get our setting category id

   if(empty($iId)) { // if category is not found display page not found

            echo MsgBox(_t('_sys_request_page_not_found_cpt'));

            $this->_oTemplate->pageCodeAdmin (_t('_me_blgg'));

            return;

        }

 

        bx_import('BxDolAdminSettings'); // import class

 

        $mixedResult = '';

        if(isset($_POST['save']) && isset($_POST['cat'])) { // save settings

       $oSettings = new BxDolAdminSettings($iId);

            $mixedResult = $oSettings->saveChanges($_POST);

        }

 

        $oSettings = new BxDolAdminSettings($iId); // get display form code

        $sResult = $oSettings->getForm();

             

        if($mixedResult !== true && !empty($mixedResult)) // attach any resulted messages at the form beginning

            $sResult = $mixedResult . $sResult;

 

        echo DesignBoxAdmin (_t('_me_blgg'), $sResult); // dsiplay box

        

        $this->_oTemplate->pageCodeAdmin (_t('_me_blgg')); // output is completed, admin page will be displaed here

 }

If i add "echo DesignBoxAdmin (_t('_me_blgg'), $sResult);" than this will create a new box but i want to show setting options in it.

 

Please help me.

so much to do....
Quote · 30 Jan 2012

You will need to pass in the array of items you want in the menu as the third argument in DesignBoxAdmin()

DesignBoxAdmin is defined in inc/admin_design.inc.php

And there you can look thru the mixedButtuns array to see which array options to setup:

 

$mixedButtons[] = array(

                'id' => $sId,

                'title' => htmlspecialchars_adv(_t($aAction['title'])),

                'class' => isset($aAction['class']) ? ' class="' . $aAction['class'] . '"' : '',

                'icon' => isset($aAction['icon']) ? '<img' . $sClass . ' src="' . $aAction['icon'] . '" />' : '',

                'href' => isset($aAction['href']) ? ' href="' . htmlspecialchars_adv($aAction['href']) . '"' : '',

                'target' => isset($aAction['target'])  ? ' target="' . $aAction['target'] . '"' : '',

                'on_click' => isset($aAction['onclick']) ? ' onclick="' . $aAction['onclick'] . '"' : '',

                'bx_if:hide_active' => array(

                    'condition' => !isset($aAction['active']) || $aAction['active'] != 1,

                    'content' => array()

                ),

                'bx_if:hide_inactive' => array(

                    'condition' => isset($aAction['active']) && $aAction['active'] == 1,

                    'content' => array()

                )

            );

 

Hope this helps.  You will need to familiarize yourself with this to understand how to setup the menu.

 

 

 

sup
Quote · 30 Jan 2012

thanks you very much. I am looking into this.

so much to do....
Quote · 30 Jan 2012

Something like this:

$aMenu = array(  

// your array data

);

echo DesignBoxAdmin (_t('_me_blgg'), $sResult, $aMenu); 

sup
Quote · 30 Jan 2012

 Thank you i get it to show on the header.

Something like this:

$aMenu = array(  

// your array data

);

echo DesignBoxAdmin (_t('_me_blgg'), $sResult, $aMenu); 

 

so much to do....
Quote · 30 Jan 2012
 
 
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.