Skip to content

Commit

Permalink
Item8941: Initial attempt at integrating this interactive img map edi…
Browse files Browse the repository at this point in the history
…tor with TMCE. Sadly I get NS_ERROR_XPC_CANT_CONVERT_WN_TO_FUN on FF 3.5.6, maybe it works on IE.

git-svn-id: http://svn.foswiki.org/trunk/ImgMapPlugin@7239 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
PaulHarvey authored and PaulHarvey committed Apr 21, 2010
0 parents commit fac2ba8
Show file tree
Hide file tree
Showing 55 changed files with 11,191 additions and 0 deletions.
46 changes: 46 additions & 0 deletions data/System/ImgMapPlugin.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
%META:TOPICPARENT{name="Plugins"}%
---+ Empty Plugin

%SHORTDESCRIPTION%

---++ Plugin Preferences

Preferences set here have no affect. They must be set in WebPreferences or Main.SitePreferences

Enable by setting =TINYMCEPLUGIN_ADDITIONAL_MCEPLUGINS= to include =imgmap,= and also adjust the =TINYMCEPLUGIN_BUTTONS2= to include =imgmap=, Eg.:
%JQREQUIRE{"chili"}%<verbatim class="tml">
* Set TINYMCEPLUGIN_ADDITIONAL_MCEPLUGINS = imgmap, wordcount
* Set TINYMCEPLUGIN_BUTTONS2 = tablecontrols,separator,attach,image,imgmap,charmap,hr,separator,code,hide,fullscreen
</verbatim>

<!--
One line description, required for extensions repository catalog.
* Set SHORTDESCRIPTION = %$SHORTDESCRIPTION%
-->

---++ Installation
%$INSTALL_INSTRUCTIONS%

---++ Plugin Info

Foswiki:Extensions.PleaseFeelFreeToModify

