| Login redirection- a solution 4 Years, 10 Months ago |
|
Like a few people i had the problem of when a user clicks on login on the forum, it redirects to the front page. My site login is set with Community Builder and in the top module so i didn\'t want the redirection to go to the front page.
After much searching I have found where the login link is located (and the register link):
/com_fireboard/template/default/plugins/profilebox/profilebox.php - starts about line 223.
the login is set to \'index.php\' by default, there are 2 login links (2nd another a couple of lines down from the first) so I changed both. Change this to the URL you want the login to go to.
As my login was in a module and Community Builder i had to also create a content page called \'login\'. Then I made a copy of the CB Login module and set it to a position that i don\'t use in my template - for me I set \'user 8\'. Next step was to put this code in my content page: {mosloadpositon user8} - this puts the CB login into a content page. I copied the URL for this page and inserted it to the Fireboard file (above)- it works.
Please note: I\'m not an expert but it did the trick for me!!
|
|
|
| Login redirection- a solution 4 Years, 10 Months ago |
|
Like a few people i had the problem of when a user clicks on login on the forum, it redirects to the front page. My site login is set with Community Builder and in the top module so i didn\'t want the redirection to go to the front page.
After much searching I have found where the login link is located (and the register link):
/com_fireboard/template/default/plugins/profilebox/profilebox.php - starts about line 223.
the login is set to \'index.php\' by default, there are 2 login links (2nd another a couple of lines down from the first) so I changed both. Change this to the URL you want the login to go to.
As my login was in a module and Community Builder i had to also create a content page called \'login\'. Then I made a copy of the CB Login module and set it to a position that i don\'t use in my template - for me I set \'user 8\'. Next step was to put this code in my content page: {mosloadpositon user8} - this puts the CB login into a content page. I copied the URL for this page and inserted it to the Fireboard file (above)- it works.
Please note: I\'m not an expert but it did the trick for me!!
|
|
|
| Re:Login redirection- a solution 4 Years, 10 Months ago |
|
Thanks Buffy,
This saved me a lot of searching :cheer:
do you know by any change what file to adjust to make sure that once logged in there will be no redirection to the homepage, but instead to the forumpage ?
thx
|
|
|
| Re:Login redirection- a solution 4 Years, 10 Months ago |
|
Hi
Go the the login module in your administrator > Modules > \'site modules\' there will be parameters to set- set the \'login redirection\' to the page you want it to go to after the user has logged in.
Good luck:laugh:
|
|
|
| Re:Login redirection- a solution 4 Years, 10 Months ago |
|
In my case, I use a LOGIN module for Portal, AND when you login from FB forum, it is logged through com_login.
I modify com_login such as (Joomla 1.0.12)
From com_login components/com_login/login.html.php
You add [u]2 lines below[/u] under line 30: $return = $params->get(\'login\');
[/code]$return = \"index.php?option=com_fireboard&Itemid=xxx\"; //you find your forum\'s id Itemid=xxxx
$return = str_replace( \'&\', \'&\', $return );[/code]
have fun!
|
|
|
| Re:Login redirection- a solution 4 Years, 10 Months ago |
|
This seems a bit [quotekludgey.][/quote] Anyone have a cleaner solution?
The login from Fireboard goes to the frontpage. This makes sense as the code in the profilebox.php file says: [code:1]$loginlink = sefRelToAbs(\'index.php\');[/code:1]
I\'d be happy to change it if I could figure out what I need to change it to. None of my experiments have worked.
|
|
|
| Re:Login redirection- a solution 4 Years, 10 Months ago |
|
Hey viet4777, 2 questions:
1. if you would not make those changes you suggest, but instead replace:
[code:1]input type=\"hidden\" name=\"return\" value=\"...php echo sefRelToAbs( $return ); ...\"[/code:1]
-> I used ..., otherwise I cannot post this code apparently
by
[code:1]input type=\"hidden\" name=\"return\" value=\"index.php?option=com_fireboard&Itemid=xxx\"[/code:1]
That too does the trick for me, but I do not know if this is secure or not ?
2. Why do you need a str_replace for ?
Keep up the good work guys !
|
|
|
| Re:Login redirection- a solution 4 Years, 9 Months ago |
|
Worked for me! Thanks for sharing guys, its greatly appreciated!
|
|
|
| Re:Login redirection- a solution 4 Years, 9 Months ago |
|
[quote]Hey viet4777, 2 questions:
1. if you would not make those changes you suggest, but instead replace:
[code:1]input type=\"hidden\" name=\"return\" value=\"...php echo sefRelToAbs( $return ); ...\"[/code:1]
-> I used ..., otherwise I cannot post this code apparently
by
[code:1]input type=\"hidden\" name=\"return\" value=\"index.php?option=com_fireboard&Itemid=xxx\"[/code:1]
[b]Yes, I did. I use JoomlaXplorer (a Joomla component) for editing the file.[/b]
That too does the trick for me, but I do not know if this is secure or not ?
I am not sure.
2. Why do you need a str_replace for ?
[b]This is two code line taken from a module, it should used for replace &_amp by &.
$return = str_replace( \'&\', \'&_amp;\', $return );[/b].
In this case, do not need this statement.[/quote]
Thanks.
|
|
|
| Re:Login redirection- a solution 4 Years, 9 Months ago |
|
What file needs to be changed?
|
|
|
| Re:Login redirection- a solution 4 Years, 8 Months ago |
|
login.html.php from folder / components / com_login /
[b]edit[/b]:
I added the following right after line 30:
[code:1]$return = \"index.php?option=com_fireboard&Itemid=xxx\"; //you find your forum\'s id Itemid=xxxx
$return = str_replace( \'&\', \'&\', $return );[/code:1]
[i][b]Question1[/b][/i]: Now the user is redirected to the forum after logging in instead of to the index of my website. However, how do I change this for the logout procedure? Using the same code right below the logout section does not do it for me.
[i][b]Question2[/b][/i]: How can I do the same redirection changes for the \"Lost password\" and \"Registration\" sections?
[i][b]Question3[/b][/i]: How do I make my menu show up when using the registration and lost password forms which are show below the menu? I don\'t mean the FireBoard registration and lost password links, but the ones which I have chosen to show below the menu.
Sidenote: the \"Login Redirection URL\" and \"Logout Redirection URL\" from the Login Form in the Site Modules section does not seem to work at all for me.
|
|
|
|