Multiple Recent topics blocks

I have searched around but cannot find this. I thought some have done it before. Is it possible to make several recent topic blocks and have them display the recent topics of specified forums?
A
A
Home of phpBB Integrated Modifications
https://integramod.com/forum/
<?php/*************************************************************************** * blocks_imp_recent_topics.cfg * ------------------- * begin ]http] * email : [url=http://www.integramod.com]http://www.integramod.com[/url] * email : <a>webmaster@integramod.com</a> * * note: removing the original copyright is illegal even you have modified * the code. Just append yours if you have modified it. ***************************************************************************/ /*************************************************************************** * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * ***************************************************************************/ if ( !defined('IN_PHPBB') ){ die("Hacking attempt");} if(!function_exists(imp_recent_topics2_block_func)){ function imp_recent_topics2_block_func() { global $template, $portal_config, $userdata, $board_config, $db, $phpEx, $var_cache, $lang; $forum_data = array(); if($portal_config['cache_enabled']) { $forum_data = $var_cache->get('forum', 90000, 'forum'); } if(!$forum_data) { $sql = "SELECT * FROM ". FORUMS_TABLE . " ORDER BY forum_id"; if (!$result1 = $db->sql_query($sql)) { message_die(GENERAL_ERROR, 'Could not query forums information', '', __LINE__, __FILE__, $sql); } while( $row1 = $db->sql_fetchrow($result1) ) { $forum_data[] = $row1; } if($portal_config['cache_enabled']) { $var_cache->save($forum_data, 'forum', 'forum'); } } $is_auth_ary = array(); $is_auth_ary = auth(AUTH_ALL, AUTH_LIST_ALL, $userdata, $forum_data); if( $portal_config['md_except_forum_id2'] == '' ) { $except_forum_id = ''start''; } else { $except_forum_id = $portal_config['md_except_forum_id2']; } for ($i = 0; $i <count>sql_query($sql)) { message_die(GENERAL_ERROR, 'Could not query recent topics information', '', __LINE__, __FILE__, $sql); } $number_recent_topics = $db->sql_numrows($result1); $recent_topic_row = array(); while ($row1 = $db->sql_fetchrow($result1)) { $recent_topic_row[] = $row1; } if($portal_config['md_recent_topics_style2']){ $style_row = 'scroll'; }else { $style_row = 'static'; } $template->assign_block_vars($style_row,""); for ($i = 0; $i <number_recent_topics>assign_block_vars($style_row . '.recent_topic_row', array( 'U_TITLE' => append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $recent_topic_row[$i]['post_id']) . '#' .$recent_topic_row[$i]['post_id'], 'L_TITLE' => smilies_pass($recent_topic_row[$i]['topic_title']), 'L_BY' => $lang['By'], 'U_POSTER' => append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $recent_topic_row[$i]['user_id']), 'S_POSTER' => $recent_topic_row[$i]['username'], 'S_POSTTIME' => create_date($board_config['default_dateformat'], $recent_topic_row[$i]['post_time'], $board_config['board_timezone']) ) ); } else { $template->assign_block_vars($style_row . '.recent_topic_row2', array( 'U_TITLE' => append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $recent_topic_row[$i]['post_id']) . '#' .$recent_topic_row[$i]['post_id'], 'L_TITLE' => smilies_pass($recent_topic_row[$i]['topic_title']), 'L_BY' => $lang['By'], 'U_POSTER' => append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $recent_topic_row[$i]['user_id']), 'S_POSTER' => $recent_topic_row[$i]['post_username'], 'S_POSTTIME' => create_date($board_config['default_dateformat'], $recent_topic_row[$i]['post_time'], $board_config['board_timezone']) ) ); } } }} imp_recent_topics2_block_func();?>
<table><tr><td><span><BEGIN><marquee><BEGIN>» <a><b>{scroll.recent_topic_row.L_TITLE}</b></a><br>by <a>{scroll.recent_topic_row.S_POSTER}</a> on {scroll.recent_topic_row.S_POSTTIME}<br><br><END></marquee><END><BEGIN><BEGIN>» <a><b>{static.recent_topic_row.L_TITLE}</b></a><br>by <a>{static.recent_topic_row.S_POSTER}</a> on {static.recent_topic_row.S_POSTTIME}<br><br><END><END></span></td></tr></table>
"billsatx";p="13565" wrote:Within the files there are several references to recent_topics that must be renamed recent_topics2 and so forth.
If you compare the recent_topics and recent_topics2 it pretty easy to spot the changes.
Thus just make the next set of blocks recent_topics3 and so on.
"billsatx";p="13596" wrote:Yes, as I said referenced comparing the two recent_topics vs recent_topics2. The attachements were originally so a person could compare. After I posted the tutorial, I figured better to read that than continue with eplaining.
The example posted works on several boards I have..
Thanks
"Unregistered";p="13697" wrote:how abt a random picture block from a selected topic?
"evolver";p="13879" wrote:Could someone please check this out,
and place it in the downloadsection if it's OK?
"sanji";p="18273" wrote:I have downloaded the small exe made by evolver. There are two issues: first, when you type the name you want to use for the new block, only "M" are displayed - but the name is saved properly. For example, if you want to name your new block "test", it will be written "MMMM" when you try to type that word, although the block's file will be properly named... So just a small issue.
"sanji";p="18310" wrote:the option "Show not" (tick, if listed forums is not to be shown [ recent topics block ]) is NOT available for the newly created block. All other parameters can be changed but this one...
Any idea?
sanji
"sanji";p="18319" wrote:The first one is the normal one, defined for "Exceptional Forums" 38,35,30,21,36,40.
The second one as exactly the same options as the first one, but with "Exceptional Forums" 1,2,3,4,5,7,8,9 and only 3 topics shown.
Still... The same posts are displayed, although they obviously are not on the forums with id's 1,2,3,4,5,7,8,9. No idea why...
sanji
Show not ]
<?php/*************************************************************************** * blocks_imp_recents_topic.php * ------------------- * begin : Saturday, March 20, 2004 * copyright : (C) 2004 masterdavid - Ronald John David * website : [url=http://www.integramod.com]http://www.integramod.com[/url] * email : <a>webmaster@integramod.com</a> * * note: removing the original copyright is illegal even you have modified * the code. Just append yours if you have modified it. ***************************************************************************/ /*************************************************************************** * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * ***************************************************************************/ if ( !defined('IN_PHPBB') ){ die("Hacking attempt");} if(!function_exists(imp_recent_topics_Revie_block_func)){ function imp_recent_topics_Revie_block_func() { global $template, $portal_config, $userdata, $board_config, $db, $phpEx, $var_cache, $lang; $forum_data = array(); if($portal_config['cache_enabled']) { $forum_data = $var_cache->get('forum', 90000, 'forum'); } if(!$forum_data) { $sql = "SELECT * FROM ". FORUMS_TABLE . " ORDER BY forum_id"; if (!$result1 = $db->sql_query($sql)) { message_die(GENERAL_ERROR, 'Could not query forums information', '', __LINE__, __FILE__, $sql); } while( $row1 = $db->sql_fetchrow($result1) ) { $forum_data[] = $row1; } if($portal_config['cache_enabled']) { $var_cache->save($forum_data, 'forum', 'forum'); } } $is_auth_ary = array(); $is_auth_ary = auth(AUTH_ALL, AUTH_LIST_ALL, $userdata, $forum_data); if( $portal_config['md_except_forum_id_Revie'] == '' ) { $except_forum_id = ''start''; } else { $except_forum_id = $portal_config['md_except_forum_id_Revie']; } for ($i = 0; $i <count>sql_query($sql)) { message_die(GENERAL_ERROR, 'Could not query recent topics information', '', __LINE__, __FILE__, $sql); } $number_recent_topics_Revie = $db->sql_numrows($result1); $recent_topic_Revie_row = array(); while ($row1 = $db->sql_fetchrow($result1)) { $recent_topic_Revie_row[] = $row1; } if($portal_config['md_recent_topics_Revie_style']){ $style_row = 'scroll_Revie'; }else { $style_row = 'static_Revie'; } $template->assign_block_vars($style_row,""); for ($i = 0; $i <number_recent_topics_Revie>assign_block_vars($style_row . '.recent_topic_Revie_row', array( 'U_TITLE' => append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $recent_topic_Revie_row[$i]['post_id']) . '#' .$recent_topic_Revie_row[$i]['post_id'], 'L_TITLE' => smilies_pass($recent_topic_Revie_row[$i]['topic_title']), 'L_BY' => $lang['By'], 'U_POSTER' => append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $recent_topic_Revie_row[$i]['user_id']), 'S_POSTER' => $recent_topic_Revie_row[$i]['username'], 'S_POSTTIME' => create_date($board_config['default_dateformat'], $recent_topic_Revie_row[$i]['post_time'], $board_config['board_timezone']) ) ); } else { $template->assign_block_vars($style_row . '.recent_topic_Revie_row', array( 'U_TITLE' => append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $recent_topic_Revie_row[$i]['post_id']) . '#' .$recent_topic_Revie_row[$i]['post_id'], 'L_TITLE' => smilies_pass($recent_topic_Revie_row[$i]['topic_title']), 'L_BY' => $lang['By'], 'U_POSTER' => append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $recent_topic_Revie_row[$i]['user_id']), 'S_POSTER' => $recent_topic_Revie_row[$i]['post_username'], 'S_POSTTIME' => create_date($board_config['default_dateformat'], $recent_topic_Revie_row[$i]['post_time'], $board_config['board_timezone']) ) ); } } }} imp_recent_topics_Revie_block_func();?>
Ah, ok. Try chaging those line to..."tekguru";p="22223" wrote:Teelk that just reverses the list based on the daet of the last posted topic, we're loocking to base the date on the original seed message of the topic so that we get the most recently posted review first.
We're not interested in the date based on subsequent posts replying to the original review.