By Pawan on Tuesday, 04 March 2014
Posted in Technical Issues
Replies 9
Likes 0
Views 1.2K
Votes 0
I want to make 'Unanswered" discussion tab load by default on page load. How can I do it?
Hello Pawan,

Go to this file -> JoomlaFolder\components\com_easydiscuss\themes\simplistic\frontpage.index.filters.php
LINE 19

<li class="filterItem<?php echo !$activeFilter || $activeFilter == 'allposts' || $activeFilter == 'all' ? ' active' : '';?>" data-filter-tab data-filter-type="allpost">

Replace with

<li class="filterItem<?php echo $activeFilter == 'allposts' || $activeFilter == 'all' ? ' active' : '';?>" data-filter-tab data-filter-type="allpost">


==========
LINE 57

<li class="filterItem<?php echo $activeFilter == 'unanswered' ? ' active' : '';?>" data-filter-tab data-filter-type="unanswered">

Replace with

<li class="filterItem<?php echo !$activeFilter || $activeFilter == 'unanswered' ? ' active' : '';?>" data-filter-tab data-filter-type="unanswered">
·
Tuesday, 04 March 2014 16:04
·
0 Likes
·
0 Votes
·
0 Comments
·
sorry, I tried on my local host, but it did not work. All posts opens even now by default on page load. Am I missing something?
·
Tuesday, 04 March 2014 17:03
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Pawan,

Is it possible attach this file to us -> JoomlaFolder\components\com_easydiscuss\themes\simplistic\frontpage.index.filters.php , so we can help you check on this.
Also, can we know what theme you are using in your local?
·
Tuesday, 04 March 2014 17:09
·
0 Likes
·
0 Votes
·
0 Comments
·
here is the file.
·
Tuesday, 04 March 2014 17:36
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Pawan,

Hmm, that was strange, because i have copy your attached file paste in my local site, it work fine for me. (Because you did exactly correct that modified the code)
When i load the Easydiscuss frontpage, it will by default to load UNANSWERED tab.
see my video : http://screencast.com/t/HyhzQxeZRBW
·
Tuesday, 04 March 2014 17:52
·
0 Likes
·
0 Votes
·
0 Comments
·
I use Flatt theme, but that should not make any difference I believe.
·
Tuesday, 04 March 2014 19:38
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Pawan,

Sorry for late reply to this,
You can remove above hack, because I'm miss out the Easydiscuss menu type item "Front Page Layout" have a setting for this, check my screenshot : http://screencast.com/t/UxAft3lT
Hope this help.
·
Tuesday, 04 March 2014 23:31
·
0 Likes
·
0 Votes
·
0 Comments
·
That's wonderful. Thanks.

one more question from here:

How can I change the 'filter' on page load for a particular 'user group'?
·
Thursday, 06 March 2014 12:51
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Pawan,

You're welcome
Unfortunately that was no this option to controlling this.
·
Thursday, 06 March 2014 15:52
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post