Editing User Area

Rate this topic: Evaluations: 2, 3.50 on the average.Evaluations: 2, 3.50 on the average.Evaluations: 2, 3.50 on the average.Evaluations: 2, 3.50 on the average.Evaluations: 2, 3.50 on the average.Evaluations: 2, 3.50 on the average.3.50 out of 6 based on 2 vote(s)
GK User
Tue Nov 25, 2014 10:14 pm
Reply with quote
Report this post
Hello there, I would like to change the User Area module in order that, once the user has proceed with the log in, the "Your Account" buttom redirects to the user account of jomsocial (that, of course, is already installed in the website)..

thanks in advance
User avatar
Senior Boarder

GK User
Thu Nov 27, 2014 11:23 am
Reply with quote
Report this post
Hello,

You can change the login URL in the template settings to JomSocial page.
User avatar
Administrator

GK User
Fri Nov 28, 2014 11:41 am
Reply with quote
Report this post
Sorry Dziudek, I didn't make myself clear, bad english! :)

As you perfectly know, on the top right corner of the page, there is the login button and, once the user clicks there and lon into the site, this button changes in "Your Account" (see the attached image).

I would like that, clicking on the "Your Account" button, the user is redirected into his jomsocial profile.
User avatar
Senior Boarder

GK User
Mon Dec 01, 2014 5:19 pm
Reply with quote
Report this post
But did you tried to apply my changes? Because it should work in your case.
User avatar
Administrator

GK User
Wed Dec 03, 2014 12:34 pm
Reply with quote
Report this post
Yes, I changed the login url inserting the correct url for the login page.

The problem comes after the login procedure, since the same button turns from "login" to "Your account".

If I put the profile url as login url in template settings, when i click on the login button i receive an error message, since the profile page can be viewed only by registered or logged in users.

it would be perfect to have the chance to modify the link for the login and the link for the "your account" options.
User avatar
Senior Boarder

GK User
Wed Dec 03, 2014 2:44 pm
Reply with quote
Report this post
May I send you the admin access details?
User avatar
Senior Boarder

GK User
Wed Dec 03, 2014 4:19 pm
Reply with quote
Report this post
Yes you can, but I will be able to edit the template files directly from your back-end using the template editor?
User avatar
Administrator

GK User
Wed Dec 03, 2014 4:53 pm
Reply with quote
Report this post
I suppose you can..

Now i'll send you the details via pm
User avatar
Senior Boarder

GK User
Thu Dec 04, 2014 8:00 am
Reply with quote
Report this post
In the layouts/default.php file I've replaced the following fragment:

Code: Select all
<?php if($this->API->get('login_url', '') != '') : ?>
<a href="<?php echo str_replace('&', '&amp;', ($userID == 0) ? $this->API->get('login_url', 'index.php?option=com_users&view=login') : str_replace('&tmpl=blankpage', '', $this->API->get('login_url', 'index.php?option=com_users&view=login'))); ?>" id="gkLogin"><?php echo ($userID == 0) ? JText::_('TPL_GK_LANG_LOGIN') : JText::_('TPL_GK_LANG_LOGOUT'); ?></a>
<?php endif; ?>


to:

Code: Select all
<?php if($this->API->get('login_url', '') != '') : ?>
<a href="<?php echo str_replace('&', '&amp;', ($userID == 0) ? 'index.php?option=com_users&view=login' : str_replace('&tmpl=blankpage', '', $this->API->get('login_url', 'index.php?option=com_users&view=login'))); ?>" id="gkLogin"><?php echo ($userID == 0) ? JText::_('TPL_GK_LANG_LOGIN') : JText::_('TPL_GK_LANG_LOGOUT'); ?></a>
<?php endif; ?>


So now the login url option will set only the "My account" link, and the "Log in" link will be always the same and will redirect tot he standard login page.
User avatar
Administrator

GK User
Thu Dec 04, 2014 9:57 am
Reply with quote
Report this post
The situation is not changed.

Now, instead of the cute popup login page, there user is redirected to the classical login page; and when clicking on the "My account" button, the user is not redirected to the jomsocial profile, but simply on a page where he can do the log out (exactly as before).
User avatar
Senior Boarder

GK User
Thu Dec 04, 2014 10:01 am
Reply with quote
Report this post
Did you enabled a module on the login module position?

Regarding the second issue - you have to specify your own login url in the template settings, because now it uses the default value.
User avatar
Administrator

GK User
Thu Dec 04, 2014 10:59 am
Reply with quote
Report this post
Module Issue: -> i think it's simply the default module of your template that, with the previous code, worked perfectly and still now, deleting the new code and replacing it with the previous code, works perfectly.

"My Account" link issue -> I still don't understand where and how I can change this setting, since in the template feature there is only the link for the login url, that means I can change the behaviour of the "login" button, but not the behaviour of the "My account" button.
I would like that, once the user has logged in, clicking in the "My account" button (that, was the "login" button before the login procedure), he is redirected in the jomsocial page.
User avatar
Senior Boarder

GK User
Thu Dec 04, 2014 4:19 pm
Reply with quote
Report this post
Please check your website now.
User avatar
Administrator

GK User
Thu Dec 04, 2014 11:16 pm
Reply with quote
Report this post
Perfect!

Now I understand my mistake! Thank you again! :D
User avatar
Senior Boarder

GK User
Thu Dec 04, 2014 11:25 pm
Reply with quote
Report this post
Is it possible to set this url also with the university template? :huh:
User avatar
Senior Boarder

GK User
Fri Dec 05, 2014 1:20 pm
Reply with quote
Report this post
It needs in fact the same changes as the News 2 template - you are removing the option value for the case when user is not logged, and then login url param is used only for the logged in users.
User avatar
Administrator

GK User
Fri Dec 05, 2014 2:34 pm
Reply with quote
Report this post
but is seems that in the "features" tab of the university template there isn't the "URL login" option...
User avatar
Senior Boarder

GK User
Mon Dec 08, 2014 8:44 am
Reply with quote
Report this post
Sorry, my mistake - in this template the log in button is created from menu item which has "gkLogin" class, so it is not possible.
User avatar
Administrator

GK User
Sat Jul 04, 2015 12:42 am
Reply with quote
Report this post
Hi
Also I can not change the link 'My Profile' after logging in.
I even tried using a redirect via .htaccess but nothing.
It can be so difficult?
thanks for the help that you give me
User avatar
Fresh Boarder

GK User
Sun Jul 05, 2015 8:53 am
Reply with quote
Report this post
@agostino74 - If I correctly understand - please try to change the bolded fragment:

<a href="<?php echo str_replace('&', '&amp;', ($userID == 0) ? $this->API->get('login_url', 'index.php?option=com_users&view=login') : str_replace('&tmpl=blankpage', '', $this->API->get('login_url', 'index.php?option=com_users&view=login'))); ?>" id="gkLogin"><?php echo ($userID == 0) ? JText::_('TPL_GK_LANG_LOGIN') : JText::_('TPL_GK_LANG_LOGOUT'); ?></a>
User avatar
Administrator


cron