From: Steven L. <st...@tu...> - 2004-11-02 18:32:00
|
Hello Everyone, I would like to make a suggestion to simplify links within the current 0.9.3x branch of phpwebsite. The idea is to have individual module pages in the base of phpwebsite. These pages will automatically set the module and assume a view operation to reduce the number of variables needed to request a item to be viewed. Example: pagemaster.php <?php $_GET['module'] = $_REQUEST['module'] = 'pagemaster'; if (!isset($_REQUEST['MASTER_op']) && !isset($_REQUEST['PAGE_user_op'])) $_GET['PAGE_user_op'] = $_REQUEST['PAGE_user_op'] = 'view_page'; if (isset($_REQUEST['id'])) $_GET['PAGE_id'] = $_REQUEST['PAGE_id'] = $_REQUEST['id']; include('index.php'); ?> Link before: ./index.php?module=pagemaster&PAGE_op=view&PAGE_id=1 Link after: ./pagemaster.php?id=1 Then if you want to edit: ./pagemaster.php?id=1&MASTER_op=edit_page - since the op is passed here the pagemaster.php file will not set the default op to view Old links will still work, but code will have to be updated to generate the new syntax. Thoughts? Suggestions? -- Steven Levin Computer Systems Admin I Electronic Student Services Appalachian State University http://phpwebsite.appstate.edu |