Class MvBlog_admin

Description

Class that holds methods to create admin site.

Located in /common/mvblog_admin.php (line 25)

MvBlog_common
   |
   --MvBlog_admin
Variable Summary
Method Summary
MvBlog_admin __construct ([ $basedir = ""])
void check_login (array $login)
void configure_plugin (string $plugin)
void delete_cat (int $id)
void delete_comment (int $id)
void delete_dossier (int $id)
void delete_inactive_users ([int $time = 0])
void delete_post (The $id)
void delete_user (int $userid)
void edit_author (int $authorid)
void edit_cat (int $id)
void edit_dossier (int $id)
void edit_plugin_setting (string $plugin, mixed $request_data)
void edit_post (int $id)
void edit_user (int $userid)
void import (string $type, [array $options = array()])
void logout ()
void save_author (array $author)
void save_cat (array $cat)
void save_dossier (array $dossier)
void save_menuitems (array $links)
void save_plugin_setting (string $plugin, mixed $request_data)
void save_post (array $post)
void save_settings (array $settings)
void save_user (array $user)
void show_about ()
void show_admin_menu ()
void show_authors ()
void show_cats ()
void show_comments (array $options)
void show_dossiers ()
void show_import ()
void show_index ()
void show_login ()
void show_menuitems ()
void show_plugins ()
void show_posts ([array $options = array()])
void show_settings ()
void show_users ()
void _activate_plugin (string $plugin)
void _deactivate_plugin (string $plugin)
string _strip_attributes (string $text)
string _strip_tags (string $text)
Variables
mixed $lang = "en_US" (line 30)
  • access: public
mixed $languages = array(
"en_US" => "english",
"nl_NL" => "dutch",
"sv_SE" => "swedish",
)
(line 31)
  • access: public
mixed $_selected_menuitem (line 36)
  • access: private
mixed $_selected_submenuitem (line 37)
  • access: private

Inherited Variables

Inherited from MvBlog_common

MvBlog_common::$active_plugins
MvBlog_common::$authors
MvBlog_common::$categories
MvBlog_common::$db
MvBlog_common::$dossiers
MvBlog_common::$menuitems
MvBlog_common::$plugins
MvBlog_common::$plugman
MvBlog_common::$settings
MvBlog_common::$version
MvBlog_common::$webroot
Methods
Constructor __construct (line 45)

Class constructor. Check some defaults etc

  • access: public
MvBlog_admin __construct ([ $basedir = ""])
  • $basedir

Redefinition of:
MvBlog_common::__construct()
Setup stuff and handle settings etc and populate the data containers.
check_login (line 202)

Check user supplied data against admin database

  • access: public
void check_login (array $login)
  • array $login: name and password to check
configure_plugin (line 1640)

Run specified plugins 'show_settings' method.

If that does not exist (or is not declared 'public') the pluginlist will be shown

  • access: public
void configure_plugin (string $plugin)
  • string $plugin: The plugin to configure
delete_cat (line 576)

Delete category from database

void delete_cat (int $id)
  • int $id: The category id to delete
delete_comment (line 1587)

Delete a comment from the database

  • access: public
void delete_comment (int $id)
  • int $id: The comment id to remove
delete_dossier (line 701)

Delete dossier from database

  • access: public
void delete_dossier (int $id)
  • int $id: The dossier id to delete
delete_inactive_users (line 1065)

Delete users that are inactive for some time

  • access: public
void delete_inactive_users ([int $time = 0])
  • int $time: The time a user should be inactive before deleting it
delete_post (line 1500)

delete a post from the db

  • access: public
void delete_post (The $id)
  • The $id: postid to remove
delete_user (line 1077)

remove user from database

  • access: public
void delete_user (int $userid)
  • int $userid: The userid to delete
edit_author (line 748)

show form to manipulate author

  • access: public
void edit_author (int $authorid)
  • int $authorid: The author id to edit, or 0 to create a new one.
edit_cat (line 452)

Show form to edit a category.

void edit_cat (int $id)
  • int $id: The category id or 0 to create a new one
edit_dossier (line 627)

Show form to edit a dossier.

  • access: public
void edit_dossier (int $id)
  • int $id: The dossier id or 0 to create a new one
edit_plugin_setting (line 1654)

run $plugin->edit_setting so a plugin can show edit screen

  • access: public
void edit_plugin_setting (string $plugin, mixed $request_data)
  • string $plugin: The plugin to run the edit_setting on
  • mixed $request_data: All the $_REQUEST data
edit_post (line 1266)

show user a form to edit the post

  • access: public
void edit_post (int $id)
  • int $id: The postid to edit, or 0 to create a new post
edit_user (line 927)

show form to manipulate user

  • access: public
void edit_user (int $userid)
  • int $userid: The userid to edit, or 0 to create a new user.
import (line 1978)

