Announcement

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

#1 2005-08-17 04:11:11

MySchizoBuddy
Xinha Community Member
Registered: 2005-08-17
Posts: 22

Add new image/functionality in the toolbar

I just wrote a plugin for Xinha to work under s9y.
Now what i need is to add manage Image functionality to Xinha toolbar. S9Y by default uses htmlarea3.
the code in S9Y that enables manage image functionality is as follows

        var editorbody    = new HTMLArea("serendipity[body]");
        var configbody    = editorbody.config;
        configbody.registerButton('image_selector', 'Manage Images', 'htmlarea/images/ed_s9yimage.gif', false,
            function(editor, id) {
                window.open('serendipity_admin_image_selector.php?serendipity[textarea]=body', 'ImageSel', 'width=800,height=600,toolbar=no,scrollbars=1,scrollbars,resize=1,resizable=1');
                editorref = editorbody;
            }
        );

Now since Xinha is similar to htmlarea can anyone tell me how do i add this code in xinha.

Offline

#2 2005-08-17 04:30:52

niko
Xinha Authority
From: Salzburg/Austria
Registered: 2005-02-14
Posts: 338

Re: Add new image/functionality in the toolbar

this sould still work - as xinha is more or less compatible with htmlarea
or what errors do you get if it doesn't work?=


Niko

Offline

#3 2005-08-17 04:36:05

MySchizoBuddy
Xinha Community Member
Registered: 2005-08-17
Posts: 22

Re: Add new image/functionality in the toolbar

i didn't try it
i do not know where should i enter it. IN Xinha documentation u have like 5 steps to make xinha work, so where do i enter this code.

Offline

#4 2005-08-17 06:00:01

niko
Xinha Authority
From: Salzburg/Austria
Registered: 2005-02-14
Posts: 338

Re: Add new image/functionality in the toolbar

step 3
just add

        xinha_config.registerButton('image_selector', 'Manage Images', 'htmlarea/images/ed_s9yimage.gif', false,
            function(editor, id) {
                window.open('serendipity_admin_image_selector.php?serendipity[textarea]=body', 'ImageSel', 'width=800,height=600,toolbar=no,scrollbars=1,scrollbars,resize=1,resizable=1');
                editorref = editorbody;
            }
        );

Niko

Offline

#5 2005-08-17 06:24:32

MySchizoBuddy
Xinha Community Member
Registered: 2005-08-17
Posts: 22

Re: Add new image/functionality in the toolbar

Oh sweet.
thanks niko
ok I guess now i have to figure out the path to the image file.
What if i put it inside xinha-nightly/images.

Offline

#6 2005-08-17 10:03:26

niko
Xinha Authority
From: Salzburg/Austria
Registered: 2005-02-14
Posts: 338

Re: Add new image/functionality in the toolbar

put it anywhere you like big_smile


Niko

Offline

Board footer

Powered by FluxBB