Moderator: Integra Moderator
<?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?
Registered users: Bing [Bot], Google [Bot], Unspecified Bot