By Tran Tuan on Tuesday, 10 December 2013
Posted in General Issues
Likes 0
Views 1.2K
Votes 0
I've just tried EasyDiscuss 3.2 RC2 and found something that could be considered as a business logic issue.

Not-Yet-Login users, as clicking "or Ask a Question", should be redirected to joomla login page instead of registration page. In case the user has no account, the joomla login page already provides its registration link.

It is also highly appreciated that a lot of bugs having been appearing in version 3.1 have been fixed in this release!
Hello Tran,

Ah, I see. You need to edit the file /components/com_easydiscuss/themes/simplistic/searchbar.php and at line 64 locate the codes below,


<a class="btn btn-<?php echo $system->config->get('layout_ask_color'); ?> btn-ask pull-left" href="<?php echo DiscussHelper::getRegistrationLink();?>"><?php echo JText::_( 'COM_EASYDISCUSS_OR_ASK_A_QUESTION' );?></a>


Replace it with,


<a class="btn btn-<?php echo $system->config->get('layout_ask_color'); ?> btn-ask pull-left" href="<?php echo DiscussHelper::getLoginLink();?>"><?php echo JText::_( 'COM_EASYDISCUSS_OR_ASK_A_QUESTION' );?></a>
·
Tuesday, 10 December 2013 22:16
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Tran,

Hm, not too sure if I understand you here. Do you mean you want EasyDiscuss to redirect to a login page when the user does not have access to write a new discussion page?
·
Tuesday, 10 December 2013 19:08
·
0 Likes
·
0 Votes
·
0 Comments
·
I mean:
if (isGuest){
redirect to login page
}else{
authorize if she/he can post a question
}

The current behavior is to redirect the user to registration page when she/he clicks on "or Ask a Question" button (which is on the right of the search box).

I hope the above is clear...
·
Tuesday, 10 December 2013 20:56
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi guys, I'm having this issue too but the above fix isn't working for me, possibly because I'm also using JFBConnect as the main registration/login component.

Actually, I preferred the old route, whereby the 'Ask a Question' button was not even visible to users who, even if registered, weren't logged in.

Any chance of:

a) a revised fix as above, and
b) a new option to hide the button from un logged-in users?

Thanks, Russ
·
Wednesday, 11 December 2013 19:18
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Russ,

We can't actually please everyone unfortunately (I wish we could) but we need to stick to a standardized option If you apply the hacks above, where are you being redirected to?
·
Wednesday, 11 December 2013 20:53
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks, Mark. It works!
Anyway, I don't agree with what you call "standardized option".
Referring to some big websites (e.g stackoverflow, help.openerp.com, etc), the common behavior should be redirecting the user to a page that she/he can login instead of the registration page.
·
Sunday, 15 December 2013 21:42
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Tran Tuan,

Thanks for the heads up on this. We shall check this out Hope this helps.

Thanks!
·
Monday, 16 December 2013 01:51
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi guys, 3 things further this one....

1) Happy New Year

2) The code fix above wants to take my site to a url "http://log-in.html/" which is obviously a default somewhere and doesn't work. Can you explain how I can change the destination url of getLoginLink please?

3) This was maybe missed in my earlier post in this thread but I really preferred it when the 'Ask a Question' button was actually only visible to registered/loggedin users. Any chance of bringing this feature back please?

Many thanks as always, Russ
·
Friday, 03 January 2014 00:36
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Russell,

Sorry for late reply to this,
I already replied on your post http://stackideas.com/forums/ask-question-login-registration-redirect, please have a check.
·
Friday, 03 January 2014 19:18
·
0 Likes
·
0 Votes
·
0 Comments
·
Yep, cheers - we're now running TWO threads!!!! lol. Let's call this one closed and continue at http://stackideas.com/forums/ask-question-login-registration-redirect
·
Friday, 03 January 2014 21:32
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks for updating Russell.
·
Saturday, 04 January 2014 04:24
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post