Changes between Version 16 and Version 17 of DolphinTutorialMyFirstModule


Ignore:
Timestamp:
Nov 4, 2010, 12:47:35 AM (14 years ago)
Author:
AlexT
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DolphinTutorialMyFirstModule

    v16 v17  
    305305The '''pageCodeAdmin''' function is similar to the  '''pageCode''' function, but it displays the admin page instead of the user page. Also, this function accepts only one parameter - page title. 
    306306 
    307 Also the difference in the code is that we check if admin only can access this page. The '''$GLOBALS['logged']['admin']''' variable is set to true if admin is logged in. Additionally, you can check if regular members are logged in by using the '''$GLOBALS['logged']['member']''' variable. If none of these values are true, then a guest is accessing your page. The '''displayAccessDenied''' function displays a page with an "access denied" message - in this case, we don't need to care much about that, and we can just return from the function or even exit. The '''$GLOBALS['logged']''' does not always exist, and is initialized in the '''check_logged''' function. In our case this function is called in the '''bloggie/request.php''' file. 
     307Also the difference in the code is that we check if admin only can access this page. The !'''$GLOBALS['logged']['admin']''' variable is set to true if admin is logged in. Additionally, you can check if regular members are logged in by using the '''$GLOBALS['logged']['member']''' variable. If none of these values are true, then a guest is accessing your page. The '''displayAccessDenied''' function displays a page with an "access denied" message - in this case, we don't need to care much about that, and we can just return from the function or even exit. The '''$GLOBALS['logged']''' does not always exist, and is initialized in the '''check_logged''' function. In our case this function is called in the '''bloggie/request.php''' file. 
    308308 
    309309Another new function here is '''DesignBoxAdmin'''. It wraps our content in a nice box. The box title is the first parameter and box content is the second one. There is an optional 3rd parameter where you can define the box menu. Also, there is an analog of this function in the user side called '''DesignBoxContent'''. You can examine existing Dolphin code for a lot of examples. 
 
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.
Fork me on GitHub