VP-ASP :: Shopping Cart Software

Shopping Cart Software Solutions for anywhere in the World

US/Canada(Toll Free): +1 888 587 2278
Europe/UK: +44 (020) 7193 9408
Australia/New Zealand: +61 3 9016 4497

VP-ASP Shopping Cart Customer Forum

Home | Profile | Register | Active Topics | Members | Search | FAQ
Save Password
Forgot your Password?

 All Forums
 VPCart Forum
 Relative paths from "x" to "y"
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Senior Member

United Kingdom
1898 Posts

Posted - June 28 2007 :  08:46:26  Show Profile  Visit devshb's Homepage  Reply with Quote
This is a question/note for any vpasp developers out there who've had this problem in the past. It's quite a technical point but is something that I couldn't find any help on via google etc, so there might be some other people here that have the same issue.

This all came about because we're enhancing our content-management addon (which creates dynamic physical content files from your content records) to be able to create the files in any directory (ie including anywhere outside vpasp) with the help of our byz027 (multiple directories) addon.

ie so that in your content "filename" field, you can type in, say:
and press the create-file link to generate a file in that directory which can still reference/use vpasp with all the right relative paths setup in the created file.

The basic idea being that you can then put your content wherever you want and you don't need any coding knowledge to create the files as it's all done at the push of a button.

For some things (such as creating content files via asp scripts), you know where the area is that you are at the moment, and you know where you want to create the file, but you want to find out what the relative path is from the file that you're going to create to where you are at the moment (ie a kind of reverse relative path).

For example, you want to create a file here:
and inside that file you want to reference (relatively) the area that you're in at the point that you generate the file (in this case, your vpasp area). for example so that you can specify a relative directory at the front of images etc.

So, in your script, you know the absolute path of the file you're going to create, you know the absolute path of where you are, you know the relative path of the file you want to create from where you are, but you need to find the relative path of where you are from the file that you're going to create.

Anyway; that's what I've been trying to work out how to do (ie how to get the relative path from area "x" to area "y")

We're in the closing stages of getting that function finished and implemented inside a new version of our content-management addon, but if there's any other developers out there who have any questions/comments about this, or would find the function useful, can you post here (or email me direct).

Simon Barnaby
[email protected]
Web Design, Online Marketing and VPASP addons
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000