Run the blogtool import routine.

  • access: public
void import (string $type, [array $options = array()])
  • string $type: The blogtool to import from. Can only be 'wordpress' right now
  • array $options: The additional parameters to pass to the specific import plugin called by run_module()
logout (line 229)

Logout user

  • access: public
void logout ()
save_author (line 813)

store new/altered author in database

  • access: public
void save_author (array $author)
  • array $author: The author info
save_cat (line 543)

Store altered/new category in the database

void save_cat (array $cat)
  • array $cat: The category info
save_dossier (line 670)

Store altered/new dossier in the database

  • access: public
void save_dossier (array $dossier)
  • array $dossier: The dossier info
save_menuitems (line 1926)

store/remove database entries.

The links param has the following layout: [0] => Array ( [linktitle] => title [url] => url [image] => image url (optional) [sortorder] => 1 [state] => save ) The toplevel key is the id of the link, or 0 for a new one.

  • access: public
void save_menuitems (array $links)
  • array $links: menu items to store in database, see the function description for layout
save_plugin_setting (line 1668)

run $plugin->save_setting so a plugin can save a setting

  • access: public
void save_plugin_setting (string $plugin, mixed $request_data)
  • string $plugin: The plugin to run the save_setting on
  • mixed $request_data: All the $_REQUEST data
save_post (line 1408)

store post in database

  • access: public
void save_post (array $post)
  • array $post: the post data
save_settings (line 1808)

save settings to db

  • todo: Describe settings layout
  • access: public
void save_settings (array $settings)
  • array $settings: The form info from the show_blogsettings form
save_user (line 1012)

store new/altered user in database

  • access: public
void save_user (array $user)
  • array $user: The user info
show_about (line 315)

Show information about the current version etc.

  • access: public
void show_about ()
show_admin_menu (line 353)

If user is logged in, show menu

  • access: public
void show_admin_menu ()
show_authors (line 714)

show all authors

  • access: public
void show_authors ()
show_cats (line 409)

Show overview of available categories

  • access: public
void show_cats ()
show_comments (line 1521)

show comment items

  • access: public
void show_comments (array $options)
  • array $options: top => where to start for pages, limit => the pagesize
show_dossiers (line 589)

Show all dossiers in the database with some basic information attached

  • access: public
void show_dossiers ()
show_import (line 1966)

Show the import module screen with links to all the supported blogtools

  • access: public
void show_import ()
show_index (line 238)

Show nice welcome screen for admin

  • access: public
void show_index ()
show_login (line 166)

Show admin login screen

  • access: public
void show_login ()
show_menuitems (line 1844)

show custom menu items

  • access: public
void show_menuitems ()
show_plugins (line 1597)

Show all loaded plugins

  • access: public
void show_plugins ()
show_posts (line 1098)

show a list of all posts with some info

  • access: public
void show_posts ([array $options = array()])
  • array $options: Optional search options
show_settings (line 1709)

show the blogsettings with edit boxen

  • access: public
void show_settings ()
show_users (line 864)

Show registered users

  • access: public
void show_users ()
_activate_plugin (line 1681)

Activate plugin and save state to db

  • access: public
void _activate_plugin (string $plugin)
  • string $plugin: The plugin name to activate
_deactivate_plugin (line 1696)

Deactivate plugin and save state to db

  • access: public
void _deactivate_plugin (string $plugin)
  • string $plugin: The plugin name to deactivate
_strip_attributes (line 147)

strip evil attributes from tags

  • return: The processed text
  • access: private
string _strip_attributes (string $text)
  • string $text: The text to process
_strip_tags (line 131)

strip all html tags cept for some tags we like.

The tags we leave will be stripped from attributes we dont like.

  • return: The text with only allowed tags.
  • access: private
string _strip_tags (string $text)
  • string $text: The text to process

Inherited Methods

Inherited From MvBlog_common

MvBlog_common::__construct()
MvBlog_common::copy_files()
MvBlog_common::db_quote()
MvBlog_common::html_footer()
MvBlog_common::html_header()
MvBlog_common::replace_dossier_ref()
MvBlog_common::replace_num_ref()
MvBlog_common::show_captcha()
MvBlog_common::_get_active_plugins()
MvBlog_common::_get_authors()
MvBlog_common::_get_categories()
MvBlog_common::_get_dossiers()
MvBlog_common::_get_menuitems()
MvBlog_common::_get_posts()
MvBlog_common::_get_settings()
MvBlog_common::_get_webroot()
MvBlog_common::_handle_magic_quotes()
MvBlog_common::_handle_php_bugs()
MvBlog_common::_init_db()
MvBlog_common::_magic_quotes_strip()
MvBlog_common::_sanitize()

Documentation generated on Fri, 28 Dec 2007 13:17:38 +0100 by phpDocumentor 1.4.1