NoPic eZine
  
Home
Impressum/Imprint
Datenschutz/Policies
 
1.Issue 2006.06/1
 1.1.phpWebSite 1.0.0RC1 released
 1.2.Installing pWS 1.0.0rc1
 1.3.Running thru install
 1.4.First anonymous touch
 1.5.Exploring fallout surface inside
 1.6.Module substitution
 1.7.Directory Tree
 1.8.Database Tables
 1.9.ReadMe summary
   Access.txt
   bbcode.txt
   Cache_Lite.txt
   Categories.txt
   Clipboard.txt
   ControlPanel.txt
   Converting_Modules.txt
   Cookie.txt
   CREDITS.txt
   Database_Class.txt
   DB_Pager.txt
   Demographics.txt
   devdoc.modlayout.txt
   Developer_Rules.txt
   Editor.txt
   Forms.txt
   INSTALL.doc.txt
   Key.txt
   Known_Errors.txt
   Language.txt
   LICENSE.txt
   MiniAdmin.txt
   Mod_Rewrite.txt
   Module_Development.txt
   My_Page.txt
   README.doc.txt
   README.txt
   Related.txt
   Search.txt
   Settings_Class.txt
   SmartTags.txt
   Style_Format.txt
   template.txt
   Theme_Creation.txt
   Using_Javascript.txt
   Version.txt
   WYSIWYG.txt
 1.10.Using module WebPages
 1.11.Using module MenuManager
 1.12.Using webPages Editor
 1.13.Styling and Themes

    en

My_Page.txt

My Page by Matthew McNaney
-------------------------------------

My Page is special user setting page within the Users module. You can
get to it by clicking on the My Page tab under your control panel.

Tabs under My Page are only for generic user settings. ANY user would
have access to these settings.


Registering your module
------------------------------------
This is simple. You just need to create a my_page.php file in your
module's inc/ directory. When you module installs, the User module
will see it an register your module. If you want to add a My Page tab
later, you can call:
My_Page::registerMyPage('module_title');


Contents of your My Page file
------------------------------------
You need to have one function call in your my_page.php file.

function my_page()
{
    return "My module's My Page content.";
}

When your module's tab is accessed, My_Page will call the my_page
function and print the results. Whether you continue to add
functionality in this file or within your module's classes is up to
you.


Operating in My Page
-----------------------------------
Remember that you are not inside YOUR module. You are in a subset of
the user's module. Therefore, when you are creating a form or a link
that works inside My Page, it has to contain certain variables.

module = users
action = user
tab = your module tab

This shouldn't be that hard to remember as the data will be in your
address bar when accessing your My Page tab.

When creating forms, you need to have these variables as hidden
variables. You may either add these manually or you can send a form
object to My_Page::addHidden. For example:

$form = & new PHPWS_Form('my_mod_info');
My_Page::addHidden($form);

$form->addText('birthday');
...

Users uses a variable named "command". If you try to create a GET or
POST variable named "command", phpWebSite will return a 404 error.

    en

Copyright © 2006, VbID Verlagsbüro GmbH
pWS modules dcP, dcT, dc4db, Copyright © 2006, VbID Verlagsbüro GmbH
This Site is powered by phpWebSite © The Web Technology Group, Appalachian State University