set_template(__DIR__.'/templates/threads.html'); $html->set_tag('openside', fusion_get_function('openside', $info['title'])); $html->set_tag('closeside', fusion_get_function('closeside')); $html->set_tag('label', $info['latest']['label']); $html->set_tag('label2', $info['hottest']['label']); add_to_jquery("$('[data-trim-text]').trim_text();"); if (!empty($info['latest'])) { if (!empty($info['latest']['item'])) { foreach ($info['latest']['item'] as $data) { $html->set_block('latest', [ 'link_url' => $data['link_url'], 'link_title' => ''.$data['link_title'].'', ]); } } else { $html->set_block('latest_no_item', ['message' => $info['latest']['no_rows']]); } } if (!empty($info['hottest'])) { if (!empty($info['hottest']['item'])) { foreach ($info['hottest']['item'] as $data) { $html->set_block('hottest', [ 'link_url' => $data['link_url'], 'link_title' => ''.$data['link_title'].'', 'badge' => $data['badge'], ]); } } else { $html->set_block('hottest_no_item', ['message' => $info['hottest']['no_rows']]); } } echo $html->get_output(); } }