MyBB Community Forums

Full Version: url changed?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I've been using the below code with earlier versions of MyBB and it seemed to work fine. But once I upgraded to 1.2 it doesn't seem to work anymore. I was wondering if someone could help me generate a fix for my problem. Thanks in advance.

<a href=\"http://www.mysite.com/member.php?action=logout&uid=".$mybb->user['uid']."&url=http://www.mysite.com/\">Logout</a>

btw, the area that's not working is the redirect. &url= use to tell it the next page where to redirect to. I need this ability again so if anyone could help me out that would be great.
Use this
<a href=\"http://www.mysite.com/member.php?action=logout&uid=".{$mybb->user['uid']}."&url=http://www.mysite.com/\">Logout</a>
If I use {$mybb->user['uid']} instead of what I have I get the below error:

Quote:Parse error: syntax error, unexpected '{' in /home/index.php on line 18
Maverickb7 Wrote:
<a href=\"http://www.mysite.com/member.php?action=logout&uid=".$mybb->user['uid']."&url=http://www.mysite.com/\">Logout</a>

btw, the area that's not working is the redirect. &url= use to tell it the next page where to redirect to. I need this ability again so if anyone could help me out that would be great.

There is no default setting to allow url as an part of that url.
That would have to be an mod or something.

xiaozhu Wrote:Use this
<a href=\"http://www.mysite.com/member.php?action=logout&uid=".{$mybb->user['uid']}."&url=http://www.mysite.com/\">Logout</a>
That's only for templates. That code would uhm result in an error.
Assuming that he uses it for templates? >_>

Edit:// Ops, didn't know he uses it for a file.
Then there would be no ". and ." Toungue
Yeah, I'm using it within a file thats located outside my forum directory. It use to work for me when I had the previous version of MyBB. Anyone know how I can modify 1.2 to allow this?
That depends on what the file holds.
There are alot of changes to 1.2
global.php is included. What would be required from a fresh install of 1.2 to make this work for me? Thanks for helping me out.
If the redirect is the only problem your having than remove the url part from the link and put in in the following:

<input type="hidden" name="url" value="http://rct3x.net/index.php" />

Also, with this, you will need to incase it within a form
Pages: 1 2