news module and htmarea

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
Locked
larry

news module and htmarea

Post by larry »

Hi,

Perhaps you know a quick fix for this but I cant figure it out, tried it with version 6 and 7.

When editing and adding news on the newsmodule it seems that the htmlarea on the news section does not load the plugins (like tableoperations and imagemanager).

Is there any hack or quick fix for this ? I have tried to find a solution to this but cant figure it out :(

thanks
Larry
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

news module and htmarea

Post by Ted »

There is no quick fix that I know of. I had to take them out because I couldn't get them to load properly, but I can't remember the reason now.

I'll see if I can make it work before 0.7.1.
Larry

possible solution

Post by Larry »

Here is a way to get the Imagemanager to work there as well.\


in header.php

I added :
/htmlarea/plugins/ImageManager/image-manager.js" language="Javascript">
before :


var editor = null;
function initHtmlArea() {
HTMLArea.replaceAll();
}

Hope it helps
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

news module and htmarea

Post by Ted »

I tried this, but it's failing for me. I must be missing something...

Code: Select all

        <__script__ TYPE="text/javascript" SRC="<?php echo $config["root_url"]?>/htmlarea/htmlarea.js"></__script>
        <__script__ TYPE="text/javascript" SRC="<?php echo $config["root_url"]?>/htmlarea/plugins/ImageManager/image-manager.js">
        <__script__ TYPE="text/javascript" DEFER>
                HTMLArea.loadPlugin("ImageManager");
                var editor = null;
                function initHtmlArea() {
                        editor.registerPlugin(ImageManager);
                        HTMLArea.replaceAll();
                }
        </__script>
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

news module and htmarea

Post by Ted »

HTMLArea is way too frustrating for me. If you have a working header.php, can you send it over? I'm obvisouly doing something wrong.

Thanks!
Larry

news module and htmarea

Post by Larry »

Just dont put the

HTMLArea.loadPlugin("ImageManager");

My header is like this at that point :

Code: Select all

	<__script__ type="text/javascript" src="<?php echo $config["root_url"]?>/htmlarea/htmlarea.js"></__script>
      <__script__ src="<?php echo $config["root_url"]?>/htmlarea/tableBorders.js" language="Javascript"></__script>
      <__script__ src="<?php echo $config["root_url"]?>/htmlarea/plugins/ImageManager/image-manager.js" language="Javascript"></__script>
		<__script__ type="text/javascript" defer>
		var editor = null;
		function initHtmlArea() {
			HTMLArea.replaceAll();
		}
	</__script>
I have installed an additional htmlarea plugin to show table borders when they are set to 0.

Mind you this is all on version .6 I havent tried this fix on 7 but will get around to it. :)

cheers :)
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

news module and htmarea

Post by Ted »

Perfect. That's just the direction I needed. I'll fix it later on today. Thanks.
Thijs

news module and htmarea

Post by Thijs »

Ha, that's great, thanks for your help. Showing borders for tableborders are set to 0 will certainly make life easier and I would certainly try to implement it in the main editor, if you could sent me the code: Thijs (at) contemplated.net

I haven't gotten round to look at your fixes, but

HTMLArea.loadPlugin("ImageManager");

should indeed not be used in version 0.6x. The image manager was only introduced in 0.7. Furthermore, is there a good reason not to use the loadPlugin procedure? In my opinion that is the cleanest solution.
Larry

news module and htmarea

Post by Larry »

Errr heh ok I should had mentioned that I manually had added Image Manager on my version 6. Thats why it was there in mine.

It seems that HTMLarea has issues with loading pluggins when Replace.All is used and thats why I was looking for an alternate solution. I tried to find a solution at the HTMLarea boards, and there are a couple of posts that mention this issue, but I couldnt get any of their fixes to work so after some testing the one I mentioned worked for me.

I will mail you my htmlarea.js and image-manager.js.
Or you can directly get it here :
http://www.interactivetools.com/forum/g ... post=25011
Thats where I got it from.

Let me know if you just prefer me to mail it to you.

Larry
Thijs

news module and htmarea

Post by Thijs »

Thanks larry,

We are using a fairly recently CVS-ed version of HTML area 3.0rc in 0.7 for the main page editor. Does this give problems with the HTMLArea.loadPlugin command fo you? On the computers that I tested it, this worked like a charm.

BTW, You do not need to send the full HTMLArea code, I was mostly interested in the tableBorders plugin. Have I overlooked it and is it part of the main HTMLArea distribution, or did you find it somewhere else?
Larry

news module and htmarea

Post by Larry »

Unfortunately my knowledge of Javascript is limited and also because I will admit I am lazy I used the files posted on the thread :

http://www.interactivetools.com/forum/g ... post=25011

to make it work, so I used the htmarea.js that the person who offered the solution posted on that thread.

However on that thread there is an explanation on how to implement it manually. It doesnt seem to be part of the main distribution of HTMLarea though.
Thijs

news module and htmarea

Post by Thijs »

Great, I think I'm going to add the zero-border-hack!
Locked

Return to “[locked] Installation, Setup and Upgrade”