Extension:APF - Advanced Page Functions

What can this extension do?
This extension combines the functionality of many smaller extensions to provide an updated version of some of the most commonly used page functions. The extension comes with files that you can modify if you wish to internationalize messages and function names. The code is currently in beta and new functionality is being added with each monthly release.

On a per page basis users of this extension can:


 * Change the heading that appears at the top of an article.
 * Change the heading that appears in the browser.
 * Set the meta description that will be used in a search engine listing.
 * Set the meta keywords that are used by some search engines.
 * Append to the default meta keywords that are used by some search engines.
 * Add custom meta information.
 * - Add per page inline CSS
 * - Add per page CSS using an external file
 * - Embed a flash movie anywhere on a page
 * Add content from an external file to your page.

Usage
Edit your page and add the following function calls to the top of the edit window:


 * - Sets the page heading
 * - Sets the browser page name
 * - Sets the meta description
 * - Sets the meta keywords
 * - Adds additional meta keywords
 * - Adds custom meta information

Usage

 *   - This page function can be used to add additional inline custom CSS styles to a page. To use the function, replace with the CSS style commands, edit your page and place one or more of these page functions anywhere on the page. The CSS will always be added to the top of your MediaWiki page when the page is generated. If you have more than one call then the CSS styles from each call will be added in the order that the functions appear on the page.


 *   - To add CSS styles from a file(s) that you have placed in the /extensions/APF/CSS directory, replace with the name of the file containing your CSS styles, and enter the page function(s) anywhere on your page. If you prefer to store the CSS files in another directory then you change the source directory by setting $apfCssDir global variable in your LocalSettings.php file. For example: $apfCssDir = "C:\wamp\www\wiki5\mw\extensions\APF\CSS_FILES";

If you use both of these page functions on a page then the extension will always add the inline CSS styles from the   function calls after the import commands that are generated by the    function calls. This allows you to fine-tune the CSS on the page and override CSS styles that were added from the imported files.

Example
Adding the following to your page:

Adds this to your page source:

 @import '/wiki5/mw/extensions/APF/CSS/sample.css'; @import '/wiki5/mw/extensions/APF/CSS/sample1.css'; background-color: red; } background-color: black; }
 * 1) content h1,h2,h3 {color: #fff000;}
 * 2) footer {
 * 1) header {

Usage
Edit your page and add the following function calls where you would like your movie(s) to appear:


 * - Adds a flash movie to the page

Example
This page function will cause the following code to be inserted into your page:

&lt;object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' width='400' height='250' id='/wiki5/mw/images/filename.swf' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0'&gt; &lt;param name='movie' value='/wiki5/mw/images/filename.swf'&gt; &lt;embed src='/wiki5/mw/images/filename.swf' width='400' height='250' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'&gt; &lt;/embed&gt;&lt;/object&gt;

Usage
Edit your page and add the following function calls where you would like your content from files in the /extensions/APF/FILE directory to appear:


 * - Adds content from this file to the page

Download Instructions
Please download the zip release containing code files and place the files in the following directory:

/APF.i18n.magic.php /APF.i18n.php /APF_setup.php /CSS/sample.css /FILE/filename.txt /includes/APF.php /includes/APF_HTML.php /includes/APF_Tag.php

Internationalization Instructions
If you need to internationalize this extension make changes to the following files:


 * /APF.i18n.magic.php
 * /APF.i18n.php

Check the contents of the files for more information on what you will need to change to internationalize the functions for your language.

Installation

 * 1) In the directory in $IP/extensions create a new directory APF - where $IP is your MediaWiki installation directory.
 * 2) Copy the extension directories and files into the APF directory you just created
 * 3) Add the following line to the bottom of the LocalSettings.php in your MediaWiki installation directory: require_once('extensions/APF/APF.php');
 * 4) Modify the files: APF.i18n.magic.php and APF.i18n.php if you need to internationalize this extension for another language.
 * 5) If you use the page.cssf function then store your files in the  /extensions/APF/CSS directory
 * 6) If you use the page.swf1 function and if you want to allow users to upload their own swf files then add $wgFileExtensions[] = 'swf'; to LocalSettings.php. Files uploaded by users will be uploaded to the /images directory

Code

 * Download from: Download Snapshot

Bugs, Comments and Feature Requests

 * Bugs or feature requests can be entered here: Bugs, Comments and Feature Requests

Dependency

 * No dependencies when used with MediaWiki 1.14 and above