By Evgeniy on Wednesday, 16 April 2014
Posted in General Issues
Replies 5
Likes 0
Views 589
Votes 0
Hello.
How to display in the module "recent discussions" discussions of the current category (without specifying category)?
Thank you.
Thanks, Mark!
I did it!!!
Let's ROCK: it working!

And my snippet-help (hack source) for ALL!

Config module (in admin panel): "Featured", "Unanswered"

File: /modules/mod_recentdiscussions/helper.php
Search: if( $filter == 3 )
in this section locate:

. ' AND a.' . $db->nameQuote( 'featured' ) . '=' . $db->Quote( 1 )
. $stateQuery
. $groupByQuery
. $orderBy
. $limitQuery;

and replace (insert 2 lines in query):

. ' AND a.' . $db->nameQuote( 'featured' ) . '=' . $db->Quote( 1 )

. ' AND (a.`category_id` = '. $db->Quote(JRequest::getInt( 'category_id' ))
. ' OR a.`id` = '. $db->Quote(JRequest::getInt( 'id' )).' )'

. $stateQuery
. $groupByQuery
. $orderBy
. $limitQuery;
·
Saturday, 26 April 2014 07:24
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello,

I am sorry but it is not possible to do this currently unless you hack the module file The module can only display discussions categorized by specific categories in the module settings.
·
Wednesday, 16 April 2014 19:16
·
0 Likes
·
0 Votes
·
0 Comments
·
OK
You know how hack and what change in source code for it (and file-name(s))?
Thnx.
·
Wednesday, 16 April 2014 20:18
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Evgeniy,

If you want to hack, you can do so by editing the file /modules/mod_recentdiscussions/helper.php . You will need to alter the SQL query so that it only fetches from the current post's category
·
Wednesday, 16 April 2014 23:44
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Evgeniy,

You're welcome and thanks for your sharing, glad to heard your issues resolved.
·
Saturday, 26 April 2014 18:00
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post