Extension:TopicTags

Under Development:

=Introduction=

This extension provides inline topic-tags, which are completely independent of Categories. Wiki editors can insert topic-tags inline anyplace on a wikipage. The new, unique feature of these topic-tags, is they are not just page-level tags. They can be scoped to specific locations within the body of a page.

(Note this extension is unrelated to MediaWiki edit-tags)

=Appearance= Topic-tags have 2 formats:
 * Inline, where the tag is associated with a specific location on a page.
 * Page-level, where the tag is associated with an entire page.

For each tag, there's a Tag Page, containing a description of the tag, and a list of all pages containing the tag.

Inline Tags
An inline tag appears as a very small, super-script text-link. When clicked, reader is directed to the Tag-Page.

Page Tags
A page tag appears at the bottom of the page in full-size text. Also displayed are "Related Pages": a list of links to all other pages containing the same tag.

Tag Pages
For each tag, there's a Tag Page, containing a description of the tag, and a list of all pages containing the tag.

=Operation=

Clicking the tag-name in a tagged article
Click a tag-link to be directed to the Tag-Page.

Clicking a related-page link
Click a related-page link to be directed to the related wiki-page:
 * If the tag is inline on the related wiki-page, the reader will be directed to the specific tagged location in the body text.
 * If the tag is page-level tag on the related wiki-page, the reader will be directed to the top of the tagged page.

Editing
Two topic-tag formats can be used in articles. The only difference is the pipe | symbol. A tag-name may not contain an embedded space.

Inline Tags
Use the following syntax to create an inline tag. Displays as a small superscript in the article, with NO list of related articles. : 

Page Tags
Use the following syntax to create a page-level tag. Intended for bottom-of-article tags. Displays normal-size bold, with list of related articles: 

=Installation=


 * 1) Install all dependencies:
 * 2) Page_Forms
 * 3) DPL3
 * 4) Create the following wikipages. You need only to paste in the wikitext provided at the links below:
 * 5) New-Tag Form
 * 6) Tag Template
 * 7) Tag-list

=Implementation=

The current version is php-free, and can be installed manually.

Here's how it works. Installation ode linked on this page is minified. Here's a readable de-minify:

' transcluded section

' LOGIC: If the transclude does NOT contain 2nd parameter (the pipe char):

' Non-transcluded section (for display on this template page)

' Transclude the tag-description, from the tag-specific page

=PHP-Free Experiment= This project is an exploration into the feasibility of php-free extensions, which could be created by non-php programmers, using only wikitext.

=Dependencies= Extension:Page_Forms

Extension:UrlGetParameters

Extension:DynamicPageList3

=Known Issues=

Breaks if non-existent tag inserted.
Possible solutions: - Auto-create tag page when tag is clicked. Since tag links to template:tag, then template must execute code to create page. - Eliminate tag-pages. Might need to eliminate tag-descriptions too, at first (then do data-access on page to get/edit descriptions). - Need page which displays all Tags. Could be DPL on ? Might need to be htmltag recipe.

=Next Version=
 * Eliminate individual tag pages.
 * Rationale: To allow tags to be auto-created the instant they are used. Currently, the NewTag form must be used to create a new tag.
 * Progress: We're almost there, as currently related-page lists are created dynamically-- they are all a direct display of the Template:Tag page, using URL-parameters to pass the tag-name to the Template. Currently, the only role for each tag-page is to maintain the tag-description. The next step to completely eliminate individual tag pages is to store all tag-descriptions in a db table or a single wikipage.
 * Benefits: This has the side benefit of eliminate the Page_Forms dependency.

=Future Enhancements=
 * Stats: Would be cool to display usage stats, click stats, and other info about the tag on the Tag page.
 * There might be advantages to using separate tag-pages, as those pages might display statistics or other data more easily than the current dynamic template.