Extension:DeliciousTagometerExtension

From MediaWiki.org
Jump to: navigation, search
MediaWiki extensions manual
Crystal Clear action run.png

Release status: unknown

Description Create a del.icio.us tagometer badge
Author(s) (dorjeducktalk)
License No license specified
Download No link

Translate the DeliciousTagometerExtension extension if it is available at translatewiki.net

Check usage and version matrix; code metrics

What can this extension do?[edit | edit source]

Adds a delicio.us tagometer badge into a page.

Usage[edit | edit source]

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

Download instructions[edit | edit source]

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.

Installation[edit | edit source]

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

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

Code[edit | edit source]

<?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;
}

See also[edit | edit source]

Extension:Bookmarking

Example[edit | edit source]

profusians library on goosbumps4all.net