| Author: | Foswiki:Main.PaulHarvey |
| Copyright: | &copy; 2010, Paul.W.Harvey@csiro.au <br/>\
Developing the [[http://taxonomy.org.au][Taxonomic Research Information Network]] for<br/>\
the [[http://www.anbg.gov.au/cpbr/][Centre for Plant Biodiversity Research]] at [[http://www.csiro.au/pi][CSIRO Plant Industry]]<br/>\
<p>This plugin for Foswiki packages imgmap plugin, found at [[http://code.google.com/p/imgmap]].</p>\
<p>The original copyright notice reads in part:</p>\
<blockquote>\
Image Map Editor (imgmap) - in-browser imagemap editor<br/>\
Copyright (C) 2006 - 2008 Adam Maschek (adam.maschek @ gmail.com)\
</blockquote>\
<p>See [[%ATTACHURLPATH%/imgmap_src.js][source code]] comments for full copyright header including GPL terms</p>\
<p> =imgmap= uses Google's [[http://code.google.com/p/explorercanvas/][excanvas]] code for Internet Explorer compatibility. See [[%ATTACHURLPATH%/excanvas_src.js][excanvas source code]] comments for full copyright header including APL license terms</p> |
| License: | GPL ([[http://www.gnu.org/copyleft/gpl.html][GNU General Public License]]) |
| Release: | %$RELEASE% |
| Version: | %$VERSION% |
| Change&nbsp;History: | <!-- versions below in reverse order -->&nbsp; |
| 21 Apr 2010 | Foswiki:Main.PaulHarvey: Initial version |
| Home: | http://foswiki.org/Extensions/%TOPIC% |
| Support: | http://foswiki.org/Support/%TOPIC% |
117 changes: 117 additions & 0 deletions lib/Foswiki/Plugins/ImgMapPlugin.pm
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
# See bottom of file for default license and copyright information

=begin TML
---+ package TinyMCEImgMapPlugin
=cut

package Foswiki::Plugins::TinyMCEImgMapPlugin;

# Always use strict to enforce variable scoping
use strict;
use warnings;

use Foswiki::Func (); # The plugins API
use Foswiki::Plugins (); # For the API version

# $VERSION is referred to by Foswiki, and is the only global variable that
# *must* exist in this package. This should always be in the format
# $Rev: 7196 $ so that Foswiki can determine the checked-in status of the
# extension.
our $VERSION = '$Rev: 7196 $';

# $RELEASE is used in the "Find More Extensions" automation in configure.
# It is a manually maintained string used to identify functionality steps.
# You can use any of the following formats:
# tuple - a sequence of integers separated by . e.g. 1.2.3. The numbers
# usually refer to major.minor.patch release or similar. You can
# use as many numbers as you like e.g. '1' or '1.2.3.4.5'.
# isodate - a date in ISO8601 format e.g. 2009-08-07
# date - a date in 1 Jun 2009 format. Three letter English month names only.
# Note: it's important that this string is exactly the same in the extension
# topic - if you use %$RELEASE% with BuildContrib this is done automatically.
our $RELEASE = '2010-04-21';

# Short description of this plugin
# One line description, is shown in the %SYSTEMWEB%.TextFormattingRules topic:
our $SHORTDESCRIPTION = 'Foswiki integration (including TinyMCE plugin) of the http://code.google.com/p/imgmap project';
our $NO_PREFS_IN_TOPIC = 1;

=begin TML
---++ initPlugin($topic, $web, $user) -> $boolean
* =$topic= - the name of the topic in the current CGI query
* =$web= - the name of the web in the current CGI query
* =$user= - the login name of the user
* =$installWeb= - the name of the web the plugin topic is in
(usually the same as =$Foswiki::cfg{SystemWebName}=)
*REQUIRED*
Called to initialise the plugin. If everything is OK, should return
a non-zero value. On non-fatal failure, should write a message
using =Foswiki::Func::writeWarning= and return 0. In this case
%<nop>FAILEDPLUGINS% will indicate which plugins failed.
In the case of a catastrophic failure that will prevent the whole
installation from working safely, this handler may use 'die', which
will be trapped and reported in the browser.
__Note:__ Please align macro names with the Plugin name, e.g. if
your Plugin is called !FooBarPlugin, name macros FOOBAR and/or
FOOBARSOMETHING. This avoids namespace issues.
=cut

sub initPlugin {
my ( $topic, $web, $user, $installWeb ) = @_;

# check for Plugins.pm versions
if ( $Foswiki::Plugins::VERSION < 2.0 ) {
Foswiki::Func::writeWarning( 'Version mismatch between ',
__PACKAGE__, ' and Plugins.pm' );
return 0;
}

# Plugin correctly initialized
return 1;
}

1;
__END__
This plugin for Foswiki packages mcegooglemap plugin, a GPL Sourceforge
project found at http://mcegooglemap.sourceforge.net/
The original copyright notice reads as follows:
Copyright: Cees Rijken, Christian Ladewig, Jeroen van der Stijl
License: GPL
(c)2009 All rights reserved.
The remainder of this information applies to the TinyMCEImgMapPlugin:
Plugin for Foswiki - The Free and Open Source Wiki, http://foswiki.org/
TinyMCEImgMapPlugin is Copyright (C) 2009-2010 Foswiki Contributors.
Foswiki Contributors are listed in the AUTHORS file in the root
of this distribution. NOTE: Please extend that file, not this notice.
Additional copyrights apply to some or all of the code as follows:
Copyright (C) 2000-2003 Andrea Sterbini, a.sterbini@flashnet.it
Copyright (C) 2001-2006 Peter Thoeny, peter@thoeny.org
and TWiki Contributors. All Rights Reserved.
This license applies to TinyMCEImgMapPlugin and to any derivatives.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version. For
more details read LICENSE in the root of this distribution.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
For licensing info read LICENSE file in the root of this distribution.
1 change: 1 addition & 0 deletions lib/Foswiki/Plugins/ImgMapPlugin/DEPENDENCIES
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Foswiki::Plugins::TinyMCEPlugin,>=0,perl,Required
52 changes: 52 additions & 0 deletions lib/Foswiki/Plugins/ImgMapPlugin/MANIFEST
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
data/System/ImgMapPlugin.txt 0644
lib/Foswiki/Plugins/ImgMapPlugin.pm 0644
pub/System/ImgMapPlugin/examples/example1.html 0644
pub/System/ImgMapPlugin/examples/example1_files/accept.gif 0644
pub/System/ImgMapPlugin/examples/example1_files/add.gif 0644
pub/System/ImgMapPlugin/examples/example1_files/bullet_green.gif 0644
pub/System/ImgMapPlugin/examples/example1_files/bullet_orange.gif 0644
pub/System/ImgMapPlugin/examples/example1_files/clipboard.gif 0644
pub/System/ImgMapPlugin/examples/example1_files/default_interface.js 0644
pub/System/ImgMapPlugin/examples/example1_files/delete.gif 0644
pub/System/ImgMapPlugin/examples/example1_files/edit.gif 0644
pub/System/ImgMapPlugin/examples/example1_files/html.gif 0644
pub/System/ImgMapPlugin/examples/example1_files/imgmap.css 0644
pub/System/ImgMapPlugin/examples/example1_files/js/arrow.gif 0644
pub/System/ImgMapPlugin/examples/example1_files/js/colorPicker.css 0644
pub/System/ImgMapPlugin/examples/example1_files/js/jquery-1.3.2.js 0644
pub/System/ImgMapPlugin/examples/example1_files/js/jquery.colorPicker.js 0644
pub/System/ImgMapPlugin/examples/example1_files/upload.php 0644
pub/System/ImgMapPlugin/examples/example1_files/zoom.gif 0644
pub/System/ImgMapPlugin/excanvas.js 0644
pub/System/ImgMapPlugin/excanvas_src.js 0644
pub/System/ImgMapPlugin/imgmap.js 0644
pub/System/ImgMapPlugin/imgmap_src.js 0644
pub/System/ImgMapPlugin/lang_de.js 0644
pub/System/ImgMapPlugin/lang_en.js 0644
pub/System/ImgMapPlugin/lang_es.js 0644
pub/System/ImgMapPlugin/lang_fr.js 0644
pub/System/ImgMapPlugin/lang_hu.js 0644
pub/System/ImgMapPlugin/lang_pt.js 0644
pub/System/ImgMapPlugin/license_GPL.txt 0644
pub/System/ImgMapPlugin/licenses/excanvas.txt 0644
pub/System/ImgMapPlugin/licenses/fckeditor.txt 0644
pub/System/ImgMapPlugin/licenses/tinymce.txt 0644
pub/System/ImgMapPlugin/licenses/xinha.txt 0644
pub/System/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/imgmap/css/imgmap.css 0644
pub/System/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/imgmap/editor_plugin.js 0644
pub/System/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/imgmap/editor_plugin_src.js 0644
pub/System/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/imgmap/images/accept.gif 0644
pub/System/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/imgmap/images/add.gif 0644
pub/System/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/imgmap/images/bullet_green.gif 0644
pub/System/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/imgmap/images/bullet_orange.gif 0644
pub/System/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/imgmap/images/clipboard.gif 0644
pub/System/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/imgmap/images/delete.gif 0644
pub/System/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/imgmap/images/edit.gif 0644
pub/System/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/imgmap/images/html.gif 0644
pub/System/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/imgmap/images/tinymce_button.gif 0644
pub/System/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/imgmap/images/zoom.gif 0644
pub/System/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/imgmap/install.txt 0644
pub/System/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/imgmap/jscripts/excanvas.js 0644
pub/System/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/imgmap/jscripts/functions.js 0644
pub/System/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/imgmap/langs/en.js 0644
pub/System/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/imgmap/popup.html 0644
55 changes: 55 additions & 0 deletions lib/Foswiki/Plugins/ImgMapPlugin/build.pl
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#!/usr/bin/perl -w
#
# Example build class. Copy this file to the equivalent place in your
# plugin or contrib and edit.
#
# Read the comments at the top of lib/Foswiki/Contrib/Build.pm for
# details of how the build process works, and what files you
# have to provide and where.
#
# Requires the environment variable FOSWIKI_LIBS (a colon-separated path
# list) to be set to point at the build system and any required dependencies.
# Usage: ./build.pl [-n] [-v] [target]
# where [target] is the optional build target (build, test,
# install, release, uninstall), test is the default.
# Two command-line options are supported:
# -n Don't actually do anything, just print commands
# -v Be verbose
#

# Standard preamble
use strict;

BEGIN {
unshift @INC, split( /:/, $ENV{FOSWIKI_LIBS} );
}

use Foswiki::Contrib::Build;

# Declare our build package
package BuildBuild;
use Foswiki::Contrib::Build;
our @ISA = qw( Foswiki::Contrib::Build );

sub new {
my $class = shift;
return bless( $class->SUPER::new( "ImgMapPlugin" ), $class );
}

# Example: Override the build target
sub target_build {
my $this = shift;

$this->SUPER::target_build();

# Do other build stuff here
}

package main;

# Create the build object
my $build = new BuildBuild();

# Build the target on the command line, or the default target
$build->build($build->{target});

Loading

0 comments on commit fac2ba8

Please sign in to comment.