https://www.icyphoenix.com/viewtopic.php?f=35&t=4937&p=38284#p38284 ----------------------------------- FedericoBiccheddu Sun 12 Apr, 2009 17:01 Re: New Blocks: Highest Rated Topics/ Most Read Topics ----------------------------------- It creates a block in php that it executes this query, and will show 5 more seen: [code linenumbers=false]sql_query($sql)) { message_die(GENERAL_ERROR, 'Could not query most view topics information', '', __LINE__, __FILE__, $sql); } $number_topics = $db->sql_numrows($result); $topic_row = array(); while ($row = $db->sql_fetchrow($result)) { $topic_row[] = $row; } for ($i = 0; $i < $number_topics; $i++) { $orig_word = array(); $replacement_word = array(); obtain_word_list($orig_word, $replacement_word); if (!empty($orig_word)) { $recent_topic_row[$i]['topic_title'] = (!empty($recent_topic_row[$i]['topic_title'])) ? preg_replace($orig_word, $replacement_word, $recent_topic_row[$i]['topic_title']) : ''; } $topic_title = htmlspecialchars_clean($recent_topic_row[$i]['topic_title']); $template->assign_block_vars('most_view_topic', array( 'U_TITLE' => append_sid(VIEWTOPIC_MG . '?' . POST_FORUM_URL . '=' . $recent_topic_row[$i]['forum_id'] . '&' . POST_TOPIC_URL . '=' . $recent_topic_row[$i]['topic_id'] . '&' . POST_POST_URL . '=' . $recent_topic_row[$i]['post_id']) . '#p' . $recent_topic_row[$i]['post_id'], 'L_TITLE' => $topic_title, ) ); } ?> [/code] The .tpl: [code linenumbers=false]
[/code] it is a thing thrown on the moment, I do not know if it works, but trying a little, you would have to succeed to us, same thing for the others. Enough that orders for the other fields that you want ;) [size=10]Sorry for my bad English :oops: [/size]