DEPRECATION WARNING

This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.

EXT: MW Imagemap

Author:Christopher
Created:2010-12-18T19:57:23
Changed:2013-10-07T21:38:52.570000000
Classification:mwimagemap
Keywords:imagemaps, wysiwyg, TYPO3
Author:Michael Perlbach
Email:info@mikelmade.de
Language:en

img-1 img-2 EXT: MW Imagemap

Extension Key: mwimagemap

Language: en

Version: 1.2.16

Keywords: imagemaps, wysiwyg, TYPO3

Copyright 2007-2013, Michael Perlbach, <info@mikelmade.de>

This document is published under the Open Content License

available from http://www.opencontent.org/opl.shtml

The content of this document is related to TYPO3

- a GNU/GPL CMS/Framework available from www.typo3.org

Table of Contents

`EXT: MW Imagemap 1 <#__RefHeading__5708_1738894311>`_

`Introduction 3 <#__RefHeading__5710_1738894311>`_

What does it do? 3

Screenshots 3

`Users manual 6 <#__RefHeading__467_413120346>`_

Creating/Changing an imagemap 6

Adding linked areas to an imagemap 6

Customizing the borders of areas 8

Repositioning several areas at once 9

Displaying a content box 10

Putting an imagemap on a page 11

`Configuration 12 <#__RefHeading__31515_818911409>`_

Integrating MW Imagemap into DAM 12

Configuration options in the extension manager 12

Typoscript-options 13

Frontend Javascript 13

Using the hook 13

`Known problems 14 <#__RefHeading__31525_818911409>`_

`To-Do list 15 <#__RefHeading__477_413120346>`_

`ChangeLog 16 <#__RefHeading__31623_818911409>`_

`Sponsors 17 <#__RefHeading__2104_892945570>`_

Introduction

The development of MW Imagemap was initially sponsored by Metaways Infosystems GmbH .

We would also like to thank Walter Zorn (died 2009) for his wonderful JavaScript Vector Graphics Library. Without it this extension could not have been realised.

Additional thanks to Paul Mehrer for starting this extension, Lars Jakobsen, Christian Mohr and lots of other people for their testing, proposals and bugfixes.

For the list of sponsors please refer to the final chapter “Sponsors” of this manual..

What does it do?

The MW Imagemap extension contains a backend module to create and edit imagemaps, a frontend plugin to display these imagemaps on pages, and an option to apply imagemaps to the content types IMAGE and IMAGE WITH TEXT.

Imagemaps are created in a backend module which is located unter “file” or under “Tools” when it is integrated into DAM. Images from a subdirectory under “fileadmin” can be used for imagemaps and it's also possible to upload new images for an imagemap. All imagemaps are edited in a wysiwyg mode.

Screenshots

Uploading or selecting an image for use in an imagemap:

img-3 Working with an imagemap

Several areas can be defined and marked up on the image in different colors.

The following screen shows parts of the area editor for a polygon.

img-4 Creating a new area or selecting a existing area to edit

Four area shapes are supported: rectangle, circle, polygon and default.

The “default” area covers everything not covered by an otherwise defined area.

img-5 A click on an area in the list opens this area for editing.The currently edited area is indicated by a red frame.

Users manual

Creating/Changing an imagemap

Creating an imagemap is quite easy:

  • select the “imagemap” module which can be found under “file”
  • select a directory where the imagemap should be created
  • select an image -either by upload or by chosing an image from the selected directory.
  • Give the imagemap a name. If the “imagemap name” field is left blank a name will be assigned automatically, when the imagemap is added.

In the overview some options to change an imagemap are also available:

  • The imagemap's name can be changed
  • A new image can be uploaded for an imagemap
  • The imagemap can be deleted

Adding linked areas to an imagemap

img-6 Adding a linked area is also quite easy:

  • Under “ADD LINK AREA” just chose the area type. 4 types of areas are available:

    • recgtangle
    • circle
    • polygon
    • default

    An area's type cannot be changed after it has been added!

  • Give your area a description. If this field is left blank, a description will be assigned automatically when the area is added.

  • Assign a link to your area. This field can be left blank when the area is added.

After a linked area is added, a lot more editing possibilites will be available for finetuning it:

  • It is possible to add more parameters to an area's link
  • The shape and the position of an area can be modified
  • Borders and behaviour of an area can be modified.

img-7 Customizing the borders of areas ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

It is sometimes desired to have borders around linked areas. MW Imagemap provides the possibility to modify four aspects of borders:

  • The frontend border color

  • The backend border color

  • The border thickness (in pixels)

    img-8

  • whether or not the border should be displayed on mouseover only or visible permanently.

Repositioning several areas at once

In the area list (at the bottom of the area edit interface) several areas can be moved to another position by selecting the checkbox of each area to be moved and then setting the values for x-ward and y-ward movement. After hitting the “move”-button the areas are repositioned.

img-5

Displaying a content box

