https://www.icyphoenix.com/viewtopic.php?f=26&t=2183&p=15907#p15907 ----------------------------------- felix968 Sun 03 Jun, 2007 11:54 Re: Full Album Pack Portal Block ----------------------------------- [quote user="jz" post="15905"][quote user="felix968" post="15832"] in fap contrib there is this mod that adds a block to ez Portal for showing last and random pic in Album.[/quote] :arrow: just follow the instructions[/quote] I'm sorry jz, i've this one DIY: [code linenumbers=false] ############################################################## ## MOD Title: Full Album Pack Portal Block ## MOD Author: Mighty Gorgon < mightygorgon@mightygorgon.com > (Luca Libralato) http://www.mightygorgon.com/ ## MOD Description: This MOD adds a block to ez Portal for showing last and random pic in Album ## ## MOD Version: 1.0.1 ## ## Installation Level: Easy ## Installation Time: 5 minutes ## Files To Edit: (3) ## portal.php ## language/lang_english/lang_main.php ## templates/subSilver/portal_body.tpl ## ############################################################## ## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the ## latest version of this MOD. Downloading this MOD from other sites could cause malicious code ## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered ## in our MOD-Database, located at: http://www.phpbb.com/mods/ ############################################################## ## Author Notes: ## ## N/A ## ############################################################## ## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD ############################################################## # #-----[ OPEN ]------------------------------------------------ # portal.php # #-----[ FIND ]------------------------------------------------ # $page_title = $lang['Home']; # #-----[ AFTER, ADD ]------------------------------------------ # // For pictures in personal galleries add // AND c.cat_user_id > 0 // Mighty Gorgon - Full Album Pack - BEGIN // Newest Pic $sql = "SELECT * FROM " . ALBUM_TABLE . " AS a, " . ALBUM_CAT_TABLE . " AS c WHERE c.cat_id = a.pic_cat_id AND c.cat_view_level = -1 ORDER BY pic_time DESC LIMIT 1"; if (!$result = $db->sql_query($sql)) { message_die(GENERAL_ERROR, 'Could not query album information', '', __LINE__, __FILE__, $sql); } $newpicrow = $db->sql_fetchrow($result); // Random Pic $sql = "SELECT * FROM " . ALBUM_TABLE . " AS a, " . ALBUM_CAT_TABLE . " AS c WHERE c.cat_id = a.pic_cat_id AND c.cat_view_level = -1 ORDER BY RAND() LIMIT 1"; if (!$result = $db->sql_query($sql)) { message_die(GENERAL_ERROR, 'Could not query album information', '', __LINE__, __FILE__, $sql); } $randpicrow = $db->sql_fetchrow($result); // Mighty Gorgon - Full Album Pack - END # #-----[ FIND ]------------------------------------------------ # 'L_VOTE_BUTTON' => $lang['Vote'], # #-----[ AFTER, ADD ]------------------------------------------ # // Mighty Gorgon - Full Album Pack - BEGIN 'L_NEWEST_PIC' => $lang['Newest_pic'], 'NEW_PIC_IMAGE' => append_sid('album_thumbnail.'. $phpEx . '?pic_id=' . $newpicrow['pic_id']), 'NEW_PIC_TITLE' => $newpicrow['pic_title'], 'NEW_PIC_DESC' => $newpicrow['pic_desc'], 'NEW_PIC_POSTER' => $newpicrow['pic_username'], 'U_NEW_PIC_LINK' => append_sid('album_showpage.' . $phpEx . '?pic_id=' . $newpicrow['pic_id']), 'NEW_PIC_TIME' => create_date($board_config['default_dateformat'], $newpicrow['pic_time'], $board_config['board_timezone']), 'L_RANDOM_PIC' => $lang['Random_pic'], 'RANDOM_PIC_IMAGE' => append_sid('album_thumbnail.'. $phpEx . '?pic_id=' . $randpicrow['pic_id']), 'RANDOM_PIC_TITLE' => $randpicrow['pic_title'], 'RANDOM_PIC_DESC' => $randpicrow['pic_desc'], 'RANDOM_PIC_POSTER' => $randpicrow['pic_username'], 'U_RANDOM_PIC_LINK' => append_sid('album_showpage.' . $phpEx . '?pic_id=' . $randpicrow['pic_id']), 'RANDOM_PIC_TIME' => create_date($board_config['default_dateformat'], $randpicrow['pic_time'], $board_config['board_timezone']), // Mighty Gorgon - Full Album Pack - END # #-----[ OPEN ]------------------------------------------------ # # #-----[ OPEN ]------------------------------------------------ # language/lang_english/lang_main.php # #-----[ FIND ]------------------------------------------------ # ?> # #-----[ BEFORE, ADD ]----------------------------------------- # // Mighty Gorgon - Full Album Pack - BEGIN $lang['Newest_pic'] = 'Last Pic'; // Album Addon $lang['Random_pic'] = 'Random Pic'; // Album Addon // Mighty Gorgon - Full Album Pack - END # #-----[ OPEN ]------------------------------------------------ # templates/subSilver/portal_body.tpl # #-----[ FIND ]------------------------------------------------ # {TOTAL_USERS}
{NEWEST_USER}

{TOTAL_POSTS} {TOTAL_TOPICS}
  # #-----[ AFTER, ADD ]------------------------------------------ # {L_NEWEST_PIC}
{NEW_PIC_TITLE}

{NEW_PIC_POSTER}
{NEW_PIC_TIME}
{L_RANDOM_PIC}
{RANDOM_PIC_TITLE}

{RANDOM_PIC_POSTER}
{RANDOM_PIC_TIME}
# #-----[ SAVE/CLOSE ALL FILES ]-------------------------------- # # EoM [/code] And I'm not able to understand where I've to change for showing more than one pic in ezportal...