|
Page 1 of 1
|
felix968 
Joined: February 2007
Posts: 122
Location:
|
 FAP SUPPORT - Full Album Pack Portal Block
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
|
#1 Fri 01 Jun, 2007 22:46 |
|
Sponsors

|
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.
|
| |
jz 
Joined: August 2006
Posts: 217
Location:  London
|
 Re: Full Album Pack Portal Block
Yes,
as many as you like
|
#2 Sun 03 Jun, 2007 01:35 |
|
felix968 
Joined: February 2007
Posts: 122
Location:
|
 Re: Full Album Pack Portal Block
Yes,
as many as you like
How can I do?
|
#3 Sun 03 Jun, 2007 08:06 |
|
jz 
Joined: August 2006
Posts: 217
Location:  London
|
 Re: Full Album Pack Portal Block
in FAP contrib there is this mod that adds a block to ez Portal for showing last and random pic in Album.
 just follow the instructions
|
#4 Sun 03 Jun, 2007 11:44 |
|
felix968 
Joined: February 2007
Posts: 122
Location:
|
 Re: Full Album Pack Portal Block
in FAP contrib there is this mod that adds a block to ez Portal for showing last and random pic in Album.
 just follow the instructions
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
And I'm not able to understand where I've to change for showing more than one pic in ezportal...
|
#5 Sun 03 Jun, 2007 11:54 |
|
jz 
Joined: August 2006
Posts: 217
Location:  London
|
 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
-
<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
|
#6 Sun 03 Jun, 2007 18:01 |
|
Artie 
Joined: January 2007
Posts: 833
Location:  Lone Star State
|
 Re: Full Album Pack Portal Block
Portal block is limited to 1 photo (each) .... use the FAP pictures block.
|
#7 Sun 03 Jun, 2007 18:49 |
|
felix968 
Joined: February 2007
Posts: 122
Location:
|
 Re: Full Album Pack Portal Block
Portal block is limited to 1 photo (each) .... use the FAP pictures block.
I say thank you to jz and Artie.
FAP pictures block works fine...
|
#8 Sun 03 Jun, 2007 22:57 |
|
Artie 
Joined: January 2007
Posts: 833
Location:  Lone Star State
|
 Re: Full Album Pack Portal Block
You are welcome
|
#9 Mon 04 Jun, 2007 03:03 |
|
xmenfile 
Joined: September 2007
Posts: 482
Location:  Right in front of my computer
|
 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,
|
#10 Mon 24 Sep, 2007 07:41 |
|
Artie 
Joined: January 2007
Posts: 833
Location:  Lone Star State
|
 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,
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 -->
|
#11 Fri 28 Sep, 2007 00:16 |
|
|
Page 1 of 1
|
Was this topic useful?
Was this topic useful?
| Link this topic |
| URL |
|
| BBCode |
|
| HTML |
|
You cannot post new topics You 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
|
|
|
|