Linux 软件免费装
Banner图

Gwyn's Imagemap Selector

开发者 GwynethLlewelyn
更新时间 2016年3月31日 17:25
捐献地址: 去捐款
PHP版本: 3.0 及以上
WordPress版本: 4.5

标签

imagemap

下载

0.0.1 0.0.2 0.0.3 0.0.4 0.0.5 0.0.6 0.1.0 0.2.0 0.2.1 0.2.2 0.2.3 0.3.1 0.3.2 0.3.3

详情介绍:

Gwyn's Imagemap Selector uses shortcodes to define imagemaps, assign an image to it, and automatically make queries on the WordPress database to extract the appropriate links. Includes some fixes by Tom Rusko. Thanks, Tom!

安装:

  1. Download plugin from http://wordpress.org/extend/plugins/gwyns-imagemap-selector/
  2. Go to Plugins > Add New
  3. Select the Upload tab
  4. Upload gwyns-imagemap-selector.zip
Or install it simply from within your WordPress admin panel. Then go to any page, post, or text widget and use the following syntax: [imagemap category="Uncategorized" img="/your/link/to/your/image"] [area]1,2,3,4[/area] [area]5,6,7,8[/area] [/imagemap] See complete syntax on the Other Notes > Usage page. This plugin is also translated into Portuguese. More translators are welcome :)

屏幕截图:

  • Current options panel (under WP 3.2 Beta 2) showing popup CSS code
  • Web-based imagemap creator (with generated WP shortcodes for imagemap)
  • Uploading media files to the imagemap creator

升级注意事项:

Adds Javascript imagemap creator (http://code.google.com/p/imgmap/) and integrates imgmap creator with the WordPress Media Library popup. Fix tiny bug when adding an invisible div for popups (start with display: none) Fixed bug with multiple imagemaps on the same post

常见问题:

I only get the first 10 posts retrieved, but I have more than 10 areas in my imagemap

Just add nopaging=true to your [imagemap] tag. By default, WordPress will respect the post limit set on Reading Settings > Blog pages show at most (which is 10 by default).

Queries fail when using multiple parameters with &

This is because WordPress will pretty much encode all characters safely before saving an article. An attempt has been made to deal with the encoded ampersands, but it will only work with PHP 5.1.0 or greater (if you're using an earlier version of PHP, you should be upgrading it anyway!).

I want to have a series of blog articles displayed in a very specific, strict order inside the imagemap. How do I manage that?

  1. Make sure that all their dates are correctly set in sequence, since the default order is by date (you can then specify ascending or descending, whatever is appropriate).
  2. If you wish to keep the date but change the order, you have another option. You can add a Custom Field, say, Position (to add custom fields to any post under WP 3.1+, you need to click on the Screen Options dropdown and check that option). Then fill up this field with the order you wish (1 for the first post, 2 for the second, and so forth. It's fine to skip numbers and/or have the same number twice, WP will still return the correct order).
Then use the following syntax on the [imagemap] tag: [imagemap query="cat=4&meta_key=Position&orderby=meta_value_num&nopaging=true&order=ASC"] The number for the category is of course the one used to classify your articles (you can add multiple categories there, too, separated by a comma).

I don't want the image to show its id name while hovering outside of any area

This yellow popup is browser-dependent (but pretty much every browser today has implemented it). To fix it, since 0.3.2, you can leave the alt and/or title tags empty on the [imagemap] shortcode. Technically, leaving alt off is an HTML violation.

How do I edit a generated imagemap again?

Sorry, that's beyond my ability to do. The original source code for the imagemap creator has been done by Adam Maschek, not by me, and I have no idea how to change it to do just that. What I do is to simply copy & paste the existing coordinates on the top part (instead of re-selecting everything). This is a pain if you have many entries, but far better than doing everything from scratch again!

How to change the popup (restyling it to another colour, font, etc.) when a user hover over an area defined by the imagemap (not the Ajax hover function, the small yellow box)?

It's not possible. The small hovering popup is not created by the plugin at all: it's browser-dependent. Remember, imagemaps are ancient HTML features, they predate Javascript and even CSS by many years. What all modern browsers do is to read the alt/title tags and generate this "fake" popup (which is built-in into the browser), but there is no control about how it's styled. If you really want to change that popup, you will need to use a Javascript/Flash/Java-based plugin instead. There are a few available. This plugin avoids Javascript/Flash/Java on the frontend — deliberately so, for those few browsers which have Javascript/Flash/Java turned off. HTML imagemaps will always work, since they are pure HTML. But, yes, they have their limitations! Of course, the Ajax hover box can be fully styled from the Settings tab.

更新日志:

0.0.1 0.0.2 0.0.3 0.0.4 0.0.5 0.0.6 0.1.0 0.2.0 0.2.1 0.2.2 0.2.3 0.3.0 0.3.1 0.3.2 0.3.3