Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Questions and Supports (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=18)
-   -   Redirect after login (http://www.mysidiaadoptables.com/forum/showthread.php?t=4041)

Empress_Swanbottom 03-09-2013 05:09 PM

Redirect after login
 
I was wonder if there was a way to make it so that after someone logs in, the page will redirect to the home page after say... a five second wait. I found things for redirect with wait, but they all say that you can't have anything in the PHP file or else it won't work. Can anybody help me?

Hall of Famer 03-09-2013 09:25 PM

umm what error messages do you get after redirecting users? Id like to see what I can do to help you with this issue.

Hedgen 03-09-2013 09:45 PM

I edited login.php right after this comment: // Validation succeeded, now begins the actual login procedure

to include this html code:
HTML Code:

<head>
<meta http-equiv='refresh' content='5; URL=http://touhouables.elementfx.com/index.php'>
</head>

so my new php code is this:

PHP Code:

// Validation succeeded, now begins the actual login procedure
         
         
$mysidia->page->settitle($lang->success_title);
         
$mysidia->page->addcontent("<head>
                         <meta http-equiv='refresh' content='5;
                          URL=http://touhouables.elementfx.com/index.php'>
                          </head>
                          Welcome back 
{$mysidia->input->post("username")}{$lang->success}");
         
         
$mysidia->user->login($mysidia->input->post("username")); 

Change "URL=http://touhouables.elementfx.com/index.php" to your site, and "content='5;" to how long you want it to wait in seconds.

Edit: I'm sure this will also work for the log off page, but haven't tried yet. I'll try right now though I'm sure it will work.

Edit2: For logout.php, I edited:

PHP Code:

  $mysidia->page->addcontent($lang->default); 

to

PHP Code:

  $mysidia->page->addcontent("<head>
            <meta http-equiv='refresh' content='5; URL=http://touhouables.elementfx.com/index.php'>
            </head>"
$lang->default); 

and it worked.

Empress_Swanbottom 03-09-2013 09:57 PM

Thanks so much, Hedgen!!

Hedgen 03-09-2013 10:10 PM

Anytime :smile: Now to keep trying to figure out how to get the profile picture to show up XD

Micolai 06-02-2020 12:07 AM

I'm a little confused where exactly in login.php I add the code to or what bit is changing? I'm wanting the logged in user to be redirected to their profile page.

SilverDragonTears 06-02-2020 11:42 AM

Then you would just change the refresh url to yoursite.com/myadopts

SilverDragonTears 06-02-2020 11:45 AM

ohhh I see what you're saying. These are all old posts and the new Mys 1.3.4 is different. I'm having issues with it myself.

Micolai 06-02-2020 02:20 PM

Quote:

Originally Posted by SilverDragonTears (Post 37484)
ohhh I see what you're saying. These are all old posts and the new Mys 1.3.4 is different. I'm having issues with it myself.

Yes, exactly. I'm running into this issue quite a bit lol.

kristhasirah 06-03-2020 08:40 AM

if you still have problems with the redirec you can go here:
http://mysidiaadoptables.com/forum/s...ead.php?t=4761


All times are GMT -5. The time now is 08:49 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.