Do relative file paths work with Indexhibit? Where is the "root"?

respiraahora / 2012-08-14 03:07:58   

I'm trying to use some html to use images that are at other places on my server space in exhibits and also possibly to include flash video that is already on the server.
Is it possible to use relative file paths to get to them? If so, what is considered the root folder when I'm specifying the file path? There are a few index.php files within the Indexhibit folders and I thought they might be considered the root, but I've tried creating a file path with that assumption and it hasn't worked.

For example I've tried, based on the assumption that it might be navigating from inside the theme folder (called "default") inside of the ndxzsite directory. But the image doesn't show up. I also tried only going up one directory level rather than two. I cant figure out where it's navigating from so I can specify the file path correctly. Help?

Thanks.

arsondpi / 2012-08-14 05:38:39   

Relative paths are not related to indexhibit as such.
They are related to your root folder... for example:

"photos/other/image_1.jpg" means that image_1.jpg is located in a folder called other that is located in a folder called photos that is located in the current directory.

"../image_1.jpg" means that image_1.jpg is located in a folder one level up from the current directory.

../ represents one level up to the browser. Just search the web for relative paths.
Nothing to do with indexhibit but more to do with the correct file address

respiraahora / 2012-08-16 00:27:38   

Thanks for the response. I understand how file paths work. But when I try to use html to insert something in indexhibit it's not working and I suspected that it's because I was making the wrong assumption about what is considered the "current directory".

I'm not sure if its "starting point" (what it's considering the current directory") is the ndxzsite directory, my root folder (public_html), the directory that the theme is in, or what.

On my server space inside of my public_html directory I have
-ndxzsite (directory)
-ndxzstudio (directory)
-images (a directory that I created that has a bunch of images in it)
-index.php (the indexhibit one)

If I type into the edit window for an indexhibit exhibit

based on the assumption that it's navigating relative to the public_html directory, then I expect it to look for a directory called "images" within the current directory (public_html) and then inside of that find the file image_01.jpg. But the image doesn't show up. This makes me think that maybe it's considering the "current" directory something else, like somewhere inside of ndxzsite. So I tried
and that didn't work either, nor did

So I'm just confused now. (If, on the other hand, I give it a full URL address, it displays the image fine.) So I'm still trying to figure out what it considers the "current" directory when I'm typing into an indexhibit exhibit edit window.

Vaska A / 2012-08-16 01:16:06   

The easiest way to answer this question is to show us your site and the page where you are having problems.

respiraahora / 2012-08-16 02:15:08   

Sure.
Take a look at this page for example:
collinbradford.org/index.php/project/eclipsing-the-sun/

The image at the top (the two images were actually edited together into one image file) was uploaded through the normal Indexhibit interface. Then the Vimeo video was inserted by copying Vimeo's "share" code into the Indexhibit edit window.

Then, after that is the line

But it's obviously not showing up.

That image is at this location
collinbradford.org/images/…

What would I use as the relative file path when trying to reference that image in an Indexhibit exhibit's edit window?

Thanks for your help.

Vaska A / 2012-08-16 10:22:48   

You can use a relative path if the 'base' is set. In your case, it should be written one of two ways...

  1. /images/yellowFlash.jpg

or

  1. h t t p : // w w w . collinbradford . org / images / yellowFlash.jpg

Ignore my extra spaces...

respiraahora / 2012-08-17 01:37:32   

Thanks for the response Vaska
Sorry, it looks like the forum is deleting my code. (I wasn't using the tools to insert code, I was just typing it in.) When I look at my previous posts they're missing the html that I typed into them. That must have been confusing for you trying to help.

The first of the two ways you wrote above is exactly what I had typed, but without the first forward slash. I added the slash and it works fine. I don't remember needing a forward slash at the beginning, but now I know.
Thanks for your help.

This thread has been closed, thank you.