Home arrow MySQL arrow Page 3 - Data Management Made Easy Using Nennius: Advanced Data Handling

Expanding Our Application Menu - MySQL

Welcome to part three of this tutorial introducing application development for the Nennius engine. In this article, we will enhance the News Manager application from part two.

TABLE OF CONTENTS:
  1. Data Management Made Easy Using Nennius: Advanced Data Handling
  2. Advanced Application Configuration
  3. Expanding Our Application Menu
  4. Creating the User Comments Component
  5. Creating Component Dependencies
  6. Component Notes
  7. Help Files
  8. File Attachments
By: Brian Vaughn
Rating: starstarstarstarstar / 6
August 03, 2005

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement

In part two of this article we created a simple news management application. That application contained only two menu options: one to direct an authenticated user to a form for managing news releases, and another to direct all users to our imaginary company's news release page. That was a great introduction to Nennius development, but not very practical. More often than not, when it comes to data management tools, a wide variety of data is being managed. Because of this, most Nennius applications will deal with more than one component. To add additional components to our example application, we will first start by expanding our menu configuration file as follows:

<?php

# include config_defaults file for threshold values

# NOTE: ignore a failed include for the purposes of the admin GUI

@ include_once '../../config.defaults.php';

# intiialize nennius menu array

$nennius_menu_array    = NULL;

# Manage Releases - links to Nennius page for adding & removing news releases

$admin_options_array[]         = ( array(     'menu_display_name'    => 'Manage Releases',

                                      'menu_hyperlink'       => 'index.php',

                                      'menu_threshold'       => $GLOBALS['ADMIN'] ) );

# Manage Comments - links to Nennius page for adding & removing user comments

$admin_options_array[]         = ( array(     'menu_display_name'    => 'Manage User Comments',

                                      'menu_hyperlink'       => 'comments.php',

                                      'menu_threshold'       => $GLOBALS['USER'] ) );

# Corporate Website - links to external corporate website to view changes in realtime

$public_menu_array[]   = ( array(     'menu_display_name'    => 'Corporate Website',

                                      'menu_hyperlink'       => 'http://www.corporatewebsite.com/news.php',

                                      'menu_threshold'       => $GLOBALS['PUBLIC'] ) );

                                     

# add all menus to nennius menu array

$nennius_menu_array['Admin Options']  = $admin_options_array;

$nennius_menu_array['Public Menu']    = $public_menu_array;

# globalize nennius menu array for access by Display Template

$GLOBALS['nennius_menu_array']        = $nennius_menu_array;

?>

The menu configuration file now specifies two menu categories: 'Admin Options' (shown only if a user is logged into the application) and 'Public Menu'. In addition we have also added a new menu link: 'Manage User Comments'. (For the purposes of this article, we will assume that our application's front end allows users to attach comments to a news entry. This new menu option will then allow us to moderate the comments if necessary.) It will also show us another important aspect of Nennius development: how to create meaningful component relationships.



 
 
>>> More MySQL Articles          >>> More By Brian Vaughn
 

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort
   

MYSQL ARTICLES

- Oracle Unveils MySQL 5.6
- MySQL Vulnerabilities Threaten Databases
- MySQL Cloud Options Expand with Google Cloud...
- MySQL 5.6 Prepped to Handle Demanding Web Use
- ScaleBase Service Virtualizes MySQL Databases
- Oracle Unveils MySQL Conversion Tools
- Akiban Opens Database Software for MySQL Use...
- Oracle Fixes MySQL Bug
- MySQL Databases Vulnerable to Password Hack
- MySQL: Overview of the ALTER TABLE Statement
- MySQL: How to Use the GRANT Statement
- MySQL: Creating, Listing, and Removing Datab...
- MySQL: Create, Show, and Describe Database T...
- MySQL Data and Table Types
- McAfee Releases Audit Plugin for MySQL Users

Developer Shed Affiliates

 


Dev Shed Tutorial Topics: