Icy Phoenix

     
 


This forum is locked: you cannot post, reply or edit topics.  This topic is locked: you cannot edit posts or make replies. 
Page 1 of 1
 
 
Reply with quote Download Post 
Post 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
 



 
felix968Send private message  
Back to topPage bottom
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.

Support us
 
Reply with quote Download Post 
Post Re: Full Album Pack Portal Block 
 
Yes,

as many as you like
 



 
jzSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Full Album Pack Portal Block 
 
jz wrote: [View Post]
Yes,

as many as you like


How can I do?
 



 
felix968Send private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Full Album Pack Portal Block 
 
felix968 wrote: [View Post]

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
 



 
jzSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Full Album Pack Portal Block 
 
jz wrote: [View Post]
felix968 wrote: [View Post]

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:
Code: [Download] [Hide] [Select]
##############################################################
## 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 />&nbsp;</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...
 



 
felix968Send private message  
Back to topPage bottom
Reply with quote Download Post 
Post 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

Code: [Download] [Hide]
  1.                <td class="row6b" align="center">  
  2.                     <span class="gensmall" style="line-height:150%">  
  3.                         <br />  
  4.                         <b>{RANDOM_PIC_TITLE}</b>  
  5.                         <br />  
  6.                         <a href="{U_RANDOM_PIC_LINK}" target="_pic"><img src="{RANDOM_PIC_IMAGE}" border="0"></a>  
  7.                         <br />  
  8.                         <b>{RANDOM_PIC_POSTER}</b>  
  9.                         <br />  
  10.                         {RANDOM_PIC_TIME}  
  11.                         <br />  
  12.                     </span>  
  13.                 </td>  



try it and see if it works
 



 
jzSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Full Album Pack Portal Block 
 
Portal block is limited to 1 photo (each) .... use the FAP pictures block.
 



 
ArtieSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Full Album Pack Portal Block 
 
Artie wrote: [View Post]
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...
 



 
felix968Send private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Full Album Pack Portal Block 
 
You are welcome  
 



 
ArtieSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post 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,

 



 
xmenfileSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Full Album Pack Portal Block 
 
xmenfile wrote: [View Post]
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:

Code: [Download] [Hide] [Select]
<!-- 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 -->

 



 
ArtieSend private message  
Back to topPage bottom
This forum is locked: you cannot post, reply or edit topics.  This topic is locked: you cannot edit posts or make replies.  Page 1 of 1
 


Display posts from previous:    

HideWas this topic useful?

Link this topic
URL
BBCode
HTML




 
Permissions List
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