Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 26 Apr 2010, 01:33
Mr Happy Mr Happy is offline
 
Join Date: Aug 2009
[SOLVED] How to get the Current URL Page Location

Basically what I had on a vBulletin 3 skin was:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

and it was a quick link that would return you to the default skin.

Problem is none of the $_SERVER bit's work in vBulletin 4 templates. I'm wondering if their's a variable like {vb:raw url} or something that I could use to get the current page url address.
That or any other suggestion on how to do it from just editing the template would be great.

--------------- Added 26 Apr 2010 at 04:47 ---------------

I stumbled across {vb:raw relpath} while working in who's online where it's used to refresh the page your on. I managed to get something to work with this for anyone who comes across this in Google with a similar problem

Last edited by Mr Happy; 26 Apr 2010 at 04:47. Reason: Auto-Merged DoublePost
Reply With Quote
  #2  
Old 11 Sep 2010, 07:28
dr.tawy dr.tawy is offline
 
Join Date: Feb 2010
U Sir are a GOD

What an amazing Post

i was looking for the current url code for 3 hours now and finally i found it

Thanks alot


=========

for all those looking for VBulletin Current Page Url Code (just to make sure google gets it now)

the code is

{vb:raw relpath}
Reply With Quote
  #3  
Old 22 Mar 2011, 22:01
jayrobinson's Avatar
jayrobinson jayrobinson is offline
 
Join Date: Mar 2011
Real name: Jay Robinson
Thanks, `{vb:raw relpath}` is the best answer. I found this when I searched for "current URL in vBulletin templates".

The variable spits out the current page like `$_SERVER['PHP_SELF']`, without anything else. If you are on the Forum homepage, for example, it won't spit out anything. Here is how I used this code to submit an email signup form back to the current page on our site:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
  #4  
Old 11 Jun 2013, 15:45
fxdigi-cash fxdigi-cash is offline
 
Join Date: Jul 2012
This solution is what I was looking for... brilliant idea. Big Thanks
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 12:53.

Layout Options | Width: Wide Color: