Project

General

Profile

Actions

Feature #14605

closed

Click-enlarge for Images

Added by Robert Markula about 19 years ago. Updated almost 16 years ago.

Status:
Closed
Priority:
Should have
Category:
RTE (rtehtmlarea + ckeditor)
Target version:
-
Start date:
2005-03-12
Due date:
% Done:

0%

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

Description

Adding a "click-enlarge" option for inserted images (perhaps accessible via the 'Image Properties...' context menu of an image).

Like seen in the 'Text with image' element.
(issue imported from #M880)


Files

rtehtmlarea_feature_0880_v5.patch (4.21 KB) rtehtmlarea_feature_0880_v5.patch Administrator Admin, 2008-01-31 22:33

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #17412: parseFunc tags.XXX for single tags doesn't workClosed2007-06-22

Actions
Actions #1

Updated by Martin Kutschker about 18 years ago

Perhaps possible with a new TYPOIMG tag in the DB (instead of saving the plain HTML img tag).

Actions #2

Updated by Florian Stolz almost 18 years ago

i searched for that feature too, would be really useful (for me)

Actions #3

Updated by Martin Kutschker almost 18 years ago

Maybe a TYPOIMG tag is not so good as it is not so easy to edit. Perhaps it's possible to use a custom attribute "clickenlarge" or general attribute "typo3" (or ("t3props") for it.

Actions #4

Updated by Stanislas Rolland almost 18 years ago

What about a custom tag, say <clickenlarge>, that would wrap the <img> tag. The wrapping/unwrapping could be done with the image properties window.

Actions #5

Updated by Martin Kutschker almost 18 years ago

I don't know the internals of htmlarea and I'm not a parsefunc guru.

From a user perspective the feature should be available (as you suggested) from the image properties dialog. The user should not see a any tags in plaintext around the image!

From the admin perspective it should be as transparent as possible. It should not be necessary to fiddle TYPOIMG or CLICKENLARGE into all possoble occurences of "allowedtags" etc.

But I'm surprised that wrapping the img with a custom tag is easier than adding custom attributes.

Actions #6

Updated by Stanislas Rolland almost 18 years ago

The feature will be implemented with a custom tag <clickenlarge>. When the feature is enabled, each image tag will be wrapped in a clickenlarge tag. The clickenlarge tag will have two attributes: "src" will hold the reference to the original image file, "value" will be used to enable/disable click-enlarge on the wrapped image. It will thus be possible to set/unset the clickenlarge property of an image. The clickenlarge tag will not be visible in wysiwyg mode, except in the status bar at the bottom of the editing area. An extension configuration variable (checkbox) will allow to enable the feature. The feature will re-use the existing imageLinkWrap TS configuration attached to the tt_content.image object.

Actions #7

Updated by Stanislas Rolland almost 18 years ago

Well, the custom tag approach worked fine in Firefox, but got killed in IE6.

Fallback: will use two attributes on the img tag, one to set/unset click-enlarge, the other to keep the location of the original image. But this requires a small patch in tslib_content's parsefunc which does not currently handle solo tags.

Actions #8

Updated by Nickolas Shadrin over 16 years ago

a small patch in tslib_content's parsefunc

Is there any development on the issue?
What patch are you talking about?

Actions #9

Updated by Sven Mittelbach over 16 years ago

I'm also very interested in a working patch. Is there still any development? I tried to wrap the Image with custom tags, which isn't complicated, but nothing happens. Without the small patch from the related bug, the whole image is removed. how does the clickenlarge thing work? should it add some parameters, does it substitute the tags (e.g. <clickenlarge>|</clickenlarge>)? is there a working patch for T3 4.1.3?

Actions #10

Updated by Stanislas Rolland over 16 years ago

Once the attached patch is installed on the latest trunk revision, here is how to test it:
1. there will be a new check box in the Extension Manager configuration page of htmlArea RTE: check the box;
2. also with EM, make sure images are enabled in the RTE!
3. on a TS template that applies to the page on which you are going to test, in section "Include static (from extensions):", add static template "Clickenlarge Rendering (rtehtmlarea)";
4. on a RTE-enabled content element, insert an image, then edit the properties of the image; there should be a new check box "Click to enlarge": check it, click update, and save;
5. hopefully, you should be able to click on the image in the frontend.

Let me know if you observe any bad side effect...

Actions #11

Updated by Nickolas Shadrin over 16 years ago

works perfectly.

Thanks!

Actions #12

Updated by Stanislas Rolland over 16 years ago

Attaching a better version of the patch.

Actions #13

Updated by Markus over 16 years ago

does this only affect new images, or also existing ones?
do I only have to patch the two files in my TYPO3 4.1.5 with RTE 1.5.5 or do I need the whole set from the SVN?

Actions #14

Updated by Markus over 16 years ago

after patching the system described above the FE didn't work any longer and in the BE on mac OSX with FF 2.0.0.11 the RTE was not loading.

Actions #15

Updated by Stanislas Rolland over 16 years ago

I don't think the patch can have such effects neither on the FE, nor on the RTE. Perhaps the patch was incorrectly applied. The patch is generated against SVN trunk but, if applied with caution, would probably work also with 4.1.5. Regarding the RTE, it simply enables code that was already there.

The patch does not affect existing images. It will add a new attribute on images so as to keep track of their original source. Therefore it will work on images inserted while the feature is active. It adds a checkbox on the image properties popup window. If the checkbox is checked when the properties of an image are edited, the image may be clicked and enlarged in the FE.

Actions #16

Updated by Markus over 16 years ago

Patching TYPO3 4.1.5 with this patch causes errors in the FE.
The patched file "class.tslib_content.php" doesn't work on 4.1.5.
Due I'm hosting my project at an external provider without own server I can't install the trunk version.

Actions #17

Updated by Stanislas Rolland about 16 years ago

Would anyone test this patch on the latest revision of trunk, please?

Actions #18

Updated by Stanislas Rolland about 16 years ago

Committed to SVN TYPO3core trunk revision 3006 (for inclusion in TYPO3 4.2 beta 1).

Actions

Also available in: Atom PDF