• Welcome to Tux Reports: Where Penguins Fly. We hope you find the topics varied, interesting, and worthy of your time. Please become a member and join in the discussions.

Featured Thread Enhanced

LPH

Flight Director
Flight Instructor
The code for the featured thread widget needs to be cleaned up but this video shows the working code. The administrator can select a forum, save, then choose from a list of threads by title. This is much cleaner than relying on thread_ids.

 

Scharesoft

Flying Bird
XenWord Developer
Sounds good :) But one quesion: You can choose a forum and then a list of threads will appear, but what about forums with thounsands of threads? In our forum we've got 42.761 threads, I think it will be difficult to find the desired topics and the loading time for the listing will be high.

I think an optional field for the thread id would be also good in this widget.
 

Scharesoft

Flying Bird
XenWord Developer
Ok, so the recent 50 threads or threads with latest posts are displayed? Thats good, and makes it easier to choose a thread :) But for older thread an optional field for the id would be also good.
 

LPH

Flight Director
Flight Instructor
PHP:
        $forum_number =  $instance['show_forum_number'];

        $forum_number = " \"$forum_number\" ";

        $select_thread_qry = '
                    SELECT thread_id, title, node_id, discussion_state FROM `xf_thread`
                    WHERE discussion_state = 1 AND node_id = ' .  $forum_number  . '
                    ORDER BY `thread_id` DESC
                    LIMIT 50
                    ';

        $select_threads = XenForo_Application::get( 'db' )->fetchAll( $select_thread_qry );
 
Top