The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Which Variable contains the current URL?
Hi,
I want to implement small language-buttons (english, german). Therefor I need the variable that contains the current URL. I want to write it like this: HTML Code:
<a href="[CURRENT_URL]?langid=3"><img src="..." /></a> |
#2
|
||||
|
||||
That is not possible without a plugin, the current URL is a PHP variable which can't be inserted directly into templates. You might be able to do something using the breadcrumb variables though or another method that escapes me for the moment.
Edit: If all you need is the root of the forum URL (i.e. http://www.vbulletinorg/forum) it's $vboptions[bburl]. |
#3
|
||||
|
||||
Wouldn't it be $_SERVER[REQUEST_URI] ? One potential issue is that you can't tell in the templates if the URL already has parameters.
|
#4
|
|||
|
|||
hm shit...this suggested var would be a nice improvement !!
|
#5
|
||||
|
||||
Okay, I just tested it. You can use
Code:
$scriptpath Code:
http://domain.com$_SERVER[SCRIPT_NAME]?$_SERVER[QUERY_STRING] |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|