Announcement

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

#26 2005-04-14 08:28:34

mharrisonline
Xinha Administrator
From: Denver, Colorado
Registered: 2005-04-11
Posts: 110
Website

Re: Newbie Guide

How do you save with the new configuration? There is no example save button. Also, if someone is currently using buttons under HTMLarea3 for highlight text, to insert HTML, or custom functions, how would you now implement that?

Offline

#27 2005-04-14 16:19:14

ukweb
Xinha Community Member
Registered: 2005-04-13
Posts: 12

Re: Newbie Guide

I have followed the newby guide Step by Step, and uploaded all the files but still have problems. The files for xinha are stored on a sub domian of my site (http://scripts.ukwebdhs.co.uk/xinha) and my page with the editor is locaded on a different sub domain (http://content.ukwebdhs.co.uk).

The toolbars all appear but the pop-ups don't work. the windows appear when you click on something that has a popup but you have to manually resize the window and then none of the buttons work (ie the ok or cancel buttons) it is really pissin me off, has anyone got ANY ideas whats up, everything else works, but not the popups. I have deleted the files and redownloaded the files and uploaded them, and nothing changed.

PLEASE HELP, I have asked aabout this on other pages and had no response. PLEASE HELP

Offline

#28 2005-04-14 17:36:33

con4mity
Xinha Community Member
Registered: 2005-04-06
Posts: 23

Re: Newbie Guide

ukweb is this somewhere that we can see?  Are you using absolute paths for editor_url, htmlarea.js, and so forth?

Last edited by con4mity (2005-04-14 17:37:40)

Offline

#29 2005-04-14 17:52:51

ukweb
Xinha Community Member
Registered: 2005-04-13
Posts: 12

Re: Newbie Guide

yes, the url for the page with the editor can be found at http://www.ukwebdhs.co.uk
click client login and use the username 'public' and password 'public' then click the 'edit page' on the side and it will open the page with the editor on it.

Thanks

Offline

#30 2005-04-14 18:01:24

con4mity
Xinha Community Member
Registered: 2005-04-06
Posts: 23

Re: Newbie Guide

I tried but public/public doesn't seem to work.

By the way do you know where pageStyles go?  I need to figure out how to make my text area background black? Lol

I know sounds stupid, and you'd think it was easy, but no no seems to know how.

Last edited by con4mity (2005-04-14 18:02:19)

Offline

#31 2005-04-14 18:16:35

ukweb
Xinha Community Member
Registered: 2005-04-13
Posts: 12

Re: Newbie Guide

I've changed the site so that you dont need a password, just go to www.ukwebdhs.co.uk and the editor should just start

Offline

#32 2005-04-14 18:53:01

con4mity
Xinha Community Member
Registered: 2005-04-06
Posts: 23

Re: Newbie Guide

Well, its obviously a permissions problem, lol.

Is this a windows server?  Seems unlikely since you're in the UK, but thought I'd ask, also I think the editor url is supposed to be a path not a url, though I could be wrong.

I'd check the permissions on the language file.

Offline

#33 2005-04-14 18:56:11

ukweb
Xinha Community Member
Registered: 2005-04-13
Posts: 12

Re: Newbie Guide

Not a windows server, unix. what should the permissions be set to and on which file?

Thanks

Offline

#34 2005-04-14 19:00:24

con4mity
Xinha Community Member
Registered: 2005-04-06
Posts: 23

Re: Newbie Guide

well, good question,  you said earlier that the files are on one subdomain, and the editor another, are these different servers?

Because it seems that the files haven't given the webserver, or owner of the webserver files permission to use them.

Offline

#35 2005-04-14 19:12:36

ukweb
Xinha Community Member
Registered: 2005-04-13
Posts: 12

Re: Newbie Guide

I control the domain which includes the sub-domains. They are hosted on different sub domains with a view to the 'scripts' sub domin to be shared with other websites. I can set permissions, but I need to know what to set them to and to which folder.

Thanks

Offline

#36 2005-04-14 19:13:55

ukweb
Xinha Community Member
Registered: 2005-04-13
Posts: 12

Re: Newbie Guide

btw they are on the same server, forgot to mension that

Offline

#37 2005-04-14 19:24:02

con4mity
Xinha Community Member
Registered: 2005-04-06
Posts: 23

Re: Newbie Guide

It's hard for me to know, I don't know how you're setup but what account is used when pages are viewed on the webserver, make sure that account has permissions to the script directory.

Offline

#38 2005-04-15 02:38:22

ukweb
Xinha Community Member
Registered: 2005-04-13
Posts: 12

Re: Newbie Guide

i don't think it is permissions which are at fault, i set all the directories to read, write, execute for all users but still the same problem occurs. HELP!!

Offline

#39 2005-04-15 04:47:52

adamp
Xinha Pro
Registered: 2005-03-14
Posts: 77

Re: Newbie Guide

con4mity wrote:

Well, its obviously a permissions problem, lol.

Is this a windows server?  Seems unlikely since you're in the UK, but thought I'd ask, also I think the editor url is supposed to be a path not a url, though I could be wrong.

I'd check the permissions on the language file.

Eh? Do we not have Windows servers in the UK? Probably the biggest 'mass market' host in the UK runs mostly Windows servers.

Anyway, not trying to start an argumnet, just found that a strange statement smile

Offline

#40 2005-04-15 07:10:22

con4mity
Xinha Community Member
Registered: 2005-04-06
Posts: 23

Re: Newbie Guide

adamp, sorry dude, not what I meant.  I didn't mean I doubt you have a windows server because UK has none, I meant doubt you're using windows with open source software, since open source is so much bigger in the UK.

Turns out I was wrong.  I expected linux not unix.

ukweb - your page says Permission denied when scripts run.  Now, I'm no unix guru, but if you're setting file permissions to fix a user problem, maybe this is wrong.

Under what account does your content pages run when viewed via the webserver?  Mine run as the owner account of the site being viewed.  for example:  /home/con4mity/htdocs/"contentfiles"  run under the con4mity account.  <-- I'm just making this up.

The point is maybe that account also has to have some kind or ownership, or special permission to your script folder.

Sorry I'm not more help.

Offline

#41 2005-04-15 07:18:41

adamp
Xinha Pro
Registered: 2005-03-14
Posts: 77

Re: Newbie Guide

No worries, I personally have 2 linux servers and no Windows servers, just got thrown by my mis-reading of the sentence hehe.

Offline

#42 2005-04-15 07:44:37

akaEdge
Xinha Community Member
From: London
Registered: 2005-03-05
Posts: 16

Re: Newbie Guide

OK - it seems some of these posts have gone a bit off topic - remember this is about problems you have when following the Newbie Guide - if you've done something different and it doesn't work then that might be why!!!!!

ukweb:
there are some variables in the scripts that store urls of where everything is including "baseHref" and "baseURL", you can set baseHref using something like:

xinha_config.baseHref = "http://www.ukwebdhs.co.uk"

the problem is that the script almost definitely has a fit, because you want to use two different "baseHref"s. For the purpose of identifying that there isn't a problem with the Newbie Guide as such, try storing everything under the one sub domain and check that it works. If you HAVE to have it under different ones then please start a new thread.



con4mity: to turn the background of your editor black use the following line in the STEP 3 area of your config:

xinha_config.pageStyle = "body {background-color: black;}"

pageStyle accepts a string using CSS syntax so you can extend it to include anything else too, eg:

xinha_config.pageStyle = "BODY {background-color: black; color: white;} P {color: white;}"

(note: if you are pre-loading data it must have <p> tags for the P color to work - hence I have set it on the body tag too)


akaEdge

Offline

#43 2005-04-15 07:47:35

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

Re: Newbie Guide

this goes into myconfig.js!

don't touch htmlarea.css .


Niko

Offline

#44 2005-04-15 08:25:17

con4mity
Xinha Community Member
Registered: 2005-04-06
Posts: 23

Re: Newbie Guide

akaEdge, thanks that helped me.  Now my frame issue and the "unspecified error" is still on going but i take it you want that not in this thread.  Sorry mate!

Offline

#45 2005-04-15 14:48:59

ukweb
Xinha Community Member
Registered: 2005-04-13
Posts: 12

Re: Newbie Guide

akaEdge wrote:

there are some variables in the scripts that store urls of where everything is including "baseHref" and "baseURL", you can set baseHref using something like:

xinha_config.baseHref = "http://www.ukwebdhs.co.uk"

the problem is that the script almost definitely has a fit, because you want to use two different "baseHref"s. For the purpose of identifying that there isn't a problem with the Newbie Guide as such, try storing everything under the one sub domain and check that it works. If you HAVE to have it under different ones then please start a new thread.

what do I need to put in the basehref?

all my xinha stuff is on;
http://scripts.ukwebdhs.co.uk/xinha
and my editor is on;
http://content.ukwebdhs.co.uk and
http://www.allturf.co.uk and
http://www.ukwebcreations.co.uk

??

Thanks
Steve

Offline

#46 2005-04-15 15:00:03

akaEdge
Xinha Community Member
From: London
Registered: 2005-03-05
Posts: 16

Re: Newbie Guide

thats the point - baseHref can only take one value.

I would *highly* recommend copying the Xinha stuff into each domain you wish to use it on - if not just to fix this problem it will allow you to make each set of X-Areas more like the domain they are used on through using the different configuration options.

If it is a big problem for you then start a new thread and hopefully someone will be able to help you.


akaEdge

Offline

#47 2005-04-17 02:29:59

mharrisonline
Xinha Administrator
From: Denver, Colorado
Registered: 2005-04-11
Posts: 110
Website

Re: Newbie Guide

I'm sorry to bring this up again, but if you don't use the old example code and use the new xinha code for making xinha replace one or more text areas, what is the proper way to submit? Also, if you were using the old insertHTML, highlight, etc. buttons, how would you now make them work?

Offline

#48 2005-04-17 22:36:20

akaEdge
Xinha Community Member
From: London
Registered: 2005-03-05
Posts: 16

Re: Newbie Guide

Here is what a page including an X-Area should look like (assuming that you have included code inline rather than putting it in myconfig.js which is better, but harder to show in this scenario). Note that the necessary code is still there if you have used the myconfig.js file, but you will need to uncomment the respective lines.

Submits should be made as if you were submitting any regular textarea box on a html page - that is you call an "action" page from the form properties and on that action page you refer to "Request.Form('newbiearea1')" or the PHP equivalent.

<html>
    <head>
              <title>Xinha Test</title>

        <script type="text/javascript">
            _editor_url  = "/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="/xinha/htmlarea.js"></script>

        
        <!-- <script type="text/javascript" src="/xinha/my_config.js"></script> -->

        <!-- you could place everything within the //xxxxxxx below in to /xinha/my_config.js and uncomment the include above -->
        <script type="text/javascript">

// xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

            xinha_editors = null;
            xinha_init    = null;
            xinha_config  = null;
            xinha_plugins = null;
            
            // This contains the names of textareas we will make into Xinha editors
            xinha_init = xinha_init ? xinha_init : function()
            {
              /** STEP 1 ***************************************************************
               * First, what are the plugins you will be using in the editors on this
               * page.  List all the plugins you will need, even if not all the editors
               * will use all the plugins.
               ************************************************************************/
            
              xinha_plugins = xinha_plugins ? xinha_plugins :
              [
               'CharacterMap',
               'ContextMenu',
               'FullScreen',
               'ListType',
               'SpellChecker',
               'Stylist',
               'SuperClean',
               'TableOperations'
              ];
                     // THIS BIT OF JAVASCRIPT LOADS THE PLUGINS, NO TOUCHING  :)
                     if(!HTMLArea.loadPlugins(xinha_plugins, xinha_init)) return;
            
              /** STEP 2 ***************************************************************
               * Now, what are the names of the textareas you will be turning into
               * editors?
               ************************************************************************/
            
              xinha_editors = xinha_editors ? xinha_editors :
              [
                'newbiearea1'
              ];
            
              /** STEP 3 ***************************************************************
               * We create a default configuration to be used by all the editors.
               * If you wish to configure some of the editors differently this will be
               * done in step 4.
               *
               * If you want to modify the default config you might do something like this.
               *
               *   xinha_config = new HTMLArea.Config();
               *   xinha_config.width  = 640;
               *   xinha_config.height = 420;
               *
               *************************************************************************/
            
               xinha_config = xinha_config ? xinha_config : new HTMLArea.Config();
                        
              /** STEP 3 ***************************************************************
               * We first create editors for the textareas.
               *
               * You can do this in two ways, either
               *
               *   xinha_editors   = HTMLArea.makeEditors(xinha_editors, xinha_config, xinha_plugins);
               *
               * if you want all the editor objects to use the same set of plugins, OR;
               *
               *   xinha_editors = HTMLArea.makeEditors(xinha_editors, xinha_config);
               *   xinha_editors['myTextArea'].registerPlugins(['Stylist','FullScreen']);
               *   xinha_editors['anotherOne'].registerPlugins(['CSS','SuperClean']);
               *
               * if you want to use a different set of plugins for one or more of the
               * editors.
               ************************************************************************/
            
              xinha_editors   = HTMLArea.makeEditors(xinha_editors, xinha_config, xinha_plugins);
            
              /** STEP 4 ***************************************************************
               * If you want to change the configuration variables of any of the
               * editors,  this is the place to do that, for example you might want to
               * change the width and height of one of the editors, like this...
               *
               *   xinha_editors.myTextArea.config.width  = 640;
               *   xinha_editors.myTextArea.config.height = 480;
               *
               ************************************************************************/
            
              /** STEP 5 ***************************************************************
               * Finally we "start" the editors, this turns the textareas into
               * Xinha editors.
               ************************************************************************/
            
              HTMLArea.startEditors(xinha_editors);
            }
            
            window.onload = xinha_init;

// xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

        </script>  
    </head>
    <body>
        <h1>Xinha test page</h1>
        <p>This is a simple test page for Xinha the WYSIWYG editor.</p>
    
        <p>This file accompanies the Xinha Newbie Guide at <a href="http://xinha.python-hosting.com/wiki/NewbieGuide">http://xinha.python-hosting.com/wiki/NewbieGuide</a></p>

        <p>Copy this file into your web project and it will work providing that you have installed Xinha to a directory in the root called "xinha"</p>

        <form method="post" action="newbie_example.htm" name="frmXinhaTest">
            <textarea cols="60" rows="10" id="newbiearea1" name="txtXinhaTest" style="width: 100%">some test text that you can either format or delete and write your own.</textarea>

            <div style="text-align: center">
                <input type="submit" name="action" value="Submit" disabled>
            </div>

        </form>
    </body>
</html>

Last edited by akaEdge (2005-04-21 06:56:39)


akaEdge

Offline

#49 2005-04-20 08:19:21

akaEdge
Xinha Community Member
From: London
Registered: 2005-03-05
Posts: 16

Re: Newbie Guide

I have just made a very small change to the Newbie Guide - which could effect some existing installations.

Basically the very last line of the code that should be in myconfig.js looked like this:

window.onload = xinha_init;

I see that some people were having problems initialising and have got around them by adding the onLoad="xinha_init()" to their body tag.

This isn't required though as the above line should have done the same job - the fix is simple and the problem should have been obvious, however it slipped by *d'oh*.

Change the window.onload line above to:

window.onload = xinha_init();  (function brackets included this time!!!)

The problem symptoms were that while the editor would load ok if there was no onload event in the body it wasn't working when there was. Now it will work fine and saves people the bother of having to add code to the body tag.


akaEdge

Offline

#50 2005-04-21 06:40:56

gogo
Xinha Leader
From: New Zealand
Registered: 2005-02-11
Posts: 1,015
Website

Re: Newbie Guide

window.onload = xinha_init();

Ack! No, that's incorrect.  It's very definatly without the brackets that you want.  With them it assigns the result of the function to window.onload, rather than a reference to the function itself.  If you use it with the brackets then xinha could try to initialize before the page is completely loaded, which could have unexpected results.

That said, I should make a better way by using attach event rather than just assigning to window.onload so it's more reliable.


James Sleeman

Offline

Board footer

Powered by FluxBB