https://www.icyphoenix.com/viewtopic.php?f=26&t=856&p=11123#p11123
-----------------------------------
felix968
Sat 31 Mar, 2007 18:33

Re: [MOD] FAP Outside Pics MOD
-----------------------------------
I've mkportal and i've created a php block for recent pics with this code: 
<?php include "phpBB2/album_mod/album_outside_recentpic.php" ?>

This is my modified album_outside_recentpic.php :

<? 

define('IN_PHPBB', true); 

$phpbb_root_path = './forum/'; //set your path
$album_root_path = $phpbb_root_path . 'album_mod/';

include($phpbb_root_path . 'extension.inc'); 
include($phpbb_root_path . 'common.'.$phpEx); 

$language = $board_config['default_lang'];

if ( !file_exists($phpbb_root_path . 'language/lang_' . $language . '/lang_album_main.'.$phpEx) )
{
    $language = 'italian'; // set your default language
}

include($phpbb_root_path . 'language/lang_' . $language . '/lang_album_main.' . $phpEx);


print "<table align=center>";
print "<tr><th align='center' colspan='3'>". $lang['Recent_Pics'] ."</th></tr>";
print "<tr>";

$sql = "SELECT pic_id, pic_title, pic_desc, pic_cat_id FROM ". ALBUM_TABLE ." ORDER BY pic_id DESC"; 
$picspool = $db->sql_query($sql) or die ("SQL Error"); 

for ($i=0;$i<3;$i++) //set number of pictures for the displayed line
{
    while ($cat['cat_view_level'] != '-1')
    {
        $row = $db->sql_fetchrow($picspool); 
        $sql = "SELECT * FROM ". ALBUM_CAT_TABLE ." WHERE cat_id = '". $row['pic_cat_id'] ."'";
        $result = $db->sql_query($sql) or die ("SQL Error"); 
        $cat = $db->sql_fetchrow($result); 
    }
    $cat['cat_view_level'] = '0';
    print "<td valign='top'><table><tr><td align='center'>" . $row['pic_title'] . "<br /></td></tr><tr><td align='center'><a href='". append_sid($phpbb_root_path ."album_showpage.". $phpEx ."?pic_id=" . $row['pic_id']) ."'><img alt='" . $row['pic_desc'] . "' src='". $phpbb_root_path ."album_thumbnail.". $phpEx ."?pic_id=" . $row['pic_id'] . "'></a></td></tr></table></td>"; 
}

print "</tr>";
print "</table>";
?>

When I activate the block for mkportal index, I've this error:

Fatal error: Cannot redeclare class template in /web/htdocs/www.oltrelafoto.com/home/forum/includes/template.php on line 30


