By Brian Peat on Sunday, 08 March 2015
Posted in Technical Issues
Likes 0
Views 792
Votes 0
I'm trying to sort out where the code is for the Ask button so I can see if i can graft in a popup modal login module instead of sending the user to the login page if they're not logged in.

I'm trying to minimize all the redirects the site does for logins, so a popup makes the most sense. I'm using JFBConnect (not that it matters) and I will likely use uikit's popup function to load a custom module position, but I need to know where to stick the code (I assume some sort of if statement in one of the templates?).
Hello Brian,

I am really sorry for the delay of this reply as it is a weekend for us here.
If you're referring to when the user click on the ask button, that code file is located in

//JoomlaFolder\components\com_easydiscuss\themes\simplistic\searchbar.php
//LINE 56 - 60

<?php if( $acl->allowed( 'add_question' ) && $system->config->get( 'layout_toolbarcreate' ) ){ ?>
<a class="btn btn-<?php echo $system->config->get('layout_ask_color'); ?> btn-ask pull-left" href="<?php echo DiscussRouter::getAskRoute( $categoryId );?>"><?php echo JText::_( 'COM_EASYDISCUSS_OR_ASK_A_QUESTION' );?></a>
<?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::getRegistrationLink();?>"><?php echo JText::_( 'COM_EASYDISCUSS_OR_ASK_A_QUESTION' );?></a>
<?php } ?>

·
Sunday, 08 March 2015 09:18
·
0 Likes
·
0 Votes
·
0 Comments
·
You don't need to apologize. It was the weekend so I didn't expect a quick response. Compared to Yootheme's support (which is non existent most of the time), you guys are amazing

thanks!
·
Monday, 09 March 2015 08:44
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Brian Peat,

Thanks for your compliment
Let us know if you need further assistance in the future.
·
Monday, 09 March 2015 11:32
·
0 Likes
·
0 Votes
·
0 Comments
·
Yep, this worked. I ended up hacking in a uikit popup with a login module into it. Works great
·
Tuesday, 17 March 2015 11:45
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Brian,

Thanks for updating us back. Please make sure you backup this file as it will get override when you update EasyDiscuss. By the way, you can do template override for this file so that your customization won't get replaced. You can refer to this documentation. If you have anymore question, please do not hesitate to ask us.

Thanks and have a nice day ahead.
·
Tuesday, 17 March 2015 12:21
·
0 Likes
·
0 Votes
·
0 Comments
·
Yep, I'm already using my own template, so it won't get overwritten.

thanks!
·
Tuesday, 17 March 2015 21:16
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Brian Peat,

Thanks for getting back to us.

I will mark this thread as resolved and lock it to avoid any confusions in the future, but if you need any help please feel free to start a new thread in our forums.
·
Wednesday, 18 March 2015 00:11
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post