Extension:DeliciousTagometerExtension

From MediaWiki.org

Jump to: navigation, search


 

Manual on MediaWiki Extensions
List of MediaWiki Extensions
Crystal Clear action run.png
DeliciousTagometerExtension

Release status: unknown

Description Create a del.icio.us tagometer badge
License No license specified
Download no link

check usage (experimental)

Contents

[edit] What can this extension do?

Adds a delicio.us tagometer badge into a page.

[edit] Usage

Enter the code <deliciousTagometerBadge></deliciousTagometerBadge> where you want the tagometer badge to appear.

[edit] Download instructions

Please cut and paste the code found below and place it in $IP/extensions/DeliciousTagometerBadge.php. Note: $IP stands for the root directory of your MediaWiki installation, the same directory that holds LocalSettings.php.

[edit] Installation

To install this extension, add the following to LocalSettings.php:

#add configuration parameters here
#setup user rights here
require_once("$IP/extensions/DeliciousTagometerBadge.php");

[edit] Code

<?php
# delicious bookmarking
 
//Extension credits that show up on Special:Version
$wgExtensionCredits['parserhook'][] = array(
        'name' => 'DeliciousTagometerBadge',
        'version' => 0.16,
        'author' => 'dorjeduck',
        'url' => 'http://www.mediawiki.org/wiki/Extension:DeliciousTagometerBadge',
        'description' => 'Create a del.icio.us tagometer badge',
);
 
 
#install extension hook
$wgExtensionFunctions[] = 'wfDeliciousTagometerBadgeExtension'; 
 
function wfDeliciousTagometerBadgeExtension() {
    global $wgParser;
    $wgParser->setHook( "deliciousTagometerBadge", "renderTagometer" );
}
 
function renderTagometer( $input, $argv, $parser ) {
 
    $output  = "<script type=\"text/javascript\">\nif (typeof window.Delicious == \"undefined\") window.Delicious = {};\nDelicious.BLOGBADGE_DEFAULT_CLASS = 'delicious-blogbadge-line';\n</script>\n<script src=\"http://static.delicious.com/js/blogbadge.js\"></script>\n";
 
    return $output;
}

[edit] See also

Extension:Bookmarking

[edit] Example

profusians library on goosbumps4all.net