PDA

View Full Version : Full Path names are killing me, HELP


b_wood
20th of June 2003 (Fri), 11:34
The short question is, can eengine be modified to only use relative paths, instead of full paths to images?

Long explaination Why: I'm testing eengine and I found that it does everything I need (and more). It's about the only image database that I found that when I do a search, it only searches the active exhibit not the entire site. My problem with it is that I'm hosting my exhibit on my home server using a dyndns name (brianwood.homeunix.net:8080)so the world can find my site since I don't have a static IP address(I have to use port 8080 because my ISP blocks port 80). The problem is that when I'm home on any of my computers I can't see brianwood.homeunix.net:8080 I can only see it by the IP address that I assign internally (10.0.1.234 or localhost when I'm on that machine). I'm planning to use it to sell my high school sports photos so parents can search by their kids number and see only the pictures of thier kid. I also take laptop with me when I'm selling pictures and parents can get a preview of the pictures or even order them right then. I tested the backup function to transfer the exhibit to my laptop to simulate what I'd need to do to take the database with me on the road. I won't have internet connection so it's set up as a standalone server and it worked great, only I have to edit all the full paths back to localhost instead of the dyndns name.

I also use Pmachine for a blog application and it works fine inside my home network and on the road because everything is relative paths.

I've also tried setting up a virtual host on my computer (suggested by a friend) to fix the problem, but was never able to get it to work. Ended up not serving any pages.

Any help would be appreciated.

Brian Wood

Pekka
20th of June 2003 (Fri), 12:57
b_wood wrote:
The short question is, can eengine be modified to only use relative paths, instead of full paths to images?

Long explaination Why: I'm testing eengine and I found that it does everything I need (and more). It's about the only image database that I found that when I do a search, it only searches the active exhibit not the entire site.

Hi Brian,

I'm working overtime to get the EE version out which _already_ has capability of searching everything at once.

My problem with it is that I'm hosting my exhibit on my home server using a dyndns name (brianwood.homeunix.net:8080)so the world can find my site since I don't have a static IP address(I have to use port 8080 because my ISP blocks port 80). The problem is that when I'm home on any of my computers I can't see brianwood.homeunix.net:8080 I can only see it by the IP address that I assign internally (10.0.1.234 or localhost when I'm on that machine). I'm planning to use it to sell my high school sports photos so parents can search by their kids number and see only the pictures of thier kid. I also take laptop with me when I'm selling pictures and parents can get a preview of the pictures or even order them right then. I tested the backup function to transfer the exhibit to my laptop to simulate what I'd need to do to take the database with me on the road. I won't have internet connection so it's set up as a standalone server and it worked great, only I have to edit all the full paths back to localhost instead of the dyndns name.

If I understood correctly this is already there in EE. Instead of size paths

http://brianwood.homeunix.net:8080/gallery/big/
or
http://localhost/gallery/big/
and thumb paths
http://localhost/gallery/thumbs/
http://localhost/gallery/microthumbs/

use just

gallery/big/
gallery/thumbs/
gallery/microthumbs/

The URL is relative to gallery root, so take care where slashes go. There are some implications with this like "Find and save size paths" utility does not find those paths, but they do not affect running the gallery (just don't run that util). I'll see now what can be done to make EE fully compatible when relative URL's are entered.

This way server change is no problem.

Does this help or did I miss the point?

Pekka

Pekka
20th of June 2003 (Fri), 13:16
Simpler than I thought:
In EE 1.3RC: to get all editor utilities work when relative paths are used in size, thumb and microthumb paths:

Replace in fetchsettings.php code

cut -------------------

function fixedpath ($path, $filename) {
global $url;
$URI = strtoupper(substr($path, 0, 4));
if ($URI == "HTTP") {
$temp = str_replace(" ", "%20", $path);
$url = $temp . rawurlencode($filename);
}
else {
$url = $path . $filename;
}
return $url;
}

cut -------------------

with code

cut -------------------
function fixedpath ($path, $filename) {
global $url;
global $toroot;
$URI = strtoupper(substr($path, 0, 4));
if ($URI == "HTTP") {
$temp = str_replace(" ", "%20", $path);
$url = $temp . rawurlencode($filename);
}
else {
$url = $toroot . $path . $filename;
}
return $url;
}
cut -------------------

b_wood
20th of June 2003 (Fri), 13:43
Thanks, that did the trick!! I'll be sending the money through paypal tonight to purchase it. (the backup function too).

Just for the record. You don't need to hurry that new version out for me. I don't want it to search all my exhibitions. (at least not for my sports exhibitions). Great software!!!

Brian

Pekka
20th of June 2003 (Fri), 14:03
Nice to hear it worked and thanks for compliments :)

The new search system is simply part of automatically created exhibition which is combined from all exhibitions (under current password of course). But the old system is there, too (search per exhibition) and if requested I'll make that combined exhibition an optional thing (I like it and think it is very useful, though).

Let's see after the first public test version....