By Russell Moore on Friday, 03 January 2014
Posted in General Issues
Replies 5
Likes 0
Views 1.2K
Votes 0
Hi guys, this is a quick addon to an earlier thread, http://stackideas.com/forums/easydiscuss-3-2-rc2-not-yet-login-users-should-be-redirected-to-login-page. I posted a query on this yesterday but it's since been marked 'resolved' so you might have missed it. My query is posted again below...

"Hi guys, 3 things further on 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
Hello Russell Moore,

Happy New year too
I'm really sorry that late reply of this post and miss reply on your previous post,
I'm confusing of your question 2 & 3, if i hack "when the 'Ask a Question' button was actually only visible to registered/logged users.", so you're no need to solve question number 2, because the "Ask a Question" button already invisible when the public user viewing your site. Correct me if i getting wrong meaning on your previous post.

Also, Is it possible for you to provide us with the Joomla backend and FTP access so we can hack for you?
·
Friday, 03 January 2014 19:16
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Arlex, thanks for getting back to me

Since updating to j3.2 & EasyDiscuss 3.2 the big blue 'Ask a Question' button is now visible to ALL site viewers, whether registered & logged in or not. This is what has raised the whole 'redirect' issue for me in the first place. So, perhaps going at it from a different direction:

1) Could you guys consider bringing back the feature where the Ask button only appears to logged in users as in prvious versions? (or is there already a setting option that I've overlooked?)
2) If not (or in the short term), could you advise how I might amend the earlier suggested hack (i.e. to amend the file /components/com_easydiscuss/themes/simplistic/searchbar.php at line 64) so that the destination url of getLoginLink isn't the current 'http://log-in.html/'

I have 4 near-identical sites so would prefer that you give me the info rather than ask you to perform a site-specific hack but, if you want to have a quick look under the hood the admin details are posted below. Cheers, Russ
·
Friday, 03 January 2014 19:48
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Russell,

I am really sorry for the delay of this reply as it is a weekend for us here.
Yes, actually you looked at earlier suggested hack from previous post, that is work. But i have try to remove all the code from this file JoomlaFolder/components/com_easydiscuss/themes/simplistic/searchbar.php , it seems like your Easydiscuss still appear the search bar, actually it should not suppose be there when i remove all the code from searchbar.php file. That's strange, could you can check is it open the correct folder under this website http://www.countydownspectator.com/ ?

If you found out which is correct folder under your website ( http://www.countydownspectator.com/ ) while you remove all the code from this file ( JoomlaFolder/components/com_easydiscuss/themes/simplistic/searchbar.php ), it should not appear the search bar in your Easydiscuss.
Then revert back all the code and follow at the earlier suggested hack modify this line LINE 64 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 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>


OR =>
When you set the public user group Add a question "NO", then the Ask button will disappear in your site. Follow the code below :
LINE 63

<?php } else if( $system->my->id == 0 ) { ?>
<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>
<?php } ?>
</div>

Replace with

<?php } else if( !$acl->allowed( 'add_question' ) ) { ?>
<?php } ?>
</div>

Hope this help.
·
Sunday, 05 January 2014 00:41
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Arlex, many thanks for your response.

I think we're getting to the nub of it now - the 'Add new question' option in the ACL control HAS (always) been set to 'No' for both the Public and Guest groups, but during the update to v.3.2.9248 this has stopped working. Just a wee bug then to be ironed out for the next release.

Your hack for Line 63 however HAS worked so for now my sites all seem to be working again as intended.

So, thanks again for the fix and hopefully the bug will be squished for the next release.

Cheers mate, Russ
·
Monday, 06 January 2014 19:21
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Russell Moore,

You're welcome, actually that was the new feature in the current system, because for the guest also can see the "Ask a question" button, when guest click that button, then it will redirect to registration page, let guest to know they should register first become the registered user then only can ask a question from forum.
·
Monday, 06 January 2014 19:56
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post