Elxis CMS Forum

Extensions => Bots and plugins => Topic started by: balisto on September 16, 2008, 02:41:24

Title: How to use image maps with TinyMCE editor?
Post by: balisto on September 16, 2008, 02:41:24

Hi,

I'm actually trying something very easy. I try to use an image together with an image map:

Quote
   
<p><img usemap="#belgium" src="http://www.myserver.com/elxis/images/maps/belgium.png" alt="belgium" title="belgium" width="500" height="269" /></p>

<map name="belgium">
<area shape="poly" alt="Wallonie" coords="57,93, 62,96, 71,91, 79,95, 95,93, 104,99, 108,103, 120,102, 132,103, 136,104" href="test1.html" target="_top" />
<area shape="poly" alt="Vlaanderen" coords="188,5, 186,9, 182,11, 185,14, 202,12, 208,8, 210,21, 214,29, 219,31" href="test2.html" target="_top" />
</map>

I can try whatever I want, TinyMCE doesn't save it. Image only is no problem, but the image-map is not saved.

Also if I try to use something like the following it doesn't work:

Quote
<object data="map.gif" type="image/gif" usemap="#map1" width=200 height=200>
<map name=map1>
<a href="1.html" title="Title 1" shape=rect coords="0,0,100,100">Link 1</a>
</map>
</object>


Is there any reason for that? Does TinyMCE actually check the HTML-Code that I enter?

Cheers,
Chris
Title: Re: How to use image maps with TinyMCE editor?
Post by: yiannisK on September 16, 2008, 11:46:04
Hi!

Go to the Bots>Site Bots and,

Activate No WYSIWYG
Deactivate TinyMCE
Save your code
Title: Re: How to use image maps with TinyMCE editor?
Post by: balisto on September 16, 2008, 12:13:39

Hello,

thanks for your answer.

That would be a quick and dirty but less-than-ideal solution for admins only. For good reasons, my editors won't have access to the Bots-section in adminmenu.

Can somebody confirm that there is a problem with TinyMCE?
Any other advice or statement to find a solution for this problem?

Cheers,
Chris
Title: Re: How to use image maps with TinyMCE editor?
Post by: xmanhattan on September 16, 2008, 13:43:44
Using tinymce just works a little different.  It's like yiannisK says, to apply certain html, you will have to disable the tinymce.

You can also disable it just as easy through the global config button, first tab, then save.

This will also need to be done when entering code like google ads or javascript otherwise tinymce adds html and therefore corrupts the code.

To see what it actually adds, create a new page and using tinymce, add a picture through ibrowser.
You should see something like:
Code: [Select]
http://yourdomain.ext/images/stories/clock.jpgthen have a look at the code by clicking on the HTML button
in other words, it will add coding where you didn't.

Hope that this info helps.
Title: Re: How to use image maps with TinyMCE editor?
Post by: balisto on September 16, 2008, 14:35:49

Hi,

thanks for your answer. It's still not how I think it should work correctly. My editors will neither have access to to "global config" nor to the "bots section" (I think anybody would agree that this make sense for security reasons). So under no circumstances this would be a solution. I just want TinyMCE to accept the correct html-code I enter (sure I use the html button to view, edit or enter html). I used TinyMCE in other applications and there I never had any problems!? Or is elxis the problem?

Cheers,
Chris
Title: Re: How to use image maps with TinyMCE editor?
Post by: xmanhattan on September 16, 2008, 21:05:23
Chris,

You didn't read what we wrote correctly.  No one said that the editor would have access to either.

Please re-read, then have a look at your admin home page and click on global config to see what I am writing about or on bots for what yiannisk wrote.

Title: Re: How to use image maps with TinyMCE editor?
Post by: balisto on September 16, 2008, 21:18:23

Hi xmanhattan,

No, it seems as if I really don't understand what you mean. I know how to disable the WYSIWYG editor in global configuration or in bots. But I don't really understand what exactly is your suggested solution? By default I want TinyMCE enabled for editors/authors.  Should they call me (the admin) to disable the WYSIWYG editor each time they want to enter valid HTML-Code because TinyMCE doesn't accept it? This is not practicable. Or am I completely on the wrong track?

Cheers,
Chris
Title: Re: How to use image maps with TinyMCE editor?
Post by: xmanhattan on September 17, 2008, 15:37:44
Chris,

First, if you are assuming that your customer is going to make an image map, I really don't know what to say.

Next, after a little research, I found the following links regarding joomla (sorry datahell) but I believe that they explain the problem further and quicker.  It also requires the installation of a bot which I cannot say whether or not will work with elxis.

Anyway, here are the links:
http://forum.joomla.org/viewtopic.php?f=236&t=38391 (http://forum.joomla.org/viewtopic.php?f=236&t=38391)
http://coders.mlshomequest.com/component/option,com_docman/task,doc_details/gid,2/Itemid,43/ (http://coders.mlshomequest.com/component/option,com_docman/task,doc_details/gid,2/Itemid,43/)

Again, as far as clients go, they don't do html so yes, they will have to call you and yes that is an opportunity to make something extra.
Title: Re: How to use image maps with TinyMCE editor?
Post by: balisto on September 17, 2008, 17:54:20
Hi xmanhattan,

