View Full Version : IF URL Contains 'X' Code?
howarde
01-20-2014, 01:05 PM
Is there a way to retrieve the URL in VB code similar to a php function that would be like:
<?php if ($_SERVER['REQUEST_URI']=='/gallery/' ) {#Do What I Need Done;} ?>
Basically, I need to insert an ad zone, in the gallery, which in forums, I just use
vb:if condition="$GLOBALS[forumid]== foo"
But since /gallery isn't a forum and doesn't have a forum id... what should I use to find if the URL contains /gallery, any suggestions??
ozzy47
01-20-2014, 01:08 PM
This is still not the thread for the gallery mod, as I suggested, post it in the mods thread, you may have more luck there. :)
howarde
01-20-2014, 01:12 PM
Could you guys make it any more difficult? How about a link to the right forum, since you can't move the thread?
As I said in the other thread you wouldn't move, this isn't the VBULLETIN GALLERY.
--
I'm not asking a complex question.
All I want to know is:
Is there a vb variable for the URL similar to the php function SERVER 'REQUEST_URI' (brackets removed)
This isn't a request for a mod, or anything complex. It's almost a yes/no question.
ozzy47
01-20-2014, 01:42 PM
So you want a link to the thread for the modification you are needing help with? How am I supposed to know which of the multiple gallery mods you are trying to work with.
Sure there is a similar thing in vB:
<vb:if condition="$_SERVER['REQUEST_METHOD'] != 'POST'">
But it all depends on where and what you are doing, if the variable is registered. That is why you need to ask in the modification thread.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.