Project

General

Profile

Actions

Feature #15556

closed

Add a "usemap" attribute to images

Added by J©rémy Lecour almost 19 years ago. Updated about 10 years ago.

Status:
Rejected
Priority:
Won't have this time
Assignee:
-
Category:
Content Rendering
Target version:
-
Start date:
2006-02-02
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

To get to this result we have to patch the "cms" and the "css_styled_content" extensions.
I'va made a diff text to summarize all the changes make to files (it is here and in a attached file).

-----------------------------------------------------------------------------------------------------------------------------
--- cms/tslib/class.tslib_content.save.php Thu Feb 2 11:18:26 2006
++ cms/tslib/class.tslib_content.php Thu Feb 2 12:02:03 2006
@ -941,11 +941,16 @
$imgConf['longdescURL'] = $conf['longdescURL'];
$imgConf['longdescURL.'] = $conf['longdescURL.'];
}
if (!strlen($imgConf['useMap']) && !is_array($imgConf['useMap.'])) {
+ $imgConf['useMap'] = $conf['useMap'];
+ $imgConf['useMap.'] = $conf['useMap.'];
+ }
} else {
$imgConf = array(
'altText' => $conf['altText'],
'titleText' => $conf['titleText'],
'longdescURL' => $conf['longdescURL'],
+ 'useMap' => $conf['useMap'],
'file' => $totalImagePath
);
}
@ -2780,6 +2785,7 @
$altText = trim($this->stdWrap($conf['altText'], $conf['altText.']));
$titleText = trim($this->stdWrap($conf['titleText'],$conf['titleText.']));
$longDesc = trim($this->stdWrap($conf['longdescURL'],$conf['longdescURL.']));
+ $useMap = trim($this->stdWrap($conf['useMap'],$conf['useMap.']));

