Class constructor. Check some defaults etc
MvBlog_admin
__construct
([ $basedir = ""])
Redefinition of:
- MvBlog_common::__construct()
- Setup stuff and handle settings etc and populate the data containers.
Check user supplied data against admin database
void
check_login
(array $login)
-
array
$login: name and password to check
Run specified plugins 'show_settings' method.
If that does not exist (or is not declared 'public') the pluginlist will be shown
void
configure_plugin
(string $plugin)
-
string
$plugin: The plugin to configure
Delete category from database
void
delete_cat
(int $id)
-
int
$id: The category id to delete
Delete a comment from the database
void
delete_comment
(int $id)
-
int
$id: The comment id to remove
Delete dossier from database
void
delete_dossier
(int $id)
-
int
$id: The dossier id to delete
Delete users that are inactive for some time
void
delete_inactive_users
([int $time = 0])
-
int
$time: The time a user should be inactive before deleting it
delete a post from the db
void
delete_post
(The $id)
-
The
$id: postid to remove
remove user from database
void
delete_user
(int $userid)
-
int
$userid: The userid to delete
show form to manipulate author
void
edit_author
(int $authorid)
-
int
$authorid: The author id to edit, or 0 to create a new one.
Show form to edit a category.
void
edit_cat
(int $id)
-
int
$id: The category id or 0 to create a new one
Show form to edit a dossier.
void
edit_dossier
(int $id)
-
int
$id: The dossier id or 0 to create a new one
run $plugin->edit_setting so a plugin can show edit screen
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
show user a form to edit the post
void
edit_post
(int $id)
-
int
$id: The postid to edit, or 0 to create a new post
show form to manipulate user
void
edit_user
(int $userid)
-
int
$userid: The userid to edit, or 0 to create a new user.
Run the blogtool import routine.
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 user
void
logout
()
store new/altered author in database
void
save_author
(array $author)
-
array
$author: The author info
Store altered/new category in the database
void
save_cat
(array $cat)
-
array
$cat: The category info
Store altered/new dossier in the database
void
save_dossier
(array $dossier)
-
array
$dossier: The dossier info
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.
void
save_menuitems
(array $links)
-
array
$links: menu items to store in database, see the function description for layout
run $plugin->save_setting so a plugin can save a setting
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
store post in database
void
save_post
(array $post)
-
array
$post: the post data
save settings to db
void
save_settings
(array $settings)
-
array
$settings: The form info from the show_blogsettings form
store new/altered user in database
void
save_user
(array $user)
-
array
$user: The user info
Show information about the current version etc.
void
show_about
()
If user is logged in, show menu
void
show_admin_menu
()
show all authors
void
show_authors
()
Show overview of available categories
void
show_cats
()
show comment items
void
show_comments
(array $options)
-
array
$options: top => where to start for pages, limit => the pagesize
Show all dossiers in the database with some basic information attached
void
show_dossiers
()
Show the import module screen with links to all the supported blogtools
void
show_import
()
Show nice welcome screen for admin
void
show_index
()
Show admin login screen
void
show_login
()
show custom menu items
void
show_menuitems
()
Show all loaded plugins
void
show_plugins
()
show a list of all posts with some info
void
show_posts
([array $options = array()])
-
array
$options: Optional search options
show the blogsettings with edit boxen
void
show_settings
()
Show registered users
void
show_users
()
Activate plugin and save state to db
void
_activate_plugin
(string $plugin)
-
string
$plugin: The plugin name to activate
Deactivate plugin and save state to db
void
_deactivate_plugin
(string $plugin)
-
string
$plugin: The plugin name to deactivate
strip evil attributes from tags
string
_strip_attributes
(string $text)
-
string
$text: The text to process
strip all html tags cept for some tags we like.
The tags we leave will be stripped from attributes we dont like.
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()