1
brandx
TinyEditor 0.5 problems
  • 2005/9/14 1:28

  • brandx

  • Just popping in

  • Posts: 23

  • Since: 2005/8/15


I have the editor "almost" working but am running into a couple problems with the image management.

1. When i click on the add image button the window is size properly initially but immediately is resized to around 50px by 50px and cannot be resized. I've added the code stated in the documentation but i also feel there is a problem with it because the code in the section "Enable the thumb to popup feature" doesn't seem to be displayed properly, near the end of the function where code should be it shows an image with red X through it (right after the last writeln('... ).

--------------------------------

function myPopImage(imageURL,imageTitle) {

// Script Source: CodeLifter.com

//Set this values 20px larger
//than your biggest picture
PositionX = 100;
PositionY = 100;

defaultWidth = 680;
defaultHeight = 520;

var AutoClose = false;

// Do not edit below this line...

if (parseInt(navigator.appVersion.charAt(0))>=4){
var isNN=(navigator.appName=="Netscape")?1:0;
var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}
var optNN='scrollbars=no,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;
var optIE='scrollbars=no,width=150,height=100,left='+PositionX+',top='+PositionY;
if (isNN){imgWin=window.open('about:blank','',optNN);}
if (isIE){imgWin=window.open('about:blank','',optIE);}
with (imgWin.document){
writeln('');writeln('');
writeln('var isNN,isIE;');writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');
writeln('isNN=(navigator.appName=="Netscape")?1:0;');writeln('isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}');
writeln('function reSizeToImage(){');writeln('if (isIE){');writeln('window.resizeTo(100,100);');
writeln('width=100-(document.body.clientWidth-document.images[0].width);');
writeln('height=100-(document.body.clientHeight-document.images[0].height);');
writeln('window.resizeTo(width,height);}');writeln('if (isNN){');
writeln('window.innerWidth=document.images["George"].width;');writeln('window.innerHeight=document.images["George"].height;}}');
writeln('function doTitle(){document.title="'+imageTitle+'";}');writeln('');
if (!AutoClose) writeln('')
else writeln('');
writeln('');
close();
}
}
------------------------------------------
The above code was copied directly from the documentation

2. Another think i noticed is in a one second or so when the popup image management window is fully visible i'm seeing many variables names... just don't look right... here are some of them....

{$lang_imgmanager_dir}
{$lang_imgmanager_name}
{$lang_imgmanager_imgfile}
{$lang_imgmanager_alt}
{$lang_imgmanager_height}

etc.. etc.. etc... all buttons and text labels are like this.

I'm running XOOPS 2.0.13.1 and attempting to get the editor working with Zmagazine 1.0

Any help would be appreciated.

Geary

2
pjcvdpol
TinyEditor 0.5 image problems
  • 2005/10/7 14:00

  • pjcvdpol

  • Just popping in

  • Posts: 6

  • Since: 2005/7/8 8


I am experiencing the same problem with SmartSection 1.03 on XOOPS 2.0.13.1 Did you get any solutions yet? Have you tried with firefox? On my systems the popup works fine with firefox. However.... the pages show with no images on the user side, just the outlines and alt-tag.

When I use the default XOOPS dhtml editor my images DO show. However: when I check the HTML there are significant differences:

default xoops:
[img align=left]http://essv009/intranet/uploads/img43467746d2490.jpg[/img]

Tinyeditor:
img43467746d2490.jpg

Anyone?

3
brandx
Re: TinyEditor 0.5 image problems
  • 2005/10/7 14:17

  • brandx

  • Just popping in

  • Posts: 23

  • Since: 2005/8/15


I've tested mine with Firefox 1.0 and here is the outcome

- The popup works great!
- the variables "&lang_xxxx" are shown for around 5 seconds then the page refreshes and the variables are shown correctly (i.e. Directory, Image File, Alt, width, etc..)

This really needs to work across most browsers though anyone have suggestions?

Also, I thought the documentation states that a user can have his / her own directory for images.. currently it displays all the images in the images directory. Any idea how to implement this?

4
pjcvdpol
Re: TinyEditor 0.5 image problems
  • 2005/10/10 6:07

  • pjcvdpol

  • Just popping in

  • Posts: 6

  • Since: 2005/7/8 8


Quote:

brandx wrote:
I've tested mine with Firefox 1.0 and here is the outcome

- The popup works great!
- the variables "&lang_xxxx" are shown for around 5 seconds then the page refreshes and the variables are shown correctly (i.e. Directory, Image File, Alt, width, etc..)

This really needs to work across most browsers though anyone have suggestions?

Also, I thought the documentation states that a user can have his / her own directory for images.. currently it displays all the images in the images directory. Any idea how to implement this?


And you are having no problems with inserting images?

5
brandx
Re: TinyEditor 0.5 image problems
  • 2005/10/12 18:56

  • brandx

  • Just popping in

  • Posts: 23

  • Since: 2005/8/15


In firefox, no problem inserting images... the only issue i see with firefox is the variable names showing up for around 5 seconds then the page refreshes automatically and shows the proper names.

Has anyone got this editor / image manager working in internet explorer?

6
smoothly
Re: TinyEditor 0.5 image problems
  • 2005/10/30 21:19

  • smoothly

  • Just popping in

  • Posts: 17

  • Since: 2005/10/29


I'm having the exact same problem as the TS.
Anyone found a solution yet? Cause I can't
really come up with one.

7
marcan
Re: TinyEditor 0.5 problems : some solutions :-)
  • 2005/10/31 11:34

  • marcan

  • Just can't stay away

  • Posts: 824

  • Since: 2003/10/8


Hello fellow Xoopsers,

I encountered the same problems as you did. I have played around with TinyEditor and fixed some problems.

You can find our hack here : tinyedior_smartfactory_hack.zip

Here is what we did on this package :

@brandx:
Quote:
When i click on the add image button the window is size properly initially but immediately is resized to around 50px by 50px and cannot be resized.

I removed the code that was resizing the window under IE. It now works fine, at least for me

@pjcvdpol:
Quote:
However.... the pages show with no images on the user side, just the outlines and alt-tag.

I found out that this is caused by all images' path tp be saved as relative path. To fix this, go in TinyEditor's preferences and set this option to No :
Force relative URLs

@brandx:
Quote:
Also, I thought the documentation states that a user can have his / her own directory for images.. currently it displays all the images in the images directory. Any idea how to implement this?

Yes, this can be done by going in the TinyEditor's preference and changing this option to Yes :
Enable per-user directories?

I also fixed a little issue of HTML outputing at the wrong place when the editor is used within a form using a template.

Also, I beleive I have fixed all the places that had not been translate in french. And for those who are translating this module you need to be aware of this :
- You need to copy the english foldder in modules/tinyeditor/language/ and named it with your language. Then you need to translate all constants of each files in it. But this is normal XOOPS procedure
- Then, you also need to translate every plugin you would like to use.
- Plugin language constant are defined differently.
- They are defined in modules/tinyeditor/editor/plugins/pluginName/langs/
- For example, let's take the image manager plugin
- You need to copy the file modules/tinyeditor/editor/plugins/imgmanager/langs/en.js and rename it with the name or your language, for example. in french, it would be fr.js
- Edit this new file and translated the constant
- Finally, you also need to edit the plugin mainfile to tell this file to also load this new language
- This file is : modules/tinyeditor/editor/plugins/pluginName/langs/editor_plugin.js
- Edit this file and change this line at the top of the file to add your language :
/* Import theme specific language pack */
tinyMCE.importPluginLanguagePack('imgmanager''en,[b][color=CC0000]fr[/color][/b],it');


Finally, I never was able to make the Advanced Image Manager plugin to work. Has anybody was ?
.:: marcan (aka mal aka Marc-André) ::.
.:: Open Source :: The SmartFactory ::.
.:: XOOPS Professional Services :: INBOX International ::.

8
smoothly
Re: TinyEditor 0.5 problems : some solutions :-)
  • 2005/10/31 19:00

  • smoothly

  • Just popping in

  • Posts: 17

  • Since: 2005/10/29


Thanks marcan, I got the Imgmanagaer to work properly.
Unfortunately I stumbled onto the next problem: the
pop-up function is great, except for the fact that
there's not a lot of popping-up goin on :) I'm just
getting a 404 when clicking on the thumbnail
- is this a known problem?

9
smoothly
Re: TinyEditor 0.5 problems : some solutions :-)
  • 2005/11/3 15:00

  • smoothly

  • Just popping in

  • Posts: 17

  • Since: 2005/10/29


Anyone? Cause the pop-up is a great feature when it works properly :)

Login

Who's Online

536 user(s) are online (473 user(s) are browsing Support Forums)


Members: 0


Guests: 536


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits