Announcement

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

#1 2012-06-17 00:32:51

orangedan75
New member
Registered: 2012-06-17
Posts: 3

help: set Image absolute path on textarea

Hi, I'm new to xinha. I'm developing my own cms which has structure related to xinha like this:

- root
   - admin
   - assets
       - images
   - jscripts
       - xinha-0961
   - themes
   - etc...

I've put xinha files on xinha-0961 directory under jscripts directory. all administrator pages are under admin directory which has single head.php for all pages (i'm using include_once('head.php') for the head section)

in head.php I have :

<script type="text/javascript">
    _editor_url  = "../jscripts/xinha-0961/"   // (preferably absolute) URL (including trailing slash) where Xinha is installed
    _editor_lang = "en";       // And the language we need to use in the editor.
    _editor_skin = "silva";    // If you want use a skin, add the name (of the folder) here
    _editor_icons = "classic"; // If you want to use a different iconset, add the name (of the folder, under the `iconsets` folder) here
</script>
<script type="text/javascript" src="../jscripts/xinha-0961/XinhaCore.js"></script>
<script type="text/javascript" src="../jscripts/xinha-0961/my_config.js"></script>

all xinha config are on my_config.js which have almost the same config in "Page Code" section on http://xinha.webfactional.com/wiki/NewbieGuide

The questions are :
1. How can i use imageManager plugin where I can upload images to root->assets->images folder? which settings and which files should i modified for this?
2. I need to set image url of inserted image on textarea to absolute url such : http://localhost/thecms/assets/images/image1.jpg. which setting should I change to make this applied?

thanks in advance for any replies and supports

Regards,
OrangeDan75

Offline

#2 2012-06-18 05:32:58

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

Re: help: set Image absolute path on textarea

For starters, use a recent Xinha or you are in for a world of hurt if you stick with such an old one.

Xinha Revision 961 is like 360 revisions old, the current trunk is revision 1325.
(I guess you are using the 0.96.1 release, which isn't quite so old, but you are better to use the trunk by far, 0.96.1 doesn't have IE9 fixes, has an old MFM etc...)

The current trunk can always be downloaded with the link on the bottom of this page: http://trac.xinha.org/browser/trunk

Your _editor_url should be absolute if at all possible, relative paths are always a PITA.

And finally, don't use ImageManager plugin (or ExtendedFileManager) at all, they are ancient and likely broken.

Use the MootoolsFileManager plugin instead, it can do both jobs, is modern, looks good, and works well, the current trunk includes a demo of the MootoolsFileManager in examples/mootools-file-manager.php which you can see the proper way to configure the plugin. 

All the configuration options for MootoolsFileManager can be read here... http://trac.xinha.org/browser/trunk/plu … ig.php#L84

NB: The plugin uses mootools of course, but it should be compatible with jquery running on the same page too even if the jQuery is not in compatible mode.


James Sleeman

Offline

#3 2012-06-18 07:14:17

orangedan75
New member
Registered: 2012-06-17
Posts: 3

Re: help: set Image absolute path on textarea

I have downloaded the latest xinha revision files and try to set all things like in http://xinha.webfactional.com/wiki/NewbieGuide. I also include mootool setting but the mootools plugin still doesn't work. the image uploader still doesn't exist. I've tried to look for examples in this forum and trough google but they're just in parts. still look for details of example

Offline

#4 2012-06-18 10:15:03

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

Re: help: set Image absolute path on textarea

You must first ensure that you can run the mootools-file-manager.php example, only when you have that working is it worth going any further.

And nobody can help you if you don't post what errors you get.


James Sleeman

Offline

#5 2012-06-18 12:16:46

orangedan75
New member
Registered: 2012-06-17
Posts: 3

Re: help: set Image absolute path on textarea

thanks gogo for the replies. the errors is now "Error There was no file specified or the file does not exist. (path = /)". only blank pop up window with such error notification.

Offline

#6 2012-06-20 01:31:29

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

Re: help: set Image absolute path on textarea

Is that error with the example?

Are you using mod_security on the server?


James Sleeman

Offline

Board footer

Powered by FluxBB