Class MvBlog

Description

Class that holds methods to create public site.

Located in /common/mvblog.php (line 59)

MvBlog_common
   |
   --MvBlog
Variable Summary
string $lang
Method Summary
MvBlog __construct ([string $basedir = ""])
void blog_archive_links ([int $amount = 5])
void blog_cats_links ()
void blog_content ([int $start = 0], [int $limit = 0])
string blog_get_title ()
void blog_show_login ()
void get_articles (int $start, int $limit, [int $archive = 0], [int $dossier = 0])
array get_comments (int $article_id)
int limit_text (string &$text)
string obfuscate_ip (string $ip)
string parse_bbcode (string $data)
void post_comment (array $postdata)
void show_article (int $id, [int $captcha_error = 0])
void show_comment (array $commentdata)
string strip_bbcode (string $data)
string strip_invalid_xml (string $data)
void user_confirm ()
void user_edit ([int $register = 1])
bool user_login (array $userdata)
void user_save ()
Variables
Methods
Constructor __construct (line 78)

Constructor to set some defaults

  • access: public
MvBlog __construct ([string $basedir = ""])
  • string $basedir: If set use this directory where MvBlog is located.

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

show 'month archive' menu links

  • access: public
void blog_archive_links ([int $amount = 5])
  • int $amount: The number of months to show
blog_cats_links (line 903)

show 'categories' archive menu links

  • access: public
void blog_cats_links ()
blog_content (line 129)

main function to give user correct html depending on action etc

  • access: public
void blog_content ([int $start = 0], [int $limit = 0])
  • int $start: (optional) Start entry in recordset
  • int $limit: (optional) Number of records to show
blog_default_links (line 801)

show default menu links

  • access: public
void blog_default_links ()
blog_get_description (line 113)

Get blogsetting description from database

  • return: The blogdescription
  • access: public
string blog_get_description ()
blog_get_title (line 98)

get the blog title.

  • return: title or "blog" if no title set
  • access: public
string blog_get_title ()
blog_show_dossierlinks (line 970)

Show list of dossiers.

  • access: public
void blog_show_dossierlinks ()
blog_show_login (line 776)

Show login screen or username

  • access: public
void blog_show_login ()
blog_show_menulinks (line 951)

get usersupplied sidebar menu entries

  • access: public
void blog_show_menulinks ()
blog_show_search (line 937)

show livesearchbox

  • access: public
void blog_show_search ()
blog_show_styleswitcher (line 831)

show dropdown with styles

This function opens the dir styles/ for every dir in there that contains a file index.css it puts the dirname in the dropdown. It also has an onchange javascript function attached so it will reload the blog with the new style applied.

  • return: false if the styledir cannot be opened
  • access: public
bool blog_show_styleswitcher ()
check_admin_logged_in (line 86)

Check to see if the admin session is set

  • access: public
void check_admin_logged_in ()
get_articles (line 199)

show posts in pages or the archive

  • access: public
void get_articles (int $start, int $limit, [int $archive = 0], [int $dossier = 0])
  • int $start: the starting point in the recordset
  • int $limit: the ammount of items to show
  • int $archive: type of archive. 0 = none, 1 = archive by date, 2 = archive by category, 3 = archive of asides, 4 = old old old
  • int $dossier: if not 0 show info about dossier
get_comments (line 668)

Get all comments associated with a post The output will be suitable for direct flushing to client

  • return: all comments in an array
  • access: public
array get_comments (int $article_id)
  • int $article_id: The article id where the comments are attached to
limit_text (line 358)

limit the length of a message

  • return: 1 if truncated, 0 if original string is within limits
  • access: public
int limit_text (string &$text)
  • string &$text: the text to limit in length
obfuscate_ip (line 695)

obfuscate ip $ip addresses so we are privacy friendly

  • return: the ip with the last octet replaced by X
string obfuscate_ip (string $ip)
  • string $ip: the ip address to obfuscate
parse_bbcode (line 715)

Parse a string and intepret bbcode

  • return: the string with bbcode tags substituded
  • author: Justin Palmer
  • author: Ferry Boender
  • access: public
  • license: LGPL
string parse_bbcode (string $data)
  • string $data: The raw string to do bbcode substitution on
post_comment (line 990)

store comment in database and optionally mail author of post

If the user checked the 'mail' box in the admin this function will also send a mail to the author of the post.

  • access: public
void post_comment (array $postdata)
  • array $postdata: content of the comment entry form
show_article (line 374)

Show an article with all comments etc

  • access: public
void show_article (int $id, [int $captcha_error = 0])
  • int $id: The article id to show
  • int $captcha_error: if 1 it shows an error
show_comment (line 631)

Format the output for a comment.

  • access: public
void show_comment (array $commentdata)
  • array $commentdata: The data for this comment
strip_bbcode (line 1107)

strip bbcode from text string

  • return: the text stripped from bbcode
  • access: public
string strip_bbcode (string $data)
  • string $data: the text that can contain bbcode
strip_invalid_xml (line 346)

strip some stuff leftover from old editor

  • return: the text with invalid xml stripped
  • access: public
string strip_invalid_xml (string $data)
  • string $data: the text to process
user_confirm (line 1355)

Check confirmation after registering a new account

  • access: public
void user_confirm ()
user_edit (line 1206)

Form to alter user information. Can be used for both new users and editing settings

  • access: public
void user_edit ([int $register = 1])
  • int $register: if set, register a new user, otherwise it's a logged in user wanting to alter settings.
user_login (line 1169)

Login user so they can post comments etc

  • return: true on succesfull login, otherwise false
  • access: public
bool user_login (array $userdata)
  • array $userdata: At least key username and key password
user_save (line 1270)
  • access: public
void user_save ()

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:33 +0100 by phpDocumentor 1.4.1