Update of /cvsroot/php-blog/additional_plugins/serendipity_plugin_hitmaps
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4374/serendipity_plugin_hitmaps
Added Files:
serendipity_plugin_hitmaps.php
Log Message:
New Hitmaps Plugin
--- NEW FILE: serendipity_plugin_hitmaps.php ---
<?php
// Hitmaps Block for Serendipity
// see http://kmi.open.ac.uk/projects/hitmaps/
// 11/2004 by Thomas Nesges <th...@tn...>
switch ($serendipity['lang']) {
default:
case 'en':
@define('PLUGIN_HITMAPS_TITLE', "Hitmaps");
@define('PLUGIN_HITMAPS_DESC', "Shows where the blogs visitors are coming from");
@define('PLUGIN_HITMAPS_MAPALTTEXT', "Where are visitors to this blog?");
break;
case 'de':
@define('PLUGIN_HITMAPS_TITLE', "Hitmaps");
@define('PLUGIN_HITMAPS_DESC', "Zeigt an woher die Besucher des Blogs kommen");
@define('PLUGIN_HITMAPS_MAPALTTEXT', "Woher kommen die Besucher dieses Blogs?");
break;
}
class serendipity_plugin_hitmaps extends serendipity_plugin {
function introspect(&$propbag) {
$propbag->add('name', PLUGIN_HITMAPS_TITLE);
$propbag->add('description', PLUGIN_HITMAPS_DESC);
}
function generate_content(&$title) {
global $serendipity;
$title = PLUGIN_HITMAPS_TITLE;
$siteurl = preg_replace("@http://(.*?)/?$@", "\\1", $serendipity['baseURL']);
echo "<a href='http://valepark.open.ac.uk/cpdn/stats/".$siteurl."-/map-world.html' id='hitMapsLink'>
<img src='http://jabber-dev.open.ac.uk/stats/index2.php?url=http://".$siteurl."/' border=0 alt='".PLUGIN_HITMAPS_MAPALTTEXT."' onError=\"this.onError=null; this.src='http://kmi.open.ac.uk/projects/hitmaps/imgs/begins-tomorrow.jpg'; document.getElementById('hitMapsLink').href='http://kmi.open.ac.uk/projects/hitmaps/'\"></a>";
}
}
/ vim: set sts=4 ts=4 expandtab : /
?>
|