2013-01-14 00:12
in the _menu.php file i have added an extra tab. but when i click on it, i get the message "no action was taken". how can i add own scripts in the system?
» Quick.Cms v5.x 2013-01-14 07:50
What exactly would you like to do? To add a button in admin side? And where would you like to do after you click it?
2013-01-14 21:47
templates/admin/_menu.php
<ul id="menuBar"> <li onmouseover="return buttonClick( event, 'pages' ); buttonMouseover( event, 'pages' );"><a href="?p=pages-list"><span class="pages"><?php echo $lang [ 'Pages' ]; ?> </span></a></li> <!-- main menu --> <li onmouseover="return buttonClick( event, 'tools' ); buttonMouseover( event, 'tools' );"><a href="#"><span class="tools"><?php echo $lang [ 'Tools' ]; ?> </span></a></li> <li onmouseover="return buttonClick( event, 'test' ); buttonMouseover( event, 'test' );"><a href="?p=test"><span class="test"><?php echo 'test' ; ?> </span></a></li> </ul>
i have added the tab button 'test' (on admin side). In the folder templates/admin I created the file test.php with following code:
<?php if( ! defined ( 'ADMIN_PAGE' ) ) exit; require_once DIR_TEMPLATES . 'admin/_header.php' ; // include headers require_once DIR_TEMPLATES . 'admin/_menu.php' ; // include menu ?> <h1><?php echo 'test' ; ?> </h1> <div class="mainPage"> </div><?php require_once DIR_TEMPLATES . 'admin/_footer.php' ; // include footer ?>
In the admin.php file in the root i have added:
elseif( $p == 'test' ){ require_once DIR_TEMPLATES . 'admin/test.php' ; }
The error "no action was taken" is fixed now. only my footer is no longer visible. My goal is to place a text in that tab