http://www.icyphoenix.com/viewtopic.php?f=24&t=4194
-----------------------------------
Kay
Thu 15 May, 2008 10:30

FAP Pictures Blocks On Forum Index - Not Showing
-----------------------------------
Hi, 

I am trying to get the most recent pictures to show up on my phpBB2 index. I want it at the top under my header logo area.  

1.) I opened index.php for my anypage.php and inserted the code
2.) I opened overall_header for my anypage.tpl and inserted the code
3.) saved and ftp'd both index.php and overall_header.tpl

Nothing shows up. 

any help would be greatly appreciated. 

~Kay

Here are snippets of the code on both files

[code linenumbers=false]// Mighty Gorgon - Picture Blocks - BEGIN
$phpbb_root_path = './';
$album_root_path = $phpbb_root_path . 'album_mod/';
include($album_root_path . 'album_common.'.$phpEx);

//$album_config['img_cols'] = 4;
$cols = ($album_config['img_cols'] == 0 ? 4 : $album_config['img_cols']);
$cols_width = (100/$cols) . '%';

$catrows = array ();
$options = ALBUM_AUTH_VIEW;
$catrows = album_read_tree($album_user_id, $options);
$allowed_cat = ''; // For Recent Public Pics below
for ($i = 0; $i < count($catrows); $i ++)
{
	$allowed_cat .= ($allowed_cat == '') ? $catrows[$i]['cat_id'] : ','.$catrows[$i]['cat_id'];
}

album_build_recent_pics($allowed_cat);
album_build_highest_rated_pics($allowed_cat);
album_build_most_viewed_pics($allowed_cat);
album_build_random_pics($allowed_cat);

$template->assign_vars(array(
	'S_COLS' => $cols,
	'S_COL_WIDTH' => $cols_width,
	'TARGET_BLANK' => ($album_config['fullpic_popup']) ? 'target="_blank"' : '',
	'L_RAND_PICS' => $lang['Random_Pictures'],
	'L_HI_RATINGS' => $lang['Highest_Rated_Pictures'],
	'L_RECENT_PUBLIC_PICS' => $lang['Recent_Public_Pics'],
	'L_MOST_VIEWED' => $lang['Most_Viewed_Pictures'],
	'L_NO_PICS' => $lang['No_Pics'],
	'L_PIC_TITLE' => $lang['Pic_Image'],
	'L_PIC_ID' => $lang['Pic_ID'],
	'L_VIEW' => $lang['View'],
	'L_POSTER' => $lang['Pic_Poster'],
	'L_POSTED' => $lang['Posted']
	)
);
// Mighty Gorgon - Picture Blocks - END

$template->pparse('body');

include($phpbb_root_path . 'includes/page_tail.'.$phpEx);

?>[/code]


[code linenumbers=false]	<td height="25" align="center" valign="top" nowrap="nowrap"><span class="mainmenu">&nbsp;<a href="http://www.ppartsguild.com/artpage.htm" class="mainmenu"><img src="templates/subSilver/images/icon_mini_profile.gif" width="12" height="13" border="0" alt="" hspace="3" />OUR ARTIST</a>&nbsp; &nbsp;<a href="http://www.ppartsguild.com/phpBB2/index.php" class="mainmenu"><img src="templates/subSilver/images/icon_mini_message.gif" width="12" height="13" border="0" alt="" hspace="3" />FORUM</a>&nbsp; &nbsp;<a href="http://www.ppartsguild.com/index.htm" class="mainmenu"><img src="templates/subSilver/images/icon_mini_login.gif" width="12" height="13" border="0" alt="" hspace="3" />HOME</a>&nbsp;</span></td>
					</tr>
				</table></td>
			</tr>
		</table>

		<br />