thanks for your reply.

The image map was just one example. I tried other HTML-Code like <object> that was also not accepted. But anyway, what is wrong about assuming that my customer is going to use e.g. an image map or other simple HTML-tags as long as it is correct code? Allow me to explain the concrete example why it makes sense (and again: this is really nothing special, just a very common task):


xmanhattan, I'm not criticizing elxis. I have chosen it for the first time to (test-)realize a project because of it's language capabilities which is something very important here in Belgium because almost any website is at least bi-lingual - sometimes 3 or 4 languages. I know that it is free and opensource and that people spend a lot of their spare time on developing it - and as far as I could get into it they do a great job.

Unfortunately I get the impression by reading your answer's first sentence and some other answers in the forums (or sometimes by not getting an answer at all) that people might feel a bit left alone with serious problems they experience by trying to use elxis with their day-to-day business (and spreading out elxis throughout the world thus). So perhaps it's sometimes better to think about long-term improvements of existing tools instead of only trying to find a quick workaround that works in the short term - and not for everybody. In this case I think the fact that until now nobody had the need to have their customers/editors/publishers entering certain HTML-tags does not automatically mean that this is a feature that doesn't make sense, does it?

I guess it's by the help of everybody's problems, wishes and visions that elxis is going to become better and more successful in the future.

I followed your link to joomla and I read in the 5th post that somebody was able to "configure JCE WYSIWYG editor" to accept image maps. If I could dream about the future of elxis (together with TinyMCE) it would be great to have such an option in General Configuration: some place to configure what HTML-tags are accepted and which are not - depending on the project we are realizing and depending on our customer's skills. Some projects/customers might need no HTML except for <b> and <i> - some might need more like my example above hopefully shows.

I honestly hope what I said was no offense. I appreciate your help and I thank you for taking the time to answer my questions.

Cheers,
Chris
Title: Re: How to use image maps with TinyMCE editor?
Post by: xmanhattan on September 22, 2008, 14:59:00
Chris, no offense taken, as what is said on a forum should be for discussion.

You will find as you experiment that there are different levels of users.  You will also find that the complexity of a cms like elxis and other programs like joomla have trade offs.  It is not that you are being ignored, it is just that this is the answer for this function at this time.

One of my clients complains about using tinymce also because they want to copy and paste from different sources.
Doing that creates a problem of embedded html formatting, e.g. word.  The solution that I found for windows users is to have notepad open and to copy from where ever and to paste into notepad first.  This in effect removes extraneous html and other formating from the content.  Then to copy from notepad into the elxis content and reformat there.  This is a tried and proven solution.

The function of tinymce is to help simple users and as such, it corrects in it's own way the problems associated with formatting content.

I have researched a number of cms, and while elxis is not well known, it is in my opinion the best there is.  As for the people behind it, I think that they are doing a great job of improving it.  Over the years, I have seen technology progress but these past few years I think that the programs available have taken major leaps in what they offer to users.
For some that is great, for others, they will complain that there is too much to absorb.

As for your problem with the map and image mapping, you might want to develop or have developed some php program that could integrate the changes to the mapping information, at least that's what I envision.

Regards,

xmanhattan
Title: Re: How to use image maps with TinyMCE editor?
Post by: nikos65 on September 22, 2008, 15:22:18
Quote
The solution that I found for windows users is to have notepad open and to copy from where ever and to paste into notepad first.  This in effect removes extraneous html and other formating from the content.  Then to copy from notepad into the elxis content and reformat there.  This is a tried and proven solution.

I do the same think and everything is ok

Title: Re: How to use image maps with TinyMCE editor?
Post by: balisto on October 02, 2008, 12:14:05

Hi xmanhattan,

thanks for your answer.

Quote
As for your problem with the map and image mapping, you might want to develop or have developed some php program that could integrate the changes to the mapping information, at least that's what I envision.

Would this be a new module then? In general: Do you know where I can find reliable and professional elxis-developers just in case I have things to fix/develop (with invoice and VAT no)?

Cheers,
Chris
Title: Re: How to use image maps with TinyMCE editor?
Post by: kebic on October 02, 2008, 13:38:13
Quote
reliable and professional elxis-developers

members/
Title: Re: How to use image maps with TinyMCE editor?
Post by: balisto on October 02, 2008, 13:50:53

Thanks for the link!
Title: Re: How to use image maps with TinyMCE editor?
Post by: ks-net on August 15, 2009, 19:29:18
GIVE TINY THE ABILITY TO INSERT MORE TAGS .... below an example for  applet-object-iframe-map-area

A- configure tiny -prohibited-elements  .. go at  bots page  put there only a ( ,)

B-  edit ... /mambots/editors/tinymce.php line ~297
add this ->
Code: [Select]
$out .= 'extended_valid_elements : "map[name],area[shape|coords|style|title|alt|target],iframe[src|style|width|scrolling|frameborder|height|name|align],applet[style|width|code|archive|height]",'._LEND;
now tiny in html mode wont clean up your code

Note: any update will override your modifications.... and not to forget-> use at your own risk(not so risky)