The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
![]()
I have a plug-in that I am hooking from global_start.
I want to call the current URL into the plug-in so that I can parse it and then run an if/then or case on it. I then want to consume the output of the plug-in in the 'header' template. I have a custom nav I am trying to populate based on the URL. Can anyone tell me if vbulletin has a variable available that possesses the current URL in it that we can expose in global_start for these purposes? Appreciate any help in advance. Thanks. --------------- Added [DATE]1215059807[/DATE] at [TIME]1215059807[/TIME] --------------- UPDATED I'm a little closer to this. Inside of /includes/class_core.php I found this class: vB_Registry The api documentation explains that this class exposes a variable called $script. This string is "The URL of the current page, without anything after the '?'" which is exactly what I'm after. Now, how do I get access to that variable ($script) in a plug-in that I am hooking from global_start. Any help is greatly appreciated. Thank You! |
#2
|
||||
|
||||
![]()
Why don't use PHP's pre-defined variables - such as the $_SERVER array?
|
#3
|
|||
|
|||
![]()
Practical example
![]() Code:
$counter_aux=preg_match ( '/subdomain\.domainame\.com/' , $_SERVER['HTTP_HOST']); if($counter_aux<>0){ [whatever you want to do] } |
#4
|
||||
|
||||
![]()
Make sure case is not "counted".
PHP Code:
|
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|