Getting started with the PeopleAggregator code

From PeopleAggregator

Jump to: navigation, search

Here's a quick guide to help you get started with the PeopleAggregator code.

root
 |
 +- web
 |   +- BetaBlockModules
 |   +- Themes
 |       +- javascript
 |       +- skins
 |   +- api
 +- api
 +- ext

Contents

[edit] /web

All user-accessible PHP pages live in /web.

Generally, each page sets up state for a number of block modules, then calls PageRenderer (api/PageRenderer/PageRenderer.php), which renders the individual modules for the left, right and middle columns of the page, and generates the page HTML. The modules to be shown on each page are fetched from the database (the page_settings and page_default_settings tables).

See Listing of Pages and Unique Page Identifiers and List of all pages in PeopleAggregator for information on individual pages.

[edit] /web/BetaBlockModules

The BetaBlockModules directory contains a subdirectory for each block module.

The display logic for the module is present in a php file with the same name as the module (e.g. for the AddUserComment module, web/BetaBlockModules/AddUserComment/AddUserComment.php.

The templates for the module are named (side|center)_inner_(public|private).tpl. So a module that is visible to the public and rendered in the middle column would be called center_inner_public.tpl, and a private module to be rendered on the right hand column would be side_inner_private.tpl.

Older modules have the controller logic to be executed on receipt of an HTTP POST in the page (the PHP file in /web) that contains the module. Newer modules have it in a file in the module directory called action.php.

[edit] /web/Themes

CSS and Javascript files live here.

The /web/Themes/Beta/skins directory contains a subdirectory for each available theme. Each theme contains a file called config.xml, which provides information on the theme.

[edit] /web/api

The /web/api directory contains code implementing the server side of the web services API. Calls either pass through xml.php, json.php or xmlrpc.php, and are handled by the code in /web/api/lib/api_impl.php.

See Working with the WSAPI code and the auto-generated method documentation for more information.

[edit] /api, /ext

The PeopleAggregator PHP API is implemented in these directories. /api is for base classes, and /ext holds extension classes and classes that access external resources or come from outside the project.

See Description of API for detail on the API.

Personal tools