Public faqs appear in the sidebar featured section on the frontpage.affected file 1: include > class.faq.phpaffected file 2: include > client > templates > sidebar.tmpl.phpBecause we don't know all the places where the relevant function "getFeatured()" is embedded, we decided to write a new function "getFeaturedFaq()".Please insert in "class.faq.php" after the "static function getFeatured() {" from line 344 to line 348 after the closing tag "}" the following lines:    /* DMT EXTENDED additional function featured faq */    static function getFeaturedFaq() {        return static:()            ->filter(array('ispublished'=>self:))            ->order_by('-ispublished');    }Save the changes and upload it to your server in the right place.Now you have to edit "sidebar.tmpl.php" and replace the following code in line 22:    $faqs = FAQ:()->select_related('category')->limit(5);with     <?php $faqs = FAQ:()->limit(5);Save the changes and upload it to your server in the right place.That's it, now only featured faqs will be displayed.Best regards,JürgenBTW: The bug crashing the page if a faq categorie is featured containing featured faq is solved with this bugfix, too.

2 years later

I tried this but, the edits make my site no longer load.

Server Information
OS: Windows 7
osTicket Version: v1.12.2 (a5d898b)
Web Server Software: Microsoft-IIS/7.5
MySQL Version: 5.7.27
PHP Version: 5.6.31

This fix was for version 1.10 and is 2 years old. You are not running 1.10 so there is bound to be issue applying the code as written.

Write a Reply...