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: TARGET-E ZIP Map¶
Author: | Kasper Skårhøj |
---|---|
Created: | 2002-11-01T00:32:00 |
Changed: | 2006-05-10T10:44:52 |
Author: | Thomas Biller |
Email: | thomas.biller@target-e.de |
Info 3: | |
Info 4: |
EXT: TARGET-E ZIP Map¶
Extension Key: zipmap
Copyright 2000-2002, Thomas Biller, <thomas.biller@target-e.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.com
Table of Contents¶
EXT: TARGET-E ZIP Map 1
Introduction 2
What does it do? 2
Screenshots 2
Users manual 3
Adminstration 3
Configuration 4
Example 4
Reference 4
Tutorial 6
Error handling 9
Known problems 9
To-Do list 9
Changelog 10
Introduction¶
What does it do?¶
Includes a flash map which displays any of your information from database placed by zip code on the correct position of the map.
Screenshots¶
Users manual¶
- Install the extension. Note that it has a dependency, the Extension TARGET-E Flash Remoting (extension key flash_remoting ), which must be installed before, but not be used.
- Go to the location where you want to place the map (the size will be 400px x 600px) and insert the plug-in named ZIP Map .
- Configure all settings. Note that there is a wizard at the right side of each input fields. Simply click on the question marks for help.
- Save and view the result in the front end. Note: At the first view, the plug-in will insert all required data into the database. This can take a while. You can avoid this if you insert all data manually. To do so, copy the content of ext_data.sql located in the root of the extension folder ( typo3conf/ext/zipmap/ if you installed it locally, typo3/ext/zipmap/ if installed globally). In phpMyAdmin (in the main menu of the back end under Tools ) click on SQL , insert the data into the text area and press OK .
Adminstration¶
See the sections Users manual and Configuration for all details.
Configuration¶
Note that you can find also have a look at the configuration themes directly located in the plug-in. Simply click on the question marks for help.
Example¶
Reference¶
database table of records to display¶
Property
database table of records to display
Description
Enter the name of the table in your database where you want to get your information to display from.Table joins are possible for experts, this field represents the FROM of the SQL query.If you want to display address data created as record type Address , enter tt_address here.For data of frontend users with record type Website user insert here fe_users as table name.
field name of zip code¶
Property
field name of zip code
Description
Enter the field name of the database table which contains the zip codes required for positioning the markers on the map.Those zip codes are compared with the internal database of this extension. Wrong or missing zip codes can not be displayed.If you are using records of type Address or Website user , enter zip here.
field names with the information to display¶
Property
field names with the information to display
Description
Enter the field names of the database table which contain the information you want to display in the pop-up.If there are more than one, separate them by comma, e.g. name, email, www For records created as record type Address , the fields have following names:
- Name: name
- Title: title
- Email: email
- Phone: phone
- Mobile: mobile
- www: www
- Address: address
- Company: company
- City: city
- Zipcode: zip
- Country: country
- Fax: fax
- Description: description
If you want to display for example name, e-mail and the description, enter name, email, description into the field.The table fields for frontend users of type Website user have following identifiers:
- Username: username
- Name: name
- Title: title
- Company: company
- Address: address
- Zipcode: zip
- City: city
- Country: country
- Phone: telephone
- Fax: fax
- Email: email
- www: www
where / order by clause¶
Property
where / order by clause
Description
If you use your own database table and all records should be displayed, you can leave this field empty.In all other cases, especially for records of type Address or Website user , you have to enter the SQL syntax here, otherwise all records will be displayed, the deleted and hidden ones as well as those placed on other pages.If you are working with TYPO3 records, do the following:Use your mouse and roll over the icon of the page in the page tree where you have created your records. This can be the page where this extension in included or for example a certain sys-folder. After two seconds the page number is displayed.If the page number is for example 40 , enter WHERE pid=40 into the field.It is advisable not to display records which are hidden or deleted. To achieve this, extend the WHERE clause. In our example with ID 40 you get WHERE pid=40 AND hidden=0 AND deleted=0 as result.
text to display as information¶
Property
text to display as information
Description
This is the text which is displayed when you roll with your mouse over the position markers on the map.It is possible to use line breaks by doing so in the text field.For a bold font, use the HTML tag <b> to begin and </b> to stop.To italicize, use the start tag <i> and the end tag </i> .Database fields which you listed separated by comma in the previous field with the information to display can be inserted by using markers like ###field name### in the text. If you do not do this, that field information will not be displayed.For example, if you want to display Name: name from database City: city from database Germany, enter<b>Name:</b>###name###<b>City:</b>###city###Germanyinto the field, whereas name and city are the table fields you entered separated by comma into the previous field with the information to display.Websites and e-mail addresses in the information from database will be detected automatically and converted to links.Links to websites will be set, if words in the content of fields start with http:// or www. . E-mail addresses will be altered to links if there is an @ sign in the words followed by . (dot).
enable zoom¶
Property
enable zoom
Description
If you set this function you can zoom into the single counties by click on them.
colors¶
Property
colors
Description
Enter a hex value for the color to be displayed, i.e. #FFFFFF.You can use the color selector on the right side of the input field.HTML color names are not supported, use hex values instead.Make sure to set sufficient contrast especially for those objects which overlay, i.e. the background for countries and the background for location flags, so that the single elements stay visible and do not merge.
Tutorial¶
- Install the extensions Address list (extension key tt_address ), TARGET-E Flash Remoting (extension key flash_remoting ) and TARGET-E ZIP Map (extension key zipmap ) locally.
- Copy the file in the root of the extension folder typo3conf/ext/zipmap/ to your desktop.
- Click on phpMyAdmin in the menu of the back end located under Tools . You will find an input field for data import in the section SQL . Choose the file ext_data.sql located on your desktop and press OK . This will take a while. Do not close your browser window until the next page is loaded and tells you that all data was successfully imported.If you do not have access to phpMyAdmin, all data will be imported automatically at the first time you view the plug-in in the front-end. Wait until the page is loaded and do not close your browser window.
- Go to the menu of the back end and click on List located under Web . Choose the page where you want to include the map in the page tree.
- In the page tree, roll with the mouse over the icon located in front of the name of the page you selected. After two seconds a tool- tip with the ID of the page is displayed. Write down that number, you will need it later on.
- Now press Create new record at the right side of the window.
- Choose Address as record type.
- Now you have to enter four records of type Address with the following values:
Julia Schulze¶
Thomas Biller¶
Michael Fritz¶
Goran Stefanovic¶
Enter those values in the appropriate fields:
The result should be four records on the page:
- Now select Page located under Web in the menu of the back end. Stay in the page tree on the page you are and where you have included all records.
- Click on New content at the top of the right side of the page.
- Select ZIP Map listed under Plugins and choose the location where you want to position it.
- Configure the plug-in with following settings. Note to enter the correct ID you wrote down in the where / order by clause .
database table of records to display¶
Property
database table of records to display
Value
tt_address
field name of zip code¶
Property
field name of zip code
Value
zip
field names with the information to display¶
Property
field names with the information to display
Value
zip,name,email,phone
where / order by clause¶
Property
where / order by clause
Value
WHERE pid= enter here the ID of the page you wrote down AND hidden=0 AND deleted=0
text to display as information¶
Property
text to display as information
Value
<b>###name###</b>
###zip###
###email###
###phone###
enable zoom¶
Property
enable zoom
Value
set this check box
color of background¶
Property
color of background
Value
FFF5E9
color of world¶
Property
color of world
Value
FFDEB7
color of background for countries¶
Property
color of background for countries
Value
FFB165
color of outline for countries¶
Property
color of outline for countries
Value
B6620F
color of background for information pop-up¶
Property
color of background for information pop-up
Value
FFFFFF
color of outline for information pop-up¶
Property
color of outline for information pop-up
Value
000000
color of font for information pop-up¶
Property
color of font for information pop-up
Value
000000
color of background for location flags¶
Property
color of background for location flags
Value
6DBF5C
color of outline for location flags¶
Property
color of outline for location flags
Value
000000
Do not forget to enter the correct ID you wrote down in the where / order by clause .
- Now save and view the result in the front end.
Error handling¶
- To test the configuration of the plug-in with all data passed to the Flash file by Flash Remoting, I included the file pi1/index.php . Access this file directly with your browser and add the parameter id with the content ID of the plug-in (i.e. ?id=72 ). To get the content ID of the plug-in, change to list view ( Web > List in the menu of the back end), go to the page where you placed the extension and roll with the mouse over the icon in front of the plug-in. After two seconds the content ID will be displayed. You can see all passed data of the configuration there. If the value stdClass Object [error] is set, one of the data fields database table of records to display , field name of zip code , field names with the information to display or where / order by clause has a wrong configuration. The value of stdClass Object [error] has the database error for more details.
- For all parameters passed to the Flash file, which are used by Flash Remoting, uncomment the section do debugging output located in pi1/class.tx_zipmap_pi1.php
Known problems¶
There are no known problems at the moment. If you find any bugs, please report them.
To-Do list¶
- Insert more countries
- Set extra options for the use of Website user or Address placed on same page as the extension so that no complex configuration has to be done
Changelog¶
- 2006-04-11: First release- 2006-05-05: Changes in LoadPosData.php for proper work with PHP 5.0.4 (thanks to Christian Pippert)- 2006-05-10: Changed $_SERVER to correct t3lib_div::getIndpEnv and included XCLASS in LoadPosData.php
EXT: TARGET-E ZIP Map - 10