Announcement

Do not use the forums to submit bug reports, feature requests or patches, submit a New Ticket instead.

#301 Re: User Discussion & Help » Dialogs as CSS layers/IFRAMEs » 2007-01-23 14:16:00

ray

Could you open a ticket and share the code when you are ready?

#302 Re: User Discussion & Help » Dialogs as CSS layers/IFRAMEs » 2007-01-23 07:22:11

ray

No, unfortunately this is not possible at the moment. I'd like to see that, too smile

#303 Re: User Discussion & Help » Link » 2007-01-22 12:08:48

ray

Ja, ich habe dich schon verstanden.

Mit xinha_config.stripBaseHref = true; (das ist sowieso die default einstellung) wird vom anfang der URL der part abgeschnitten, der durch xinha_config.baseHref definiert wird. Mit der o.g. RegExp sollte dabei bei deinem Beispiel http://www.xy.de heraus kommen, was genau das bewirken sollte, was du möchtest.

//Step 3 im Newbie Guide
xinha_config = xinha_config ? xinha_config() : new Xinha.Config();
xinha_config.baseHref = document.location.href.replace( /^(https?:\/\/[^\/]*)(.*)/, '$1' );
/*
vielleicht stimmt die regex auch nicht, mach mal
alert(xinha_config.baseHref );
und prüfe ob genau http://www.xy.de herauskommt 
*/

Wenn es immernoch nicht klappen sollte, bin ich gern bereit mal einen blick auf deinen code zu werfen

#304 Re: User Discussion & Help » Link » 2007-01-22 10:01:34

ray

At the moment you have to specify xinha_config.baseHref for stripBaseHref to work, which is what you want. This is scheduled for change in the next release, but till then, best put this piece of code in your config

xinha_config.baseHref = document.location.href.replace( /^(https?:\/\/[^\/]*)(.*)/, '$1' );

#305 Re: User Discussion & Help » Link » 2007-01-22 08:55:12

ray

Unfortunately this is a bit of a struggle, because it is done by the browsers.

Have a look at these config variables that deal with this issue:
xinha_config.expandRelativeUrl
xinha_config.baseURL
xinha_config.stripBaseHref
xinha_config.stripSelfNamedAnchors

#306 Re: User Discussion & Help » Black border » 2007-01-21 22:37:20

ray

Just add

  .htmlarea {
border:none;
}

to your styles

#307 Re: User Discussion & Help » Problem in IE - Background and text separate when you scroll window » 2007-01-21 18:39:53

ray

What I meant is in this version you have to do this step from the newbie guide

             // THIS BIT OF JAVASCRIPT LOADS THE PLUGINS, NO TOUCHING  :)
             if(!Xinha.loadPlugins(xinha_plugins, xinha_init)) return;

because it loads important parts of the code.
This has been changed in the meantime and will be no different in the next release.

#308 Re: User Discussion & Help » Problem in IE - Background and text separate when you scroll window » 2007-01-21 07:07:08

ray

You should really update to the latest revision (we are already 30 revisions in front)!

In the version you use you have to call Xinha.loadPlugins(), even if you don't have any plugins.
(That was a misconception from my side, sorry )

#309 Re: User Discussion & Help » Problem in IE - Background and text separate when you scroll window » 2007-01-20 22:22:02

ray

Leave out the doctype definition (=>quirksmode), and wonder!
Google "ie overflow quirksmode"

evilc wrote:

I also noticed that xinha doesn't init properly - all the buttons are greyed out - when I click the greyed out buttons, I get "this.getParentElement is not a function"

seems to be sth wrong with your files, try an update

#310 Re: User Discussion & Help » Multiple independat XINHA windows NOT started on page load » 2007-01-19 16:40:34

ray

Why do you want to have two editors when you always want only one visible?

You don't have to attach xinha_init to window.onload but call it anytime you want. After editing is done, you just display:none the div and show it again next time with other content.

You can set the content with the method setHTML() like

var newHtml = "some HTML";
xinha_editors.myTextArea.setHTML(newHtml);

and you pull it out with

var editor = xinha_editors.myTextArea;
var editedHTML =  editor.outwardHtml(editor.getHTML());

Important: It will not work to create Xinha in a <div style="display:none">, but you can hide and show it at will once generated.

#311 Re: User Discussion & Help » wierd 'has no properties' bug for variable unlrelated to xinha » 2007-01-19 08:01:04

