Current XF URL from within media site HTML callback code?

Kevin

Well-known member
#1
OK, this may seem like a silly question to some, but what is the easiest way of getting the current page URL from within PHP code in a media site HTML callback?

I know I can use buildPublicLink to create a new XF formatted link but is there a corresponding 'get current public link' for whatever page the media is being shown on instead of using _server variables to build it?:oops:
 

Kevin

Well-known member
#3
Thanks, I was hoping there was already an XF variable defined instead of having to recreate it using the _server variables.

I ended up going with a slightly modified version of this snippet http://stackoverflow.com/a/8891890 and it works exactly as I was hoping it would with my code in question.
 
Top