// "alt":
$altParam = ' alt="'.htmlspecialchars(strip_tags($altText)).'"';
@ -2800,6 +2806,10 @
if ($longDesc) {
$altParam.= ' longdesc="'.htmlspecialchars(strip_tags($longDesc)).'"';
}
+ // "useMap" attribute
+ if ($longDesc) {
+ $altParam.= ' usemap="#'.htmlspecialchars(str_replace("#","",strip_tags($useMap))).'"';
+ }
return $altParam;
}
--- cms/locallang_ttc.save.xml Thu Feb 2 11:28:34 2006
++ cms/locallang_ttc.xml Thu Feb 2 11:28:40 2006
@ -137,6 +137,7 @
<label index="image_altText">Alternative Text:</label>
<label index="image_titleText">Title Text:</label>
<label index="image_longdescURL">Long Description URL:</label>
<label index="image_useMap">use Image Map:</label>
<label index="cols">Table Columns:</label>
<label index="cols.I.0">Auto</label>
<label index="recursive.I.1">1 level</label>
--- cms/ext_tables.save.sql Thu Feb 2 11:31:52 2006
++ cms/ext_tables.sql Thu Feb 2 11:32:08 2006
@ -337,6 +337,7 @
altText text NOT NULL,
titleText text NOT NULL,
longdescURL text NOT NULL,
useMap text NOT NULL,
header_layout varchar(30) DEFAULT '0' NOT NULL,
text_align varchar(6) DEFAULT '' NOT NULL,
text_face tinyint(3) unsigned DEFAULT '0' NOT NULL,
--- cms/tbl_tt_content.save.php Thu Feb 2 11:36:28 2006
++ cms/tbl_tt_content.php Thu Feb 2 12:08:05 2006
@ -629,6 +629,17 @
'rows' => '3'
)
),
'useMap' => Array (
+ 'exclude' => 1,
+ 'label' => 'LLL:EXT:cms/locallang_ttc.php:image_useMap',
+ 'config' => Array (
+ 'type' => 'input',
+ 'size' => '30',
+ 'max' => '256',
+ 'checkbox' => '',
+ 'eval' => 'trim',
+ )
+ ),
'cols' => Array (
'label' => 'LLL:EXT:cms/locallang_ttc.php:cols',
'config' => Array (
@ -965,13 +976,13 @
--palette--;LLL:EXT:cms/locallang_ttc.php:ALT.imgLinks;7,
--palette--;LLL:EXT:cms/locallang_ttc.php:ALT.imgOptions;11,
imagecaption;;5,
- altText;;;;1-1-1,titleText,longdescURL'),
+ altText;;;;1-1-1,titleText,longdescURL,useMap'),
'rte' => Array('showitem' => 'CType;;4;button;1-1-1, header;;3;;2-2-2, bodytext;;;nowrap:richtext[*]:rte_transform[mode=ts_images-ts_reglinks];3-3-3'),
'image' => Array('showitem' => 'CType;;4;button;1-1-1, header;;3;;2-2-2, image;;;;4-4-4, imageorient;;2, imagewidth;;13,
--palette--;LLL:EXT:cms/locallang_ttc.php:ALT.imgLinks;7,
--palette--;LLL:EXT:cms/locallang_ttc.php:ALT.imgOptions;11,
imagecaption;;5,
- altText;;;;1-1-1,titleText,longdescURL'),
+ altText;;;;1-1-1,titleText,longdescURL,useMap'),
'bullets' => Array('showitem' => 'CType;;4;button;1-1-1, header;;3;;2-2-2, layout;;;;3-3-3, bodytext;;9;nowrap, text_properties'),
'table' => Array('showitem' => 'CType;;4;button;1-1-1, header;;3;;2-2-2, layout;;10;button;3-3-3, cols, bodytext;;9;nowrap:wizards[table], text_properties'),
'splash' => Array('showitem' => 'CType;;4;button;1-1-1, header;LLL:EXT:lang/locallang_general.php:LGL.name;;;2-2-2, splash_layout, bodytext;;;;3-3-3, image;;6'),
--- css_styled_content/static/setup.save.txt Thu Feb 2 11:57:00 2006
+++ css_styled_content/static/setup.txt Thu Feb 2 11:56:22 2006
@ -387,6 +387,9 @
longdescURL < .altText
longdescURL.field = longdescURL

+ useMap < .altText
+ useMap.field = useMap
+
emptyTitleHandling = {$styles.content.imgtext.emptyTitleHandling}
titleInLink = {$styles.content.imgtext.titleInLink}
titleInLinkAndImg = {$styles.content.imgtext.titleInLinkAndImg}
-----------------------------------------------------------------------------------------------------------------------------

When this patch is applied, we have to get to Extension Manager with shy extensions shown and activate the "cms" extension to add the new corresponding row in the table.

(issue imported from #M2468)


Files

patch_usemap_1.txt (4.41 KB) patch_usemap_1.txt Administrator Admin, 2006-02-02 12:25
Actions #1

Updated by J©rémy Lecour over 18 years ago

Maybe it could be associated to the newly created Content Rendering category and changing the version to 4.0 since it has not been include in the final version.

With changes made in the final 4.0 version, I don't know if the patch is still valid, but I manually reported changes in the new files and it is still working as expected, I'm using these features on many live sites.

Actions #2

Updated by J©rémy Lecour over 18 years ago

It is still not added in the 4.0.1 branch, too bad

Actions #3

Updated by Andreas Wolf about 13 years ago

  • Category changed from Communication to Content Rendering
  • Target version deleted (0)
  • PHP Version deleted (4)
Actions #4

Updated by Andreas Wolf about 13 years ago

  • Tracker changed from Bug to Feature
  • Subject changed from Add a "usemap" attribute to images, like already available "longdesc", "alt", … to Add a "usemap" attribute to images

This is more a feature than a bug...

Actions #5

Updated by Felix Kopp about 10 years ago

  • Status changed from New to Rejected
  • Priority changed from Should have to Won't have this time

Thank you for the issue. Usemap feature by today should be done by en external extension - it is still not planned as a Core feature.
We have several extension in TER that deliver good UseMap / Imagemap features already.

Please understand that this feature will not be handled by the TYPO3 core any time soon - but can be done with extensions already.

Actions

Also available in: Atom PDF