The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
if condition depending on url or address
Hi everyone,
I'm wondering if there is anyway to set an if condition depending on page url or address and on the last part of url, like: when user go to usercp and go to edit his signature I want him to get notification on the header or change the header or something like that the links are usually like this Code:
http://www.xxxxx.com/forum/profile.php?do=buddylist http://www.xxxxx.com/album.php?u=1 http://www.xxxxx.com/private.php?do=newpm http://www.xxxxx.com/forumdisplay.php?f=10 1- set a condition depending on the last part - which is in red- of the link. 2- set a condition depending on the whole link. is there anyway to do that? appreciate your help best wishes |
#2
|
||||
|
||||
I don't understand what you're trying to do there.
|
#3
|
|||
|
|||
OK, let me say it in this way,
I have some customized header, so I want to change depending on the page that user going to visit, so some pictures will change in the main header, and some colors will change too. so, I want to do that according to the url of the page that user visit. or according to the last part of the the url like what in red in the first post in this thread. so, I want to do it in this way, <if condition (the url is:www.whatever)> show this header</if> or <if condition (the last part of the url is: (/?do=buddylist or whatever)>show this or do this</if> so I want to set a condition for whatever according to and depending on url or part of it. I hope I could explain it clear enough. and sorry for my poor English. so, is there any way to do something like that? thanks again |
#4
|
||||
|
||||
If do=buddylist is in the url of the page you want to post your message on, have you tried just doing:
HTML Code:
<if condition="$_REQUEST['do'] == 'buddylist'> whatever </if> |
#5
|
|||
|
|||
ok, I'll give that a try,
and what about the whole url? I mean like in this thread's url Code:
<if condition = the whole url is "https://vborg.vbsupport.ru/showthread.php?t=202215"> whatever </if> |
#6
|
||||
|
||||
Not exactly. You can do a condition on (THIS_SCRIPT == 'showthread') or a condition on ($thread[threadid] == 202215) though.
|
#7
|
|||
|
|||
Well, thanks Lynne. I used (THIS_SCRIPT) before and I think the ($_REQUEST ['do'] == whatever) will work for now.
really appreciate your help thanks a lot |
#8
|
||||
|
||||
You can actually find the request string (everything after the domain) using $_SERVER['REQUEST_URI'].
|
#9
|
|||
|
|||
Thanks for your reply,
but I have a dumb question though : how could I use that exactly? can you give an example please? |
#10
|
||||
|
||||
Code:
<if condition="$_SERVER['REQUEST_URI'] == '/forum/member.php?u=1'"> |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|