Content boxes are boxes which can contain any TYPO3-content from a page and which are assigned to a specific area. Content boxes will be shown when the mouse moves over an area. A content box must be activated, otherwise it will not show up at the frontend.

img-9

Putting an imagemap on a page

img-10 You can insert an image map containing its own image by using the mwimagemap-plugin:There is also the possibility to apply an image map to the content types IMAGE and IMAGE WITH TEXT. You will find a pulldown with all your imagemaps at the bottom of the IMAGE work-area.

Please note: When using this possibility frontend borders will not be shown!Only the linked areas will be assignd to the image.

img-11 If this option does not show up it is most likely disabled in the extension's configuration (See the section “configuration for more details).

Configuration

Integrating MW Imagemap into DAM

DAM integration of MW Imagemap is quite easy if you follow these steps:

  • Install DAM

  • Then install MW Imagemap AFTER DAM. This installation sequence of both plugins is important because only then MW Imagemap recognizes the DAM environment and can integrate itself into DAM.If DAM ist installed after MW Imagemap it suffices to uninstall MW Imagemap and immediately reinstall it.

    img-12

  • Once both extensions are installed in the specified order the whole TYPO3 backend must be reloaded or you also can log out and immediately log in again to see MW Imagemap integrated into DAM:

Configuration options in the extension manager

A lot of configuration options are accessible in the extension's backend in the EM. The following configuration directives can be set:

  • Disable use with IMAGE: As the possibility of using imagemaps created by mwimagemap makes use of an XCLASS it might disable other plugins trying to use the same class the XCLASS of mwimagemap is using. To avoid this conflict you must disable the feature “use with IMAGE”.
  • Allow adding colors for edit-view: If you do not want a BE user to customize his own colors you should set this to 0.
  • Allow shared use of added colors: If set to “1” customized colors will be available to all imagemaps. This can be problematic when you delete a color as other imagemaps might be affected from that action.
  • Force type of overlay-images: Starting with release 1.1.0 transparent overlay images will be used to display borders at the frontend. By default PNGs are used as overlay images. If you like, you can set this value to “0” (“GIF”). Please note that polygons and circles might look ugly when GIF is used. To have more “antialiased” borders you should use PNG. This setting is overrridden by “automatic overlay”.
  • Automatic overlay: If this is set, overlay images will automatically change to gif if the calling browser is internet eplorer 6 because this browser does not handle transparent PNGs correctly. Overrrides “force type of overlay-images”.
  • Title attribute: a title containing the area's name will be automatically attributed to an area if no title is specified in the link parameters.
  • Clear page cache when changing data: If set to “1” the frontend page cache will be automatically cleared when an imagemap is changed.

In addition to these options up to 10 default border colors can be defined.The definition of a color has to follow this convention:

  • HEX-value of a color|lang 1:colorname,lang 2: colorname
  • For each color you have the possibility to assign as many language versions of its colorname as you like.
  • The first colorname is the default colorname which is used when no colorname was specified for a current BE language.
  • If no first colorname is available the HEX value will be the colorname.
  • Configured colors cannot be deleted by a backend user in the area view.

Typoscript-options

template

Property

template

Data type

Description

Alternative template path ( default EXT:pi1/template.html)

javascript

Property

javascript

Data type

Description

Alternative javascript path ( default EXT:res/js/mwimagemap.js)

contentbox_additionalcss

Property

contentbox_additionalcss

Data type

Description

Additional style settings for content boxes

Frontend Javascript

With version 1.2.14 all frontend mouseover effects are put into an external javascript so that it should be quite easy to change the behaviour of linked areas (and the content box) as you see fit.The following functions are necessary. If they lack, javascript errors will occur.

mwimagemap_showCBox(id_of_contentbox)

Function

mwimagemap_showCBox(id_of_contentbox)

Description

Displays the contentbox on area mouseover

mwimagemap_hideCBox(id_of_contentbox)

Function

mwimagemap_hideCBox(id_of_contentbox)

Description

hides the contentbox on area mouseout

mwimagemap_changearea(id_of_original_image,id_of_overlay_image)

Function

mwimagemap_changearea(id_of_original_image,id_of_overlay_image)

Description

Displays an overlay image on area mouseover

mwimagemap_resetarea(id_of_original_image,original_image)

Function

mwimagemap_resetarea(id_of_original_image,original_image)

Description

Displays the original image on area mouseout

mwimagemap_cboxover(id_of_contentbox)

Function

mwimagemap_cboxover(id_of_contentbox)

Description

Does something on contentbox mouseover

mwimagemap_cboxout(id_of_contentbox)

Function

mwimagemap_cboxout(id_of_contentbox)

Description

Does something on contentbox mouseout

Using the hook

