Skip to content

Commit

Permalink
Item1142: port GoogleAnalyticsPlugin
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.foswiki.org/trunk/GoogleAnalyticsPlugin@2694 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
WillNorris authored and WillNorris committed Feb 25, 2009
1 parent 7eca3ee commit c04b601
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 14 deletions.
Expand Up @@ -33,7 +33,7 @@ __Note:__ You do not need to install anything on the browser to use this plugin.
* Download the ZIP file from the Plugin web (see below)
* Unzip ==%TOPIC%.zip== in your root ($TWIKI_ROOT) directory. Content:
| *File:* | *Description:* |
| ==data/TWiki/GoogleAnalyticsPlugin.txt== | |
| ==data/System/GoogleAnalyticsPlugin.txt== | |
| ==lib/Foswiki/Plugins/GoogleAnalyticsPlugin/build.pl== | |

* Optionally, if it exists, run ==%TOPIC%_installer== to automatically check and install other TWiki modules that this module depends on. You can also do this step manually.
Expand Down
@@ -1,4 +1,4 @@
package TWiki::Plugins::GoogleAnalyticsPlugin;
package Foswiki::Plugins::GoogleAnalyticsPlugin;

use strict;

Expand All @@ -21,15 +21,15 @@ sub initPlugin {
my( $topic, $web, $user, $installWeb ) = @_;

# check for Plugins.pm versions
if( $TWiki::Plugins::VERSION < 1.1 ) {
TWiki::Func::writeWarning( "Version mismatch between $pluginName and Plugins.pm" );
if( $Foswiki::Plugins::VERSION < 1.1 ) {
Foswiki::Func::writeWarning( "Version mismatch between $pluginName and Plugins.pm" );
return 0;
}

$debug = TWiki::Func::getPluginPreferencesFlag( "DEBUG" );
$debug = Foswiki::Func::getPluginPreferencesFlag( "DEBUG" );
# Get plugin preferences, variables defined by:
# * Set GOOGLESITEKEY = ...
$googleSiteKey = TWiki::Func::getPluginPreferencesValue( "GOOGLESITEKEY" );
$googleSiteKey = Foswiki::Func::getPluginPreferencesValue( "GOOGLESITEKEY" );

_addToHead();
return 1;
Expand All @@ -50,7 +50,7 @@ sendStats();
// ]]>
</script>
';
TWiki::Func::addToHEAD('GOOGLEANALYTICSPLUGIN',$header)
Foswiki::Func::addToHEAD('GOOGLEANALYTICSPLUGIN',$header)
}

1;
5 changes: 5 additions & 0 deletions lib/Foswiki/Plugins/GoogleAnalyticsPlugin/MANIFEST
@@ -0,0 +1,5 @@
data/System/GoogleAnalyticsPlugin.txt 0664
lib/Foswiki/Plugins/GoogleAnalyticsPlugin.pm 0664
pub/System/GoogleAnalyticsPlugin/Google_Analytics_Dashboard.png 0664
pub/System/GoogleAnalyticsPlugin/Google_Analytics_Dashboard_small.jpg 0664

Expand Up @@ -8,10 +8,10 @@ BEGIN
}
}

use TWiki::Contrib::Build;
use Foswiki::Contrib::Build;

# Create the build object
$build = new TWiki::Contrib::Build( 'GoogleAnalyticsPlugin' );
$build = new Foswiki::Contrib::Build( 'GoogleAnalyticsPlugin' );

# Build the target on the command line, or the default target
$build->build($build->{target});
Expand Down
5 changes: 0 additions & 5 deletions lib/TWiki/Plugins/GoogleAnalyticsPlugin/MANIFEST

This file was deleted.

0 comments on commit c04b601

Please sign in to comment.