Helpful Information
 
 
Category: vB4 Programming Discussions
How to show REQUEST URI

Hello there,

I'm interested how to show in a template my URL address (REQUEST URI)

$_SERVER['SERVER_NAME']
$_SERVER['REQUEST_URI']


thanks.

AFAIK this information is not available in predefined variables. You need to create a plugin that saves that information into variables, then register/preregister them to be available in the template.

See: http://www.vbulletin.org/forum/showthread.php?t=228078

I saw that code before, but i'm not able to show what i need...

Where exactly do you want to show it? Which template?

in bbcode_code

Plugin at hook bbcode_create
$this_uri = $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
vB_Template::preRegister('bbcode_code',array('this_uri' => $this_uri));


In the template call as
{vb:raw this_uri}

Not tested, but should work.

Yes , is working, but if i have multiple code tags it's showing only at one ( first)

I can't think of a way around that atm, sorry.










privacy (GDPR)