AdminPages.class.php

Summary
AdminPages.class.php
Functions
indexThe page for the main administration menu.
blogloginAllows users to log in, then redirects them back to the page they came from.
bloglogoutLogs the user out and redirects them to the front page of the current blog.
newblogUsed to create a new weblog.
newloginUsed to create a new user account.

Functions

index

public function index()

The page for the main administration menu.

This page has a number of administration options, some of which are vestigial.  The options are as follows.

Modify site-wide menubarModifies the “site map” in the menu bar.
Add new userCreates a new user.
Add new blogCreates a new weblog.
Update blog dataUpgrade format of blog storage files.
Upgrade blog to current versionRecreate wrapper scripts for a blog.
Fix directory permissionsMake blog file permissions sane.
Log outLog out of the admin pages.

Of the above options, fixing directory permissions and updating blog data are largely unused.  Directory permissions are only relevant when switching file writing methods, and even then this option isn’t too useful.

Updating blog data applies mostly to a previous change in the storage format.  It is possible that this will be used again in the future, but there are no plans for it.

The upgrading to the current version, on the other hand, is more relevant.  It is used to create a new set of wrapper scripts in the standard setup.  “Wrappers scripts”, as used by LnBlog, are simply very small PHP scripts (usually less than five lines) that do nothing but use the PHP include() statement to execute another script.  The purpose of these scripts is to make all functions relevant to a blog accessible under the root blog URL, thus giving a clean URL structure to the entire blog.  Since new features requiring new pages are added from time to time, this upgrade function will probably be used once every few upgrades, depending on the changes between releases.

It is also important to note that the event system includes OnUpgrade and UpgradeComplete events for the Blog object.  These events are raised when this upgrade feature is run, so that plugins may perform any needed updates at that time.

bloglogin

public function bloglogin()

Allows users to log in, then redirects them back to the page they came from.  In the “standard” setup, this page is included by the login.php wrapper script in each blog.

bloglogout

public function bloglogout()

Logs the user out and redirects them to the front page of the current blog.  In the stardard setup, this is included by the logout.php wrapper script in each blog.

newblog

public function newblog()

Used to create a new weblog.

The form is initially populated with a reasonable list of default values, taken from blogconfig.php.  The user will probably want to change the path and will need to set a name and description.  The blog owner may also need to be changed and the list of allowed writers may need to be set as well.

newlogin

public function newlogin()

Used to create a new user account.

When used to create the administrator account, the username box is locked.  To change the administrator username, set the ADMIN_USER configuration constant in the userdata/userconfig.php file.

public function index()
The page for the main administration menu.
public function bloglogin()
Allows users to log in, then redirects them back to the page they came from.
public function bloglogout()
Logs the user out and redirects them to the front page of the current blog.
public function newblog()
Used to create a new weblog.
public function newlogin()
Used to create a new user account.
The “master” class which represents a weblog.
Holds basic configuration constants that are required by all pages.
Username of site administrator.
Close