Hallo,
in FAP contrib there is this mod that adds a block to ez Portal for showing last and random pic in Album.
Can I show more than one picture in ezportal?
Thanks
FAP SUPPORT - Full Album Pack Portal Block
Subject: Re: Full Album Pack Portal Block
I'm sorry jz, i've this one DIY:
And I'm not able to understand where I've to change for showing more than one pic in ezportal...
jz wrote: [View Post]
I'm sorry jz, i've this one DIY:
##############################################################
## 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 ]------------------------------------------------
#
<tr>
<td class="row1" align="left"><span class="gensmall">{TOTAL_USERS}<br />{NEWEST_USER}<br /><br/>{TOTAL_POSTS} {TOTAL_TOPICS}<br /> </span></td>
</tr>
#
#-----[ AFTER, ADD ]------------------------------------------
#
<!-- Mighty Gorgon - Full Album Pack - BEGIN -->
<tr><td height="15"></td></tr>
<tr><td><span class="cattitle">{L_NEWEST_PIC}</span></td></tr>
<tr>
<td class="row6b" align="center">
<span class="gensmall" style="line-height:150%">
<br />
<b>{NEW_PIC_TITLE}</b>
<br />
<a href="{U_NEW_PIC_LINK}" target="_pic"><img src="{NEW_PIC_IMAGE}" border="0"></a>
<br />
<b>{NEW_PIC_POSTER}</b>
<br />
{NEW_PIC_TIME}
<br />
</span>
</td>
</tr>
<tr><td height="15"></td></tr>
<tr><td><span class="cattitle">{L_RANDOM_PIC}</span></td></tr>
<tr>
<td class="row6b" align="center">
<span class="gensmall" style="line-height:150%">
<br />
<b>{RANDOM_PIC_TITLE}</b>
<br />
<a href="{U_RANDOM_PIC_LINK}" target="_pic"><img src="{RANDOM_PIC_IMAGE}" border="0"></a>
<br />
<b>{RANDOM_PIC_POSTER}</b>
<br />
{RANDOM_PIC_TIME}
<br />
</span>
</td>
</tr>
<!-- Mighty Gorgon - Full Album Pack - END -->
#
#-----[ SAVE/CLOSE ALL FILES ]--------------------------------
#
# EoM
## 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 ]------------------------------------------------
#
<tr>
<td class="row1" align="left"><span class="gensmall">{TOTAL_USERS}<br />{NEWEST_USER}<br /><br/>{TOTAL_POSTS} {TOTAL_TOPICS}<br /> </span></td>
</tr>
#
#-----[ AFTER, ADD ]------------------------------------------
#
<!-- Mighty Gorgon - Full Album Pack - BEGIN -->
<tr><td height="15"></td></tr>
<tr><td><span class="cattitle">{L_NEWEST_PIC}</span></td></tr>
<tr>
<td class="row6b" align="center">
<span class="gensmall" style="line-height:150%">
<br />
<b>{NEW_PIC_TITLE}</b>
<br />
<a href="{U_NEW_PIC_LINK}" target="_pic"><img src="{NEW_PIC_IMAGE}" border="0"></a>
<br />
<b>{NEW_PIC_POSTER}</b>
<br />
{NEW_PIC_TIME}
<br />
</span>
</td>
</tr>
<tr><td height="15"></td></tr>
<tr><td><span class="cattitle">{L_RANDOM_PIC}</span></td></tr>
<tr>
<td class="row6b" align="center">
<span class="gensmall" style="line-height:150%">
<br />
<b>{RANDOM_PIC_TITLE}</b>
<br />
<a href="{U_RANDOM_PIC_LINK}" target="_pic"><img src="{RANDOM_PIC_IMAGE}" border="0"></a>
<br />
<b>{RANDOM_PIC_POSTER}</b>
<br />
{RANDOM_PIC_TIME}
<br />
</span>
</td>
</tr>
<!-- Mighty Gorgon - Full Album Pack - END -->
#
#-----[ SAVE/CLOSE ALL FILES ]--------------------------------
#
# EoM
And I'm not able to understand where I've to change for showing more than one pic in ezportal...
Subject: Re: Full Album Pack Portal Block
felix,
I am not a coder but if I was you I'd duplicate this part in templates/subSilver/portal_body.tpl
try it and see if it works
I am not a coder but if I was you I'd duplicate this part in templates/subSilver/portal_body.tpl
- <td class="row6b" align="center">
- <span class="gensmall" style="line-height:150%">
- <br />
- <b>{RANDOM_PIC_TITLE}</b>
- <br />
- <a href="{U_RANDOM_PIC_LINK}" target="_pic"><img src="{RANDOM_PIC_IMAGE}" border="0"></a>
- <br />
- <b>{RANDOM_PIC_POSTER}</b>
- <br />
- {RANDOM_PIC_TIME}
- <br />
- </span>
- </td>
try it and see if it works
Subject: Re: Full Album Pack Portal Block
Portal block is limited to 1 photo (each) .... use the FAP pictures block.
Subject: Re: Full Album Pack Portal Block
it works fine in horizontal, but how can I make Random block shows vertical in left side of ezportal.
Thank you,
Thank you,
Subject: Re: Full Album Pack Portal Block
Should be able to by modifying this part of the code to display as you like:
xmenfile wrote: [View Post]
Should be able to by modifying this part of the code to display as you like:
<!-- BEGIN random_pics_block -->
<table class="forumline" width="98%" align="center" cellspacing="1" cellpadding="2">
<tr><th class="thTop" height="25" colspan="{S_COLS}" nowrap="nowrap">{L_RAND_PICS}</th></tr>
<!-- BEGIN no_pics -->
<tr>
<td class="row1" align="center" colspan="{S_COLS}" height="50"><span class="gen">{L_NO_PICS}</span></td>
</tr>
<!-- END no_pics -->
<!-- BEGIN rand_pics -->
<tr>
<!-- BEGIN rand_col -->
<td class="row1" width="{S_COL_WIDTH}" align="center" onMouseOver="this.className='row2';" onMouseOut="this.className='row1';">
<table><tr><td><div class="picshadow"><div class="picframe">
<a href="{random_pics_block.rand_pics.rand_col.U_PIC}" {TARGET_BLANK}><img src="{random_pics_block.rand_pics.rand_col.THUMBNAIL}" {THUMB_SIZE} border="0" alt="{random_pics_block.rand_pics.rand_col.DESC}" title="{random_pics_block.rand_pics.rand_col.DESC}" vspace="10" /></a>
</div></div></td></tr></table>
</td>
<!-- END rand_col -->
</tr>
<tr>
<!-- BEGIN rand_detail -->
<td class="row2" align="center">
<span class="gensmall">
{L_POSTER}: {random_pics_block.rand_pics.rand_detail.POSTER}<br />
{L_PIC_TITLE}: {random_pics_block.rand_pics.rand_detail.TITLE}<br />
{L_PIC_ID}: {random_pics_block.rand_pics.rand_detail.PIC_ID}<br />
{L_POSTED}: {random_pics_block.rand_pics.rand_detail.TIME}<br />
{L_VIEW}: {random_pics_block.rand_pics.rand_detail.VIEW}<br />
{random_pics_block.rand_pics.rand_detail.RATING}
{random_pics_block.rand_pics.rand_detail.COMMENTS}
{random_pics_block.rand_pics.rand_detail.IP}
</span>
</td>
<!-- END rand_detail -->
</tr>
<!-- END rand_pics -->
</table>
<br />
<!-- END random_pics_block -->
<table class="forumline" width="98%" align="center" cellspacing="1" cellpadding="2">
<tr><th class="thTop" height="25" colspan="{S_COLS}" nowrap="nowrap">{L_RAND_PICS}</th></tr>
<!-- BEGIN no_pics -->
<tr>
<td class="row1" align="center" colspan="{S_COLS}" height="50"><span class="gen">{L_NO_PICS}</span></td>
</tr>
<!-- END no_pics -->
<!-- BEGIN rand_pics -->
<tr>
<!-- BEGIN rand_col -->
<td class="row1" width="{S_COL_WIDTH}" align="center" onMouseOver="this.className='row2';" onMouseOut="this.className='row1';">
<table><tr><td><div class="picshadow"><div class="picframe">
<a href="{random_pics_block.rand_pics.rand_col.U_PIC}" {TARGET_BLANK}><img src="{random_pics_block.rand_pics.rand_col.THUMBNAIL}" {THUMB_SIZE} border="0" alt="{random_pics_block.rand_pics.rand_col.DESC}" title="{random_pics_block.rand_pics.rand_col.DESC}" vspace="10" /></a>
</div></div></td></tr></table>
</td>
<!-- END rand_col -->
</tr>
<tr>
<!-- BEGIN rand_detail -->
<td class="row2" align="center">
<span class="gensmall">
{L_POSTER}: {random_pics_block.rand_pics.rand_detail.POSTER}<br />
{L_PIC_TITLE}: {random_pics_block.rand_pics.rand_detail.TITLE}<br />
{L_PIC_ID}: {random_pics_block.rand_pics.rand_detail.PIC_ID}<br />
{L_POSTED}: {random_pics_block.rand_pics.rand_detail.TIME}<br />
{L_VIEW}: {random_pics_block.rand_pics.rand_detail.VIEW}<br />
{random_pics_block.rand_pics.rand_detail.RATING}
{random_pics_block.rand_pics.rand_detail.COMMENTS}
{random_pics_block.rand_pics.rand_detail.IP}
</span>
</td>
<!-- END rand_detail -->
</tr>
<!-- END rand_pics -->
</table>
<br />
<!-- END random_pics_block -->
Page 1 of 1
You cannot post new topicsYou cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events
This is a "Lo-Fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by Icy Phoenix based on phpBB
Generation Time: 0.3227s (PHP: 8% SQL: 92%)
SQL queries: 13 - Debug Off - GZIP Enabled