Extension:BedellPenDragon

The BedellPenDragon extension is like a combination of Extension:Random In Category and the example page_props metadata extension. It may as well have been called the BastardChild extension. The extension makes available a  tag and parser functions to allow pages to add or remove metadata to/from the page_props table. It is designed to be used in conjunction with Extension:CategoryGallery and Extension:RecentPages, the latter of which is another hacky, inelegant, poorly-documented extension, full of duplicate code and superfluous, redundant and/or unindexed database queries, from the author who brought you Extension:FrontBackMatterForcedWikilinks, an extension that is only slightly less useful than Extension:Awesomeness (whose only function is "bolding all occurrences of the word awesome - and the equally awesome word, awesomeness"), but is less fun and has a more cumbersome compound name that is similar to something out of the Finnish language. Having said all that, the alternatives to using this extension are even worse, so you better install it and make the best of it.

Configuration
There are no configuration settings. You were bad, so your configuration privileges have been taken away until further notice. Maybe this will give you some time to rethink your behavior.

Usage
The most obvious uses of this extension are as follows:

Random page in category
To get the page title of a random page in Category:Aubry, use, e.g.: 

or to get a bulleted, wikified, sorted list of 12 random page titles from Category:Nathan Larson essays:

]] *[[

or to get the content of a randomly-chosen page from Category:Featured quotes with s 1 and 26 excluded:



Parameters
The input, i.e. the text between the opening and closing tags, overrides the delimiter parameter.

Today's featured article
Create a Template:TFAPic like this:

Create a Template:FASummary like this:

Create a Template:Randomly featured article like this: 

Start your featured article (e.g. polyamory) like this:



Transclude Template:Randomly featured article to your main page and you'll get something like this:



"New Pages" or "Did You Know" descriptions via metadata from the pages themselves (requires RecentPages extension)
You'll need Extension:RecentPages for this.

PageSummary template and New Pages display of pages with that template
You probably want to create a page summary template (Template:PageSummary) like this: That way, you can write your wiki pages like this:



Notice how this creates two summaries separated by a pipe; the short summary is the first sentence, while the long summary is the first sentence followed by the rest of the summary. You can then use the Recent Pages extension to create something like this, which you'll put in, e.g. Template:New articles at PolyWiki‎: 

This will produce a result like this, when inserted into the appropriate main page template (e.g. one you can borrow from Main page):



(See Extension:RecentPages for an explanation of the  tag parameters used above.) You'll probably also want to create a Template:InvisiblePageSummary like this:

Then you can create wikitext like this, that uses a different page summary than what you put for the article lead. E.g., in this case it was necessary because the article lead had wikified words in the page title:
 * The distinction between polyamory and swinging is that at the core, polyamory is about multiple, consensual, sexual, loving relationships while swinging is multiple, consensual, sexual relationships.

List of new unsummarized articles
You then want to create a PolyWiki:New articles without summaries:

The following is a list of new articles in need of summaries: 

You will get a result like this:



CategoryGallery with captions generated from image description files (requires CategoryGallery extension)
You'll need Extension:CategoryGallery for this. Place image descriptions on your image file pages (e.g. File:Popsicle stick Eiffel Tower.jpg) using the same PageSummary template as before. Now, on the page where you're putting the gallery, use e.g.:



The result is as follows (note how the captions are generated using the metadata you saved on each image page):



FAQ
===I want to have a random article or an excerpt thereof (if it's a long article) display on the main page, sort of like wikipedia:Wikipedia:Today's featured article. Is this the right extension to use?=== It depends on exactly what you're trying to accomplish:
 * Do you want to have any article on the wiki, regardless of quality, be eligible to appear on the main page, with the only standard being (perhaps) that it's of a certain minimum length? E.g., do you have such a large selection of articles you want to be eligible to be displayed as featured articles that it would be impracticable to maintain a centralized list or to add them as members of a Category:Featured articles? Then [[Extension:Blurb might be the extension you want.
 * Do you have a pretty short list of articles that you want to have be eligible to appear on the main page, and you don't mind editing a page containing a centralized list every time you want to add or remove articles from the list? Then Extension:RandomSelection might be the one you want. See http://wiki.mises.org/wiki/Template:Featured_article for an example of RandomSelection in action.
 * Do you want to have articles be displayed as featured articles if and only if those articles are members of, say, Category:Featured articles? Then BedellPenDragon is the extension you want.

With reference to, why does the "exclude" parameter have users specify page IDs rather than page titles, and why isn't there a "namespace" parameter?
Developer laziness, and also the fact that does not have the necessary fields to make it as simple a matter as just adding another condition to a SELECT database query. This extension was mostly designed for small wikis with only a few users, at most, who would need to know how to use that tag. Make good use of the PAGEID magic word to find out page IDs, if you need to. Then of course there's the API; see e.g. https://www.mediawiki.org/w/api.php?action=query&prop=pageprops&titles=Extension:BedellPenDragon. In the long run, page metadata features, perhaps involving Wikidata, are supposed to be developed that are better and more scalable.

Should this extension be rewritten to use a Summary: or Metadata: namespace instead of the page_props table?
It's an interesting idea, but then you'd need to make more than one edit, to more than one page, if you're changing both the page content and the page metadata. This isn't unheard of; for example, when you move a page, you already often have to make more than one change (i.e. (1) actually moving the page and (2) changing the page content to reflect the new title).

The fact that there might be other metadata besides just the page summary suggests that you might want to call it a Metadata: namespace. However, RationalWiki does have a Summary: namespace, mostly for discussion threads.