Help:Extension:BlogPage

From mediawiki.org
PD Note: When you edit this page, you agree to release your contribution under the CC0. See Public Domain Help Pages for more info. PD

Blogs are a user's personal opinions, which can be found on the Blog: namespace. Users can comment on a blog and vote for it.

Blog page layout[edit]

The pages in the Blog namespace have their own, dedicated two-column layout. The left column contains a listing of the authors of the blog post and a list of other people who have recently edited the page (if any).

The right column contains a listing of popular blog posts, comments of the day (FIXME: not working now, see phab:T282967), a random game (if the PictureGame, PollNY, QuizGame and RandomGameUnit extensions are installed) and a listing of the newest blog posts.

It is possible to hide almost all of the aforementioned by configuring $wgBlogPageDisplay as appropriate, but it is not recommended to hide all of the aforementioned as it will impact the page layout for Blog: pages. The default value for the configuration variable is:

$wgBlogPageDisplay = [
	// Display the left column? If false, the following values below will be ignored:
	// 'author', 'recent_editors', 'recent_voters'
	'leftcolumn' => true,

	// Display the right column? If false, the following values below will be ignored:
	// 'popular_articles', 'in_the_news', 'comments_of_day', 'games', 'new_articles'
	'rightcolumn' => true,

	// Display the "About the Author" box? This box contains
	// the user's avatar and a brief bio from their social profile.
	// NOTE: if 'leftcolumn' is false, this value is ignored and the
	// box isn't shown.
	'author' => true,

	// Show a listing of other blog posts, if any, by the same user
	// in the "About the Author" section?
	// NOTE: if 'leftcolumn' is false, this value is ignored.
	'author_articles' => true,

	// Show the "other recent contributors" section below the
	// listing of other blog posts written by the same author
	// (i.e. 'author_articles' above)?
	// NOTE: regardless of the value of this variable, the list
	// will *not* be shown if the page only has one editor/author!
	// NOTE: if 'leftcolumn' is false, this value is ignored.
	'recent_editors' => true,

	// Show the avatars of people who voted for a particular
	// blog post? (the avatars are a clickable link to their
	// User: or User profile: page)
	// NOTE: if 'leftcolumn' is false, this value is ignored.
	'recent_voters' => true,

	// Show the list of 5 blog posts with the most upvotes?
	// NOTE: if 'rightcolumn' is false, this value is ignored.
	'popular_articles' => true,

	// Show news headlines (or whatever) from [[MediaWiki:Inthenews]]?
	// Entries on that interface message page should be separated by two newlines.
	// One entry will be randomly picked. If the message doesn't exist or its
	// contents are "-" (a single dash), then it will be ignored by BlogPage.
	// NOTE: if 'rightcolumn' is false, this value is ignored.
	'in_the_news' => true,

	// Show comments of the day?
	// NOTE: if 'rightcolumn' is false, this value is ignored.
	// NOTE: BROKEN as of January 2023, setting this to true WILL throw fatal errors!
	// See https://phabricator.wikimedia.org/T282967 for details.
	'comments_of_day' => false,

	// Display a randomly chosen social game (poll, picture game or quiz game)?
	// Requires the PictureGame, PollNY, QuizGame and RandomGameUnit extensions
	// to be installed.
	// This is shown below the popular articles section ('popular_articles')
	// and above the 5 newest blog posts ('new_articles') section.
	// NOTE: if 'rightcolumn' is false, this value is ignored.
	'games' => true,

	// Display the listing of 5 newest blog articles?
	// NOTE: if 'rightcolumn' is false, this value is ignored.
	'new_articles' => true
];

The byline below the blog's title uses categories to figure out the author or authors of the blog post. Though many different editors may have edited the page, if it's categorized only into the category Articles by user Foo, then the byline will accurately display Foo as the sole author. Below the byline is the creation date of the post and the date when it was last edited after the initial creation, if the post has been edited afterwards.

It's possible for a blog post to have multiple authors. This can be accomplished by categorizing it into the appropriate Articles by user... category. For example, if the users Foo and Bar have both contributed to a blog post, then it should be categorized into Aricles by user Foo and also Articles by user Bar to have both Foo and Bar show up as the authors. The byline will show the authors in the order the categories appear in the page instead of sorting them alphabetically.

The format of the category name can be edited by an interface admin by editing the page MediaWiki:Blog-by-user-category, but it should be noted that doing so will likely break existing blog posts' authorship info as the change is not automatically reflected into any and all existing blog posts!

Creating a new blog post[edit]

Any user with the createblogpost user right can create a new blog post via the Special:CreateBlogPost special page. (By default this user right is granted to all logged-in users, but should you wish to instead grant it only to a dedicated "blog authors" user group or somesuch, that is technically possible to do.) Note that it is not possible to grant the rights to edit blog pages to anonymous users.

Interface admins can add rules, tips, tricks, hints, etc. for the Special:CreateBlogPost page by editing the page MediaWiki:Blog-create-rules. This interface message supports wikitext.

Categories can be blacklisted from the tag cloud on Special:CreateBlogPost by placing them on MediaWiki:Blog-tagcloud-blacklist, each entry being separated by an asterisk (*) and a newline.

Newest and most popular blog articles[edit]

The list of newest blog posts can be viewed at Special:ArticleLists. By default this special page displays the 25 newest blog posts, but this can be tailored to your liking by passing in the appropriate parameter to the special page, for example Special:ArticleLists/5 would show only the five newest blog posts.
It's also possible to include this special page onto a wiki page, e.g. {{Special:ArticleLists/15}} to show the 15 newest blog posts on a wiki page.

The blog home page at Special:ArticlesHome displays the 25 most popular blog posts, 10 most voted blog posts from the past 72 hours, 10 most commented blog posts from the past 72 hours and the 10 newest blog posts. The popularity of a blog post is determined by the amount of votes it has; in order to qualify as "popular", it has to have at least five comments or votes.

Points[edit]

It's possible to give out points for writing new blog posts. This can be done by a system administrator by setting $wgUserStatsPointValues['opinions_created'] to a non-zero value, e.g. 100 to give out a hundred points for writing a new blog post. By default no points are awarded for creating new blogs (unless NS_BLOG is in the $wgNamespacesForEditPoints array, in which case the amount of points given out will be determined by $wgUserStatsPointValues['edit'].

Please note that this feature may or may not work as intended (see phab:T154151).

User profiles and blogs[edit]

Social profile pages display the user's five newest blog posts (or less if they haven't written five posts), and a link to the category page containing all of their blog posts (if they've written over five posts).

This feature can be disabled by setting $wgUserProfileDisplay['articles'] to false.