<!-- BEGIN recent_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_RECENT_PUBLIC_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 recent_pics -->
	<tr>
		<!-- BEGIN recent_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="{recent_pics_block.recent_pics.recent_col.U_PIC}" {TARGET_BLANK}><img src="{recent_pics_block.recent_pics.recent_col.THUMBNAIL}" {THUMB_SIZE} border="0" alt="{recent_pics_block.recent_pics.recent_col.DESC}" title="{recent_pics_block.recent_pics.recent_col.DESC}" vspace="10" /></a>
			</div></div></td></tr></table>
		</td>
		<!-- END recent_col -->
	</tr>
	<tr>
		<!-- BEGIN recent_detail -->
		<td class="row2" align="center">
			<span class="gensmall">
				{L_POSTER}: {recent_pics_block.recent_pics.recent_detail.POSTER}<br />
				{L_PIC_TITLE}: {recent_pics_block.recent_pics.recent_detail.TITLE}<br />
				{L_PIC_ID}: {recent_pics_block.recent_pics.recent_detail.PIC_ID}<br />
				{L_POSTED}: {recent_pics_block.recent_pics.recent_detail.TIME}<br />
				{L_VIEW}: {recent_pics_block.recent_pics.recent_detail.VIEW}<br />
				{recent_pics_block.recent_pics.recent_detail.RATING}
				{recent_pics_block.recent_pics.recent_detail.COMMENTS}
				{recent_pics_block.recent_pics.recent_detail.IP}
			</span>
		</td>
		<!-- END recent_detail -->
	</tr>
	<!-- END recent_pics -->
</table>
<br />
<!-- END recent_pics_block -->[/code]


-----------------------------------
Kay
Thu 15 May, 2008 10:34

Re: FAP Pictures Blocks On Forum Index - Not Showing
-----------------------------------
link if needed to assist me 

Forum
http://www.ppartsguild.com/phpBB2/index.php


-----------------------------------
Artie
Fri 16 May, 2008 02:04

Re: FAP Pictures Blocks On Forum Index - Not Showing
-----------------------------------
Instead of index.php try putttin the php code in includes/page_header.php

or 

You can put the tpl code in index_body.tpl 


Just depends on where you want the block to appear


-----------------------------------
Kay
Fri 16 May, 2008 02:23

Re: FAP Pictures Blocks On Forum Index - Not Showing
-----------------------------------
thanks, I'll try that.

I have another minor glitch that started after I installed FAP.  

The quote button isn't working now when trying to post with a quote from someone else.  the bbcode of the quote button is messed up. 
I tried it on our old forum and the same thing happened there after installing FAP.


-----------------------------------
Kay
Fri 16 May, 2008 02:53

Re: FAP Pictures Blocks On Forum Index - Not Showing
-----------------------------------
[quote user="Artie" post="28430"]Instead of index.php try putttin the php code in includes/page_header.php

or 

You can put the tpl code in index_body.tpl 


Just depends on where you want the block to appear[/quote]

that worked. thank you very much for the help.


-----------------------------------
Artie
Sat 17 May, 2008 03:21

Re: FAP Pictures Blocks On Forum Index - Not Showing
-----------------------------------
You're welcome  :mricy:


-----------------------------------
Artie
Sat 17 May, 2008 05:10

Re: FAP Pictures Blocks On Forum Index - Not Showing
-----------------------------------
I think using page_header.php and overall_header.tpl is causing the problem (your other post) with your recent pics block on your album index. 

Try using index.php and index_body.tpl for the pic block mod


-----------------------------------
Kay
Sat 17 May, 2008 05:37

Re: FAP Pictures Blocks On Forum Index - Not Showing
-----------------------------------
I was just about to ask if it could have something to do with page_header.php

I'll try the suggested changes and post results.


-----------------------------------
Kay
Sat 17 May, 2008 05:57

Re: FAP Pictures Blocks On Forum Index - Not Showing
-----------------------------------
That fixed it. YES!  Thank you thank you!  :mryellow:


-----------------------------------
houser
Fri 01 Aug, 2008 11:18

Re: FAP Pictures Blocks On Forum Index - Not Showing
-----------------------------------
Kay or someone else,

I have been trying to do the same unsuccesfully....
Any chance of some step-by step code bits that w
ork for latest greatest PHPBB2?
Would appreciate it very much!

thanx
Janne A.

[quote user="Kay" post="28455"]That fixed it. YES!  Thank you thank you!  :mryellow:[/quote]


