Home « Server software «
Documentation: control/populate.php
control/populate.php - Populate the database
This script helps to create records in the database.If there is no
switch.on
nor switch.off
file, the script
asks for a user name and password to create an associate user profile.
This is usually what happen on first installation.This can be used also if one webmaster losts his password. In this case, delete the switch file (normally,
switch.on
)
and trigger this script to recreate a new associate user profile.Else the script populates the database according to the value of the parameter 'action':
- 'associate' -- create an associate profile, plus default items for first installation
- 'blog' -- create a blog
- 'book' -- create a book
- 'build' -- create default items, like for first installation
- 'collection' -- create a collection to share files
- 'complex' -- with scrolling news, plus gadget and extra boxes
- 'forum' -- create several structured discussion boards using the yabb layout
- 'links' -- create a Yahoo-like directory of links
- 'original' -- post original articles
- 'partners' - our preferred partners
- 'polls' -- create a section for polls
- 'recipes' -- create a book of cooking recipes
- 'samples' -- create samples items to learn by exemple
- 'servers' -- sample hosts to be pinged, etc. (servers/populate.php)
- 'vote' -- create one vote, or one poll
- 'wiki' -- create a wiki
If no parameter has been set, the script displays a form to make the surfer select among available options.
When the parameter 'action' has the value 'build', this script creates records in following tables:
- sections (sections/populate.php) -- basic sections
- categories (categories/populate.php) -- for featured pages
- articles (articles/populate.php) -- cover page, menu, etc.
When the parameter 'action' has the value 'samples', this script creates records in following tables:
- sections (sections/populate.php) -- sample sections
- categories (categories/populate.php) -- sample categories
- articles (articles/populate.php) -- sample pages
- comments (comments/populate.php) -- sample comments
- tables (tables/populate.php) -- sample tables
When the parameter has the value 'associate', 'build' or 'samples', this script also invokes a hook to populate additional tables:
- id: 'control/populate.php'
- type: 'include'
Only associates can use this script, except if no switch file is present. Invocations are also accepted if the user table is missing or empty.
If an associate user profile is created, apply it to the current surfing session.
This script is a reference file of this system.
Licence: GNU Lesser General Public License
Auteurs:
- Bernard Paques bernard.paques@bigfoot.com
Reste à faire:
- allow for the creation of a s5 presentation
- allow for the capture of a remote rss feed in a new section
send_body()
function send_body()
send_body() - Dynamically generate the page
function send_body()
Voir aussi:
send_body() - Dynamically generate the page
function send_body()
Voir aussi:
send_body() - Dynamically generate the page
function send_body()
Voir aussi: