Announcement

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

#1 2006-01-30 22:14:28

Vik
Xinha Community Member
Registered: 2005-12-06
Posts: 18

Set Path for ImageManager?

To get the ImageManager plugin to work, I have to set two variables:

   $IMConfig['images_dir'] = "demo_images";
   $IMConfig['images_url'] = str_replace( "backend.php", "", $_SERVER["PHP_SELF"] ) . "demo_images";

If the full URL to my images directory is:

  http://www.bigpicweblog.com/exp/images/my_images/

...then, what is the correct way to set these two variables? I've tried everything I can think of, and I haven't figured it out yet. Thanks in advance to all for any info.

Offline

#2 2006-01-31 04:49:52

rbw
New member
Registered: 2006-01-27
Posts: 6

Re: Set Path for ImageManager?

Assuming that your project (including xinha directory) is in 'http://www.bigpicweblog.com/', then these lines should be like this:

$IMConfig['images_dir'] = "../../../exp/images/my_images";
$IMConfig['images_url'] = str_replace( "backend.php", "", $_SERVER["PHP_SELF"] ) . "../../../exp/images/my_images";

Offline

#3 2006-01-31 05:29:03

Vik
Xinha Community Member
Registered: 2005-12-06
Posts: 18

Re: Set Path for ImageManager?

Thanks RBW. That worked!

Offline

#4 2006-01-31 06:14:17

Vik
Xinha Community Member
Registered: 2005-12-06
Posts: 18

Re: Set Path for ImageManager?

May I ask the same question, for the Insert Picture plugin? Here are the relevant variables from that plugin:

  //this plugin only use the relativ webpath to the picturefolder
  //default ~  /htmlarea/plugins/InsertPicture/demo_pictures/

    $PicturePath = 'http://'.$_SERVER['HTTP_HOST'].$_REQUEST['picturepath'];

    $AInsertPicturePath = explode ('/', 'http://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF']).'/demo_pictures/');
    $ALocalInsertPicturePath = explode($strPathSeparator, dirname(__FILE__).$strPathSeparator.'demo_pictures');
    $APicturePath = explode('/', 'http://'.$_SERVER['HTTP_HOST'].$_REQUEST['picturepath']);

    $PicturePath =  'http://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF']).'/demo_pictures/';
    $LocalPicturePath = dirname(__FILE__).$strPathSeparator.'demo_pictures';

Offline

#5 2006-08-30 06:21:35

topgun
New member
Registered: 2006-08-30
Posts: 6

Re: Set Path for ImageManager?

Hi, I currently have the same problem.

When I am trying to config the image manager as following:

<?php
        session_start();
        $IMConfig = array();
        $IMConfig['images_dir'] = '/usr/export/www/vhosts/funnetwork/hosting/retaliator/smg/';
        $IMConfig['images_url'] = 'http://retaliator.re.funpic.de/smg/';
        $IMConfig = serialize($IMConfig);
        if(!isset($_SESSION['Xinha:ImageManager']))
        {
          $_SESSION['Xinha:ImageManager'] = uniqid('secret_');
        }       
       ?>

Actually the image manager is working but when I submit the form I receive wrong image sources:

<img width="38" height="10" src="smg/mehr.gif" alt="mehr.gif" />

instead of

<img width="38" height="10" src="http://retaliator.re.funpic.de/smg/mehr.gif" alt="mehr.gif" />

Can anyone help me

thx rob

Offline

#6 2006-08-30 09:02:56

ray
Xinha Administrator
From: Germany
Registered: 2005-03-23
Posts: 521
Website

Re: Set Path for ImageManager?

Looks a bit like xinha_config.stripBaseHref = true

Offline

#7 2006-08-30 10:49:32

andy_vdg
New member
From: Switzerland
Registered: 2006-08-22
Posts: 5

Re: Set Path for ImageManager?

Hi Vik,

Assuming you are the same Vik from the EE forums, have you gotten this to work in EE at all?
(My original post)

Thanks
Andy

Offline

#8 2006-08-30 17:56:13

Vik
Xinha Community Member
Registered: 2005-12-06
Posts: 18

Re: Set Path for ImageManager?

Hi Andy,

Yes, I'm the same Vik from the EE forum, and I have gotten Xinha working with EE. In fact, I made an EE extension that lets you use Xinha. You can download it from the EE forum, using this link:

http://www.pmachine.com/forums/viewthread/34818/

I'm using the Insert Picture plugin for EE. See the Read Me that comes with the extension for info on getting it to work with EE.

Last edited by Vik (2006-08-30 17:57:31)

Offline

#9 2006-09-03 05:47:51

andy_vdg
New member
From: Switzerland
Registered: 2006-08-22
Posts: 5

Re: Set Path for ImageManager?

Hi Vik,

Sorry, I need to clarify: I am already using your EE extension and it's working very well.
Now I am trying to get the Image Manager to point to a different folder on my webserver for each blog.
I need to incorporate this into EE somehow:

<?php
        session_start();
        $IMConfig = array();
        $IMConfig['images_dir'] = '/path/to/images/';
        $IMConfig['images_url'] = 'http://www.mydomain.com/images/';
        $IMConfig = serialize($IMConfig);
        if(!isset($_SESSION['Xinha:ImageManager']))
        {
          $_SESSION['Xinha:ImageManager'] = uniqid('secret_');
        }       
       ?>

But I also need to add variables for the images_dir and images_url values that change depending which weblog I am using. Have a look at my original post for more details.

Was just wondering if you had gotten something like this to work in EE with your extension or if you have an idea how to get it to work?

Last edited by andy_vdg (2006-09-03 05:48:48)

Offline

#10 2006-09-03 12:34:28

Vik
Xinha Community Member
Registered: 2005-12-06
Posts: 18

Re: Set Path for ImageManager?

Hi Andy,

I haven't. There's a guy on the EE forum named Vincent who has gotten another Xinha plugin, ExtendedFileManager, working with it. If you want, send me a private email on the EE forum and I'll send you his email address.

Offline

#11 2008-03-27 06:27:35

antibart
New member
Registered: 2008-03-27
Posts: 2

Re: Set Path for ImageManager?

rbw wrote:

Assuming that your project (including xinha directory) is in 'http://www.bigpicweblog.com/', then these lines should be like this:

$IMConfig['images_dir'] = "../../../exp/images/my_images";
$IMConfig['images_url'] = str_replace( "backend.php", "", $_SERVER["PHP_SELF"] ) . "../../../exp/images/my_images";

Yes - this works fine online. But how must I change settings on localhost/any_projectname ?

With the settings similar to above I get the wrong imagepath

<img href="http://localhost/kai_cms/kai_cms/images/finca_startseite.gif" />

instead of

<img href=http://localhost/kai_cms/images/finca_startseite.gif" />

There is one "kai_cms" too much in the URL. I use xinha ImageManager with CMSimple... which settings do I need to config to tell that "localhost/kai_cms" is root? THe Rest (upload/create folder/thumbs) works fine.

I would be pretty thankful for any help...

...

Offline

#12 2008-03-27 06:37:43

antibart
New member
Registered: 2008-03-27
Posts: 2

Re: Set Path for ImageManager?

antibart wrote:

Yes - this works fine online. But how must I change settings on localhost/any_projectname ?

Solved it by myself editing virtuel hosts on httpd-vhosts.conf. To find in xampp (or whatever)/apache/conf/extra

Offline

#13 2010-10-20 21:43:21

sonicpaint
New member
Registered: 2010-10-20
Posts: 1

Re: Set Path for ImageManager?

rbw wrote:

Assuming that your project (including xinha directory) is in 'http://www.bigpicweblog.com/', then these lines should be like this:

$IMConfig['images_dir'] = "../../../exp/images/my_images";
$IMConfig['images_url'] = str_replace( "backend.php", "", $_SERVER["PHP_SELF"] ) . "../../../exp/images/my_images";

For the life of me, I can't get this to work. FOr me the settings are as follows.

$IMConfig['images_dir'] = "../../../../images";
$IMConfig['images_url'] = str_replace( "backend.php", "", $_SERVER["PHP_SELF"] ) . "../../../../images";

When these settings are put into place, the following things occure.
       * When editing on the live site and adding an image the image can be seen and added to the content. However, when posted, the image doesn't show on the site due to the link having an "http://" at the start of the source.
      *After the posting of the date that doesn't seem to display the image, I load the content again and notice the the link isn't corrected and an addition http:// is added like => http://http://images/...

Are the settings sugggested above suppose to work in all instances?

Any help would be much appreciated. Very frustrated at this point and have done whta I can through search engines to find and answer without resolve.

Thanks in adanced.
sonicpaint

Offline

#14 2010-10-21 01:33:41

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

Re: Set Path for ImageManager?

Use absolute paths.  For example

images_dir = /home/you/public_html/images
images_url = /images

also check the settings in the xinha configuration for strip_base_href


James Sleeman

Offline

Board footer

Powered by FluxBB