ray

Each array you want to index with string keys should be an Object.

Nevermind,  this happens to every php-coder smile

#312 Re: User Discussion & Help » wierd 'has no properties' bug for variable unlrelated to xinha » 2007-01-18 21:01:02

ray

Just googled a bit and found it to be a practice to use Arrays as associative arrays, but as your example shows it's no good practice!

#313 Re: User Discussion & Help » wierd 'has no properties' bug for variable unlrelated to xinha » 2007-01-18 20:44:49

ray

Hi, had a look at your code now and found the error
Change

tmpIconArray = new Array();

and the other instances of new Array() to

tmpIconArray = new Object(); // you don't want to use an "Array" here

or easier

tmpIconArray = {}; //this is the same as new Object()
var array = ['value1','value2'];
var associativeArray = {'key1':'value1','key2':'value2'};

(Just to show the difference)

Why it behaved differently with and without Xinha, I don't know smile

#315 Re: User Discussion & Help » new plugin: SaveSubmit or The Advanced Save Button » 2007-01-18 09:58:50

ray

It's really simple: It does not more than what  would happen with an HTML submit button. The data of the form is sent to the URL defined in the action attribute of the form. Any further action is up to the server-side script.

#316 Re: User Discussion & Help » Anchor » 2007-01-17 20:06:18

ray

Just checked this out. seemed to work in "both" browsers

#317 Re: User Discussion & Help » Xinha and AJAX - turning Xinha textarea into a regular textarea » 2007-01-17 19:33:44

ray

If I get you right you want to load new contents in the editor. If that's the case, you don't have to insert a whole new textarea in the page. Use the Xinha method setHTML() instead.

var newHtml = "some HTML";

xinha_editors.myTextArea.setHTML(newHtml);

#318 Re: User Discussion & Help » Anchor » 2007-01-17 10:48:27

ray

If the anchor is in the same page, it should show up in the Linker plugin. If it doesn't theres sth wrong

#319 Re: User Discussion & Help » Image Manager Results? » 2007-01-17 06:25:38

ray

please give more details. see http://xinha.gogo.co.nz/punbb/viewtopic.php?id=899

Especially:
* have you checked the parameters in plugins/ImageManager/config.inc.php
* does this occur if you switch to HTML mode and back to wysiwyg

#320 Re: User Discussion & Help » "'Xinha' is undefined" error .... » 2007-01-16 16:47:05

ray

Are you using Firefox? There are some nice extensions (e.g. FireBug) that help analysing problems like this. I'm still of the opinion that there is a problem with the paths

#321 Re: User Discussion & Help » "'Xinha' is undefined" error .... » 2007-01-16 16:43:47

ray

Ok I think there is nothing more at this point I can say without seeing the actual installation, sorry sad

#322 Re: User Discussion & Help » "'Xinha' is undefined" error .... » 2007-01-16 16:33:09

ray

Let's say you have:
www.domain.com/administration/page.html
www.domain.com/administration/xinha/XinhaCore.js etc.

Then it would be

    <script type="text/javascript">
        _editor_url  = "/administration/xinha/"  // (preferably absolute) URL (including trailing slash) where Xinha is installed
        _editor_lang = "en";      // And the language we need to use in the editor.
    </script>
   
    <script type="text/javascript" src="/administration/xinha/XinhaCore.js"></script>

#323 Re: User Discussion & Help » "'Xinha' is undefined" error .... » 2007-01-16 16:09:04

ray

It's also advisable to use the form /path/from/webroot/to/file/ (with leading slash)

#324 Re: User Discussion & Help » "'Xinha' is undefined" error .... » 2007-01-16 16:02:58

ray

Enter ~/Administration/xinha/XinhaCore.js in your location bar. Is the file found?

Otherwise if you have this page online, I could look at it. usually its just a simple error...

#325 Re: User Discussion & Help » "'Xinha' is undefined" error .... » 2007-01-16 15:44:52

ray

Seems XinhaCore.js is not loaded.
Is suppose this path is wrong   

suzannesmith wrote:

<script type="text/javascript" src="~/Administration/xinha/XinhaCore.js"></script>

as it doesn't correspond with this

suzannesmith wrote:

_editor_url  = "/xinha/"  // (preferably absolute) URL (including trailing slash) where Xinha is installed

Board footer

Powered by FluxBB