This is for coders only:From version 1.2.8 of MW Imagemap a hook is available to apply your own changes to it's frontend-output before it is passed on to TYPO3.All you have to to is creating a frontend-plugin of your own and do the following steps:

  • This directive needs to be in your “ext_localconf.php”:$GLOBALS['TYPO 3_CONF_VARS']['EXTCONF']['mwimagemap']['hook'][] = 'EXT:your_plugin/class.your_plugin.php:tx_your_plugin'
  • Then of course you need a script “class.your_plugin.php” which contains the class “tx_your_plugin”
  • This class needs only one method:function additionalMarkerProcessor($obj) { }.This method is called automatically when registered via “ext_localconf.php” (the first step).The parameter “$obj” is the imagemap object which you can manipulate as you see fit.To get an overview of what can be manipulated just look into the sourcode of the class “EXT:/mwimagemap/pi1/class.tx_mwimagemap_pi1.php”.

Known problems

  • Note that when working with the content type IMAGE: If an imagemap is changed the image of the previous imagemap is not removed. It must be removed manually.
  • It occurs in some cases that the TYPO3-login does not function any more when mwimagemap is installed.This happens when the configuration variable $TYPO3_CONF_VARS['BE']['lockIP'] is set to a value smaller than 4. The variable MUST be set to 4! This is due to a bug in TYPO3 which prevents creating a BE_USER-object in “ext_tables.php” and a setting $TYPO3_CONF_VARS['BE']['lockIP'] < 4 at the same time.
  • Imagemagick 4.2.9 is not supported. So if you have problems with generated thumbnails in the backend or overlay images not correctly displayed, check your IM-version first!
  • Use as charset UTF8 in backend and frontend! We do not guarantee that the extension works correctly in non-UTF8-TYPO3 instances.
  • If you are using DAM and MW Imagemap (or DAM) seems to be gone: Please refer to the chapter “Integrating MW Imagemap into DAM” of this manual to get it up and running again!

To-Do list

Basically, any further development of this plugin is discontinued.But: if someone is willing to pay for an update or a bugfix I will do it anyway.

MW Imagemap at TYPO3 Forge

ChangeLog

1.0.0

Version

1.0.0

Changes

Initial version (beta)

1.01 – 1.0.20

Version

1.01 – 1.0.20

Changes

Initial optimizations on the way from “beta to “stable”

1.1.0 – 1.2.5

Version

1.1.0 – 1.2.5

Changes

Changing to the overlay technique, new user interface, lots of additional features and bugixes

1.2.6 – 1.2.8

Version

1.2.6 – 1.2.8

Changes

  • Code cleanups
  • Implementation of a hook in the frontend-plugin
  • Implementation of some typoscript-settings
  • Implementation of the content-box (sponsored by “Punkt.de”)
  • new and annotated template
  • removal of deprecated PHP-function calls
  • manual update
  • As a result of the many changes the extension is now “beta” again.

1.2.9

Version

1.2.9

Changes

Fixed some frontend javascript problems, some problems with the generation of overlay images, manual update

1.2.10

Version

1.2.10

Changes

Manual update, DAM-integration – please refer to the chapter “Integrating MW Imagemap in DAM” of this manual for more information!

1.2.11

Version

1.2.11

Changes

  • Code cleanups
  • Compatibility with TYPO3 6.x
  • Fixed bug with finding directories on Apple computers
  • Frontend: Empty targets in links are no longer displayed (for a better W3C-compatibility)

1.2.12

Version

1.2.12

Changes

DAM integration improved

1.2.13

Version

1.2.13

Changes

Replaced a call to the deprecated PHP-function “split” by “explode”.PLEASE NOTE: 1.2.13 will be the last release of MW Imagemap as I will focus on a completely new kind of plugin which also covers image maps. But: If someone is willing to pay for bugfixes or updates I will do it anyway.

1.2.14

Version

1.2.14

Changes

  • Added dependancy information
  • Frontend: Javascript is placed in an external file. The path of this file can be configured via typoscript. Thanks to “webundwerbe werk”for sponsoring this update.

1.2.15

Version

1.2.15

Changes

Fixed false positioning of areas in Internet Explorer 9 and 10, some minor code and manual updates. This update was sponsored by “in2code”.Thanks for that!

1.2.16

Version

1.2.16

Changes

Code updates for better compliance with the TYPO3 coding guidelines.

Sponsors

  • First to mention is ` Metaways Infosystems GmbH <http://www.metaways.de/>`_ (Hamburg, Germany) for initially supporting the development of this extension.
  • My special gratitude also goes to the company ` Punkt.de <http://www.punkt.de/>`_ for a donation of 100€ and the sponsored development of the bugfixes and features of version 1.2.8, such as the content-box.
  • All bugfixes in version 1.2.9 were sponsored by ` Spirit Media <http://www.spiritmedia.at/>`_ – thanks for that!
  • DAM integration (version 1.2.10) was sponsored by the danish company `dkm <http://www.dkm.dk/>`_ .
  • External Javascript for mouseover-effects (version 1.2.14) was sponsored by `webundwerbe werk <http://www.webundwerbe.de/>`_ (Germany)
  • Javascript fixes (false positioning of areas in Internet Explorer 9 and 10) were sponsored by ` in2code <http://www.in2code.de/>`_ (Germany)