https://www.icyphoenix.com/viewtopic.php?f=26&t=2359
-----------------------------------
holas
Mon 25 Jun, 2007 02:55

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 linenumbers=false]################################################################# 
## 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 ]------------------------------------------ 
#[/code]This is a capture:
[IMG]http://img530.imageshack.us/img530/8215/albumblockms8.gif[/IMG]


-----------------------------------
tonyf12
Mon 25 Jun, 2007 14:15

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[/quote]


-----------------------------------
holas
Mon 25 Jun, 2007 15:08

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.


-----------------------------------
tonyf12
Mon 25 Jun, 2007 15:34

Re: Problem With Random Or Recent Photo Mod
-----------------------------------
[quote user="holas" post="16843"]And is there any mod similar?. I want to show the recent photo in a block similar random or recent photo mod. Thank you.[/quote]

There's blocks included with icy for recent, random or popular photos. so there should be one for that somewhere


-----------------------------------
holas
Mon 25 Jun, 2007 15:47

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:
[img=http://img107.imageshack.us/img107/5480/blockerrorou6.jpg][/img]
What it's the problem?. Thank you.


-----------------------------------
Artie
Mon 25 Jun, 2007 23:13

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.


-----------------------------------
holas
Tue 26 Jun, 2007 10:46

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.


-----------------------------------
holas
Tue 26 Jun, 2007 16:48

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. [img=http://img107.imageshack.us/img107/5480/blockerrorou6.jpg][/img]

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.


-----------------------------------
Artie
Wed 27 Jun, 2007 00:28

Re: Problem With Random Or Recent Photo Mod
-----------------------------------
anypage.php and anypage.tpl mean [highlight=#FFFFAA]ANY  PAGE[/highlight].  :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


-----------------------------------
holas
Thu 28 Jun, 2007 23:41

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 [b]overall_header.tpl[/b]. How can I make it?. Thank you.


-----------------------------------
holas
Fri 06 Jul, 2007 00:27

Re: Problem With Random Or Recent Photo Mod
-----------------------------------
Anybody can help me, please?. Thank you.


