*

heebeha

  • **
  • 60
  • Me
Anyone know how I can set the logged in users home page to the users profile page?

Example:
http://datingsite.com/showprofile.php?id=293

I cant figure out how to code the homepage.tpl site so it shows the logged in users profile. 

Thank in advance for your help.  I'm sure this is a simple task I am just overlooking something.
How to make the homepage after login to the users profile page

*

Pharg

  • *****
  • 2,065
  • osDate Version: osDate Evo v1.0
Re: How to make the homepage after login to the users profile page?
« Reply #1 on: May 09, 2015, 10:43:27 PM »
Hi heebeha,

Your example doesn't show anything to what you want to do.
Are you trying to put the profiles on the homepage or do you want to show who's online now there?
Regards,
Pharg ( Phill )

REMEMBER: ALWAYS BACKUP BEFORE YOU MAKE ANY CHANGES!!

osDateEvo v1.0 | PHP: 5.3.42 & PHP: 5.6.18 | MySQL: 5.5.35

*

heebeha

  • **
  • 60
  • Me
Re: How to make the homepage after login to the users profile page?
« Reply #2 on: May 10, 2015, 04:28:30 PM »
The logged in users Profile Page.  It can be found after login by the link View Profile.  I want them to see their profile page after login as the homepage so they can update it.

A screenshot is attached.  I want this page to be the default homepage after user login.
Any help would be greatly appreciated.


*

Pharg

  • *****
  • 2,065
  • osDate Version: osDate Evo v1.0
Re: How to make the homepage after login to the users profile page?
« Reply #3 on: May 10, 2015, 10:35:33 PM »
Hi heebeha,

That probably can be done but it will cause all other issues like all the pages that render on the homepage, I don't see the point in moving it to homepage as your members wont want to see their own profile all the time, they will want to see other people online.

Sorry but I can't help in this one.
Regards,
Pharg ( Phill )

REMEMBER: ALWAYS BACKUP BEFORE YOU MAKE ANY CHANGES!!

osDateEvo v1.0 | PHP: 5.3.42 & PHP: 5.6.18 | MySQL: 5.5.35

Re: How to make the homepage after login to the users profile page?
« Reply #4 on: May 11, 2015, 02:07:38 AM »
It can be done but it would take some time to do it and I'm not up for it. You would need to change your index.php file to direct to you new showprofile tpl file instead of the homepage tpl and then create a new php file such as controlpanel.php that directs to you original index.tpl file.

*

heebeha

  • **
  • 60
  • Me
Re: How to make the homepage after login to the users profile page?
« Reply #5 on: May 11, 2015, 11:14:21 PM »
Isn't there a way to simply set the homepage after login to something like this: /showprofile.php?id={$smarty.session.UserId}

Seems a simple task but I cant get it to work that way.  I am only able to set it as a link....

What about a redirect code.  Is that possible?




*

heebeha

  • **
  • 60
  • Me
Re: How to make the homepage after login to the users profile page?
« Reply #6 on: May 11, 2015, 11:23:47 PM »
I figured it out in case anyone else want to use this.  You can redirect to any page after user login using the below script I created.  Add to you homerpage.tpl file

{elseif $smarty.session.UserId > 0 }
<script type="text/javascript">
location.replace('http://yourdomain/showprofile.php?id={$smarty.session.UserId}');
</script>

Re: How to make the homepage after login to the users profile page?
« Reply #7 on: May 11, 2015, 11:45:12 PM »
That's cool. 8) How do people get back to the home page if it keeps redirecting back to their profile?

*

heebeha

  • **
  • 60
  • Me
Re: How to make the homepage after login to the users profile page?
« Reply #8 on: May 12, 2015, 03:58:20 PM »
That will be their homepage a new page should be created if you want your users to see the obnoxious homepage with all those profiles on it.  Most of my users don't want that mess but I did create one anyway and named it welcome because you asked for it

Create a copy of the index.php file and name it welcome.php
Create a copy of the original homepage.tpl file and name it welcome.tpl
Change this line in the new welcome.php file   $t->assign('rendered_page', $t->fetch('homepage.tpl') );
to   $t->assign('rendered_page', $t->fetch('welcome.tpl') );

Add the link to your menu welcome.php and name it what ever you like ex. Welcome

*

Pharg

  • *****
  • 2,065
  • osDate Version: osDate Evo v1.0
Re: How to make the homepage after login to the users profile page?
« Reply #9 on: May 12, 2015, 10:24:50 PM »
Hi heebeha,

Nice work and if it works for you and your happy with it, then that's awesome.


Regards,
Pharg ( Phill )

REMEMBER: ALWAYS BACKUP BEFORE YOU MAKE ANY CHANGES!!

osDateEvo v1.0 | PHP: 5.3.42 & PHP: 5.6.18 | MySQL: 5.5.35

Re: How to make the homepage after login to the users profile page?
« Reply #10 on: May 12, 2015, 11:19:21 PM »
Good work it looks like you got the hang of it. You can still make use of those so called obnoxious pages by making a menu just for each one of them to give your members more options. As seen in the attached snap shot I have a top menu for each one and the home page is just stats with flashchat running inside of it.