The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
[SOLVED] How to get the Current URL Page Location
Basically what I had on a vBulletin 3 skin was:
PHP Code:
Problem is none of the $_SERVER bit's work in vBulletin 4 templates. I'm wondering if their's a variable like {vb:raw url} or something that I could use to get the current page url address. That or any other suggestion on how to do it from just editing the template would be great. --------------- Added [DATE]1272257252[/DATE] at [TIME]1272257252[/TIME] --------------- I stumbled across {vb:raw relpath} while working in who's online where it's used to refresh the page your on. I managed to get something to work with this for anyone who comes across this in Google with a similar problem |
#2
|
|||
|
|||
U Sir are a GOD
What an amazing Post i was looking for the current url code for 3 hours now and finally i found it Thanks alot ========= for all those looking for VBulletin Current Page Url Code (just to make sure google gets it now) the code is {vb:raw relpath} |
#3
|
||||
|
||||
Thanks, `{vb:raw relpath}` is the best answer. I found this when I searched for "current URL in vBulletin templates".
The variable spits out the current page like `$_SERVER['PHP_SELF']`, without anything else. If you are on the Forum homepage, for example, it won't spit out anything. Here is how I used this code to submit an email signup form back to the current page on our site: Code:
<form action="/forum/{vb:raw relpath}#footer" ... |
#4
|
|||
|
|||
This solution is what I was looking for... brilliant idea. Big Thanks
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|