Forums / Developer / Online Editor

Online Editor

Author Message

K259

Wednesday 21 April 2004 4:03:22 am

Is it possible to use the "insert link"-icon in the eZ publish editor to put a link on an image?

Tony Wood

Wednesday 21 April 2004 8:19:36 am

Hi,

Yes, the online editor allows you to do this in a WYSIWYG manner. Just add an image to you XML text field. Then right click and add then click link.
Manually:

<object id="99" size="original" align="left" href="http://www.example.com" target="_self" />

tony
--
http://www.visionwt.com

Tony Wood : twitter.com/tonywood
Vision with Technology
Experts in eZ Publish consulting & development

Power to the Editor!

Free eZ Training : http://www.VisionWT.com/training
eZ Future Podcast : http://www.VisionWT.com/eZ-Future

K259

Wednesday 21 April 2004 8:28:45 am

Hmm..doesn't work here.
Is this code in the embed_class_5.tpl?

Is it possible to let me take a look at your embed file for this functionality, just to compare?

Tony Wood

Wednesday 21 April 2004 9:20:22 am

This code should be entered into the XML text field. So you will need to add your image to related object list first and take that object number.

If this does not work then there is a problem with your site setup which is another issue.

Tony Wood : twitter.com/tonywood
Vision with Technology
Experts in eZ Publish consulting & development

Power to the Editor!

Free eZ Training : http://www.VisionWT.com/training
eZ Future Podcast : http://www.VisionWT.com/eZ-Future

K259

Wednesday 21 April 2004 4:41:59 pm

Hi Tony!

We have always put pictures in the xml-fields by using the add related objects, and then use insert object in the editor. BUT, put a link on an image have never worked for us :/
I've tried it a hundred times, but with no luck. All our upgrades are made by the ez team, and also the OE upgrades.

I then thought that this was not supported in the ez-editor, so I created an attribute on the Image-class called Link. And here could every user add a link to an image, and when adding an image in the editor through related objects and then insert, the image was then clickable. Pretty silly done actually.

I have now removed this code I added from embed_class_5.tpl, but adding links to images still don't work.

When I add a link(insert link) to a related image in the editor, the code which is stored is correct, but the images will not be clickable.

Maybe someone from the ez team can answer this question, since they set up this system..we're soon going to have a course in howto add links to images etc., so this thing has to be operative.

The code from the xml-field which I tested to put a link on an image is like this:

<object id="23791" size="medium" align="center" href="http://www.ez.no/" target="_self" />

...but it's not working :(

K259

Thursday 22 April 2004 12:25:35 am

What can actually be the problem with our site setup then?
Hmm.. maybe it's the Link-function which is not working properly?

Tony Wood

Thursday 22 April 2004 9:08:35 am

hmmm,

A problem in deed. It is more than likely a site issue. The only time I have seem problems like this is where files like "embed_class_5.tpl" are not updated when you patch a sight. So if you copy the "embed_class_5.tpl" from "standard" directory into your user directory [the directory where your bespoke templates are]. This might fix the problem. Give it a whirl anyway; but make sure you backup your files first ;-)

We have had this type of problem with search templates, we had modifed them and when the main kernel was patch the new features were not available until we added the new search code.

I hope this fixes your problem

tony
--
http://www.visionwt.com

Tony Wood : twitter.com/tonywood
Vision with Technology
Experts in eZ Publish consulting & development

Power to the Editor!

Free eZ Training : http://www.VisionWT.com/training
eZ Future Podcast : http://www.VisionWT.com/eZ-Future

K259

Friday 23 April 2004 5:41:49 am

Tnx Tony :) That was the solution ;)

I wonder why (after 3-4 eZ publish upgrades), from 3.0->3.3 we still have the same old image-template. Maybe some more templates also are old..hmm..have to check it out.

Btw. there should in this tpl be a check if the image-description on the image class is empty or not. If it's empty, there will be a little white space after the image, after the picture or under. The image-description "tag" should not be "listed" if the description field is empty.

eZ debug

Timing: Jan 18 2025 23:03:55
Script start
Timing: Jan 18 2025 23:03:55
Module start 'content'
Timing: Jan 18 2025 23:03:55
Module end 'content'
Timing: Jan 18 2025 23:03:56
Script end

Main resources:

Total runtime0.9647 sec
Peak memory usage4,096.0000 KB
Database Queries209

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0064 587.5391180.8516
Module start 'content' 0.00640.8251 768.3906605.3359
Module end 'content' 0.83150.1332 1,373.7266341.0859
Script end 0.9646  1,714.8125 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00410.4217210.0002
Check MTime0.00160.1645210.0001
Mysql Total
Database connection0.00060.066710.0006
Mysqli_queries0.880591.27492090.0042
Looping result0.00220.22722070.0000
Template Total0.934096.820.4670
Template load0.00210.217420.0010
Template processing0.931896.593820.4659
Template load and register function0.00020.020710.0002
states
state_id_array0.00080.084710.0008
state_identifier_array0.00160.166920.0008
Override
Cache load0.00180.1888480.0000
Sytem overhead
Fetch class attribute can translate value0.00160.161330.0005
Fetch class attribute name0.00210.221390.0002
XML
Image XML parsing0.00090.096430.0003
class_abstraction
Instantiating content class attribute0.00000.0032110.0000
General
dbfile0.00490.5096270.0002
String conversion0.00000.000530.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
8content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
13content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
6content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 34
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs