NAME
MT::Blog - Movable Type blog record
SYNOPSIS
use MT::Blog;
my $blog = MT::Blog->load($blog_id);
$blog->name('Some new name');
$blog->save
or die $blog->errstr;
DESCRIPTION
An MT::Blog object represents a blog in the Movable Type system. It contains all of the settings, preferences, and configuration for a particular blog. It does not contain any per-author permissions settings--for those, look at the MT::Permission object.
USAGE
As a subclass of MT::Object, MT::Blog inherits all of the data-management and -storage methods from that class; thus you should look at the MT::Object documentation for details about creating a new object, loading an existing object, saving an object, etc.
The following methods are unique to the MT::Blog interface:
$blog->file_mgr
Returns the MT::FileMgr object specific to this particular blog.
DATA ACCESS METHODS
The MT::Blog object holds the following pieces of data. These fields can be accessed and set using the standard data access methods described in the MT::Object documentation.
- id
- name
- description
- site_path
- site_url
- archive_path
- archive_url
- server_offset
- archive_type
- archive_type_preferred
- days_on_index
- file_extension
- email_new_comments
- allow_comment_html
- autolink_urls
- sort_order_posts
- sort_order_comments
- allow_comments_default
- convert_paras
- convert_paras_comments
- status_default
- allow_anon_comments
- allow_unreg_comments
- words_in_excerpt
- ping_weblogs
- mt_update_key
- language
- welcome_msg
The numeric ID of the blog.
The name of the blog.
The blog description.
The path to the directory containing the blog's output index templates.
The URL corresponding to the site_path.
The path to the directory where the blog's archives are stored.
The URL corresponding to the archive_path.
A slight misnomer, this is actually the timezone that the user has selected; the value is the offset from GMT.
A comma-separated list of archive types used in this particular blog, where an archive type is one of the following: Individual, Daily, Weekly, Monthly, or Category. For example, a blog's archive_type would be Individual,Monthly if the blog were using Individual and Monthly archives.
The "preferred" archive type, which is used when constructing a link to the archive page for a particular archive--if multiple archive types are selected, for example, the link can only point to one of those archives. The preferred archive type (which should be one of the archive types set in archive_type, above) specifies to which archive this link should point (among other things).
The number of days to be displayed on the index.
The file extension to be used for archive pages.
A boolean flag specifying whether authors should be notified of new comments posted on entries they have written.
A boolean flag specifying whether HTML should be allowed in comments. If it is not allowed, it is automatically stripped before building the page (note that the content stored in the database is not stripped).
A boolean flag specifying whether URLs in comments should be turned into links. Note that this setting is only taken into account if allow_comment_html is turned off.
The default sort order for entries. Valid values are either ascend or descend.
The default sort order for comments. Valid values are either ascend or descend.
The default value for the allow_comments field in the MT::Entry object.
A comma-separated list of text filters to apply to each entry when it is built.
A comma-separated list of text filters to apply to each comment when it is built.
The default value for the status field in the MT::Entry object.
A boolean flag specifying whether anonymous comments (those posted without a name or an email address) are allowed.
A boolean flag specifying whether unregistered comments (those posted without a validated email/password pair) are allowed.
The number of words in an auto-generated excerpt.
A boolean flag specifying whether the system should send an XML-RPC ping to weblogs.com after an entry is saved.
The Movable Type Recently Updated Key to be sent to movabletype.org after an entry is saved.
The language for date and time display for this particular blog.
The welcome message to be displayed on the main Editing Menu for this blog. Should contain all desired HTML formatting.
DATA LOOKUP
In addition to numeric ID lookup, you can look up or sort records by any combination of the following fields. See the load documentation in MT::Object for more information.
- name
NOTES
- When you remove a blog using MT::Blog::remove, in addition to removing the blog record, all of the entries, notifications, permissions, comments, templates, and categories in that blog will also be removed.
- Because the system needs to load MT::Blog objects from disk relatively often during the duration of one request, MT::Blog objects are cached by the MT::Blog::load object so that each blog only need be loaded once. The MT::Blog objects are cached in the MT::Request singleton object; note that this caching only occurs if the blogs are loaded by numeric ID.
AUTHOR & COPYRIGHTS
Please see the MT manpage for author, copyright, and license information.
