FAP SUPPORT - Problem With Random Or Recent Photo Mod


Subject: FAP SUPPORT - Problem With Random Or Recent Photo Mod
I have install Full Album Pack 1.4.1 and Random or Recent Photo Mod but in my index.php page the image doesn't appears. I have all the instructions.
Code: [Download] [Hide] [Select]
#################################################################
## Title: Smartor Album Add-On: Random or Recent Photo (phpBB 2.0.4)
## Author: SeekIdeas <cfsilent@yahoo.com>
## Demo: http://www.seekideas.com/
## Description: Display a random or recent photo on your forum main page
## or chosen from a category only.
##
## * NOTE: This mod only works for Smartor's excellent "Photo Album Addon v2"
## Download here - http://smartor.is-root.com/viewtopic.php?t=2473
##
## Files To Edit: 3
## index.php
## templates/subSilver/index_body.tpl
## language/lang_english/lang_main.php
##
#################################################################





# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#
#-----[ OPEN ]---------------------------------------------
#
index.php

#
#-----[ FIND ]----------------------------------------
#
if ( !($total_forums = count($forum_data)) )
{
message_die(GENERAL_MESSAGE, $lang['No_forums']);
}

#
#-----[ BEFORE ADD ]-----------------------------------
#
//
// BEGIN Random or Recent Photo
//

$Display = 'XXXX'; // Replace 'XXXX' with 'Recent' or 'Random'.
$CategoryID = 0; // Replace 0 with a category ID. Otherwise, keep it as it is.
// Example: http://www.seekideas.com/forum/album_cat.php?cat_id=3
// Category ID is 3

if ($Display == 'Random') {
if ($CategoryID != 0) {
$sql = "SELECT * FROM phpbb_album WHERE pic_cat_id = $CategoryID ORDER BY RAND() LIMIT 1";
}
else {
$sql = "SELECT * FROM phpbb_album ORDER BY RAND() LIMIT 1";
}
}
else if ($Display == 'Recent') {
if ($CategoryID != 0) {
$sql = "SELECT pic_id, pic_title, pic_username, pic_time FROM phpbb_album WHERE pic_cat_id = $CategoryID ORDER BY pic_time DESC LIMIT 0,1";
}
else {
$sql = "SELECT pic_id, pic_title, pic_username, pic_time FROM phpbb_album ORDER BY pic_time DESC LIMIT 0,1";
}
}

if (!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Could not query album information', '', __LINE__, __FILE__, $sql);
}

$picrow = $db->sql_fetchrow($result);
//
// END Random or Recent Photo
//

#
#-----[ FIND ]----------------------------------------
#
'U_MARK_READ' => append_sid("index.$phpEx?mark=forums"))

#
#-----[ AFTER ADD ]-----------------------------------
#
// Photo Album
'L_NEWEST_PIC' => $lang['Newest_pic'],
'PIC_IMAGE' => append_sid('album_thumbnail.'. $phpEx . '?pic_id=' . $picrow['pic_id']),
'PIC_TITLE' => $picrow['pic_title'],
'PIC_POSTER' => $picrow['pic_username'],
'U_PIC_LINK' => append_sid('album_comment.' . $phpEx . '?pic_id=' . $picrow['pic_id']),
'PIC_TIME' => create_date($board_config['default_dateformat'], $picrow['pic_time'], $board_config['board_timezone']),






# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#
#-----[ OPEN ]---------------------------------------------
#
templates/subSilver/index_body.tpl

#
#-----[ ADD ]-----------------------------------
#
//
// Place this anywhere in template file.
//

<table width="100%" cellpadding="3" cellspacing="1" border="0" align="center" class="forumline">
<tr>
<th class="catleft" colspan="2" height="22" align="left"><span class="thCornerL"> {L_NEWEST_PIC}</a></span></th>
</tr>
<tr>
<td class="row1" width="100%">
<span class="gensmall" style="line-height:150%"><br /><center><a href="{U_PIC_LINK}"><img src="{PIC_IMAGE}" border="0" alt="{L_NEWEST_PIC}"></a><br /><br /></span>
</td>
</tr>
<tr>
<td class="row1" width="100%">
<span class="gensmall" style="line-height:150%"><b>{PIC_TITLE}</b> by <b>{PIC_POSTER}</b><br />{PIC_TIME}</span>
</td>
</tr>
<tr>
<td class="row1" width="100%">
<span class="gensmall">[ <a href="{U_ALBUM}">{L_ALBUM}</a> ]</span>
</td>
</tr>
</table>





# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#
#-----[ OPEN ]---------------------------------------------
#
language/lang_english/lang_main.php

#
#-----[ FIND ]----------------------------------------
#
$lang['No_poll'] = 'No poll at the moment';

#
#-----[ AFTER ADD ]-----------------------------------
#
# The name of your photo display
# Example: $lang['Newest_pic'] = 'Newest Photo';
# $lang['Newest_pic'] = 'HOTTEST PICTURE';
# $lang['Newest_pic'] = 'Random Pic';

$lang['Newest_pic'] = 'Recent Photo';






# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
This is a capture:
albumblockms8

Profile PM  
Subject: Re: Problem With Random Or Recent Photo Mod
The Mod isn't for FAP:
Quote:
## * NOTE: This mod only works for Smartor's excellent "Photo Album Addon v2"
## Download here - http://smartor.is-root.com/viewtopic.php?t=2473

Subject: Re: Problem With Random Or Recent Photo Mod
And is there any mod similar?. I want to show the recent photo in a block similar random or recent photo mod. Thank you.

Profile PM  
Subject: Re: Problem With Random Or Recent Photo Mod
holas wrote: [View Post]
And is there any mod similar?. I want to show the recent photo in a block similar random or recent photo mod. Thank you.


There's blocks included with icy for recent, random or popular photos. so there should be one for that somewhere

Subject: Re: Problem With Random Or Recent Photo Mod
I have the same problem. The photos doesn't show. I have installer phpBB 2.0.17 with FAP and full_album_pack_pictures_blocks_1_0_0. The capture is this:
blockerrorou6
What it's the problem?. Thank you.

Profile PM  
Subject: Re: Problem With Random Or Recent Photo Mod
Double check your install of full_album_pack_pictures_blocks_1_0_0.
It should work if installed correctly.

Profile PM  
Subject: Re: Problem With Random Or Recent Photo Mod
What are anypage.php and anypage.tpl that appears in full_album_pack_pictures_blocks_1_0_0?. Thank you.

Profile PM  
Subject: Re: Problem With Random Or Recent Photo Mod
With the Full Album Pack Portal Block I have the same error. The photos doesn't show in my index page. blockerrorou6

In my page firs I have install Photo Album Add-on but later I install FAP. Is there the problem?. My FAP works fine but FAP Portal Block and FAP Pictures Block not work. Thank you.

Profile PM  
Subject: Re: Problem With Random Or Recent Photo Mod
anypage.php and anypage.tpl mean ANY PAGE. :mricy:

For example, if you wanted the pic blocks to appear on the phpBB forum index page you would place the code in
index.php and the relevant template file which in this case would be index_body.tpl

Profile PM  
Subject: Re: Problem With Random Or Recent Photo Mod
I make it but It's doesn't work. I use in overall_header.tpl . Doesn't show anything. Why?. Only, I want show one random photo in my overall_header.tpl. How can I make it?. Thank you.

Profile PM  
Subject: Re: Problem With Random Or Recent Photo Mod
Anybody can help me, please?. Thank you.

Profile PM  

Page 1 of 1


  
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

   

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.1637s (PHP: 13% SQL: 87%)
SQL queries: 10 - Debug Off - GZIP Enabled