Extension:DeliciousTagometerExtension
From MediaWiki.org
![]() |
This extension stores its source code on a wiki page. Please be aware that this code may be unreviewed or maliciously altered. They may contain security holes, outdated interfaces that are no longer compatible etc. Note: No localisation updates are provided for this extension by translatewiki.net. |
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 |
Contents
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; }