Member
Member
rreimche   18-04-2012, 16:30
#1

Sorry for this question, as I think it should be enough simple to find the answer, but quick look through search results didn't help me.

The question is, how can I get the URL of the site for use in my theme? I plan to use it like:

...

Administrator
Administrator
acrylian   18-04-2012, 16:42
#2

I don't understand what you mean. What site?

Member
Member
rreimche   18-04-2012, 17:06
#3

If the url of my website is http://mysite.com/smth/ (opening mysite.com doesn't give user anything), and I need to place links like
a href="$mysiteurl/pages/page" or a href="$mysiteurl/something",

how do I get $mysiteurl?

Does this make sense?

Administrator
Administrator
acrylian   18-04-2012, 18:13
#4

First, why do you have mysite.com/something when mysite.com means nothing? Why don't you just use the root of your domain then? (Zenphoto can be installed in the root of course).

Second, Zenphoto provides several functions to get these links ($mysiteurl/pages/page is a Zenpage page named "page" and $mysiteurl/something is an album named something).

There are also some constants WEBPATH and SERVERPATH, or FULLSERVERPATH available:http://www.zenphoto.org/documentation/functions/_functions-basic.php.html

Member
Member
Michel Gagnon   18-04-2012, 18:22
#5

Post erased

Administrator
Administrator
acrylian   18-04-2012, 18:59
#6

@Michel: Why do you erase your post?

Member
Member
rreimche   18-04-2012, 20:38
#7

WEBPATH is just perfect.

Thank you.

Member
Member
rreimche   18-04-2012, 20:41
#8

For "why do you need that, when you can just...", I'd say I'd like to have some extra transfer freedom. For example, now my site lives at demo.mysite.com/thesite and in several days it'll move to anothersite.com

Administrator
Administrator
acrylian   19-04-2012, 08:19
#9

Ok, I just didn't understand so I asked.

Member
Member
Michel Gagnon   19-04-2012, 20:47
#10

@acrylian,

I had started to write something while you were writing your post. When I completed my entry, I noticed that your answer was better than mine.

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.