![]() |
|
Hardcoding vs Not - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: General support (https://forum.zenphoto.org/forum-4.html) +--- Thread: Hardcoding vs Not (/thread-937.html) |
Hardcoding vs Not - thinkdreams - 2006-12-07 Tris (or whoever) What would be the best way to structure this URL to point to the current zenphoto install base rather than having to hardcode each time. It's getting a bit tedious with all these hardcoded links to have to change, and I thought you might have some advice. (e.g. would zp_themeroot work?) An example URL would be (for my credits page): How would you code that in PHP correctly for zenphoto to use it? Hardcoding vs Not - trisweb - 2006-12-07 just a relative link like '?p=credit' should work; it'll always be index.php, right? And that will work in whatever folder it happens to be in. If you want the full path, use `` (edit: That may not work in 1.0.3. Darn, I should release 1.0.4 already...) What's changing about the link that you're worried about? Hardcoding vs Not - thinkdreams - 2006-12-08 Well, it's when I was porting between my dev site and my main site that I noticed that the link was hardcoded with the full web path of http://www.thinkdreams.com/zenphoto, even though my dev sites root path was zensub. So I think the above answers my question that I was looking for. Just need to use relative pathnames instead. Thanks! |