Icy Phoenix
Archived phpBB Topics (Styles, Mods, Support) - FAP CUSTOMIZATION - [MOD] FAP Outside Pics MOD
Mighty Gorgon [ Fri 12 Jan, 2007 02:46 ]
Post subject: Re: [MOD] FAP Outside Pics MOD
Thanks Martin for reposting this mod on this site too!

lefty74 [ Sun 21 Jan, 2007 00:32 ]
Post subject: Re: [MOD] FAP Outside Pics MOD
Hi Martin,
I am trying (unsuccessfully) to have random pictures block for a specific user id by modifying the Random pics file.
Could you maybe help me out there?
Many thanks

lefty74 [ Sun 21 Jan, 2007 00:54 ]
Post subject: Re: [MOD] FAP Outside Pics MOD
Typically, I tried one more time after I posted this and now I got it to work.
If anyone would like to try it out or check for correctness
- #
- ---FIND---
- #
- $sql = "SELECT pic_id, pic_title, pic_desc, pic_cat_id FROM ". ALBUM_TABLE ." ORDER BY RAND() LIMIT 1";
- #
- #
- --- REPLACE WITH ----
- # replace x with the user_id you want to display
-
- $sql = "SELECT pic_id, pic_title, pic_desc, pic_user_id, pic_cat_id FROM ". ALBUM_TABLE ." WHERE pic_user_id= 'x' ORDER BY RAND() LIMIT 1";
- #
-
Pete_Z [ Sun 04 Feb, 2007 10:00 ]
Post subject: Re: [MOD] FAP Outside Pics MOD
This is a great add on. thank you.
felix968 [ Fri 30 Mar, 2007 13:25 ]
Post subject: Re: [MOD] FAP Outside Pics MOD
I've mkportal 1.1.1 and FAP 1.4.1 ....i've tried it, but doesn't work.
Do you think is an error of mine, or that's for others portals?
felix968 [ Sat 31 Mar, 2007 18:33 ]
Post subject: Re: [MOD] FAP Outside Pics MOD
I've mkportal and i've created a php block for recent pics with this code:
<?php include "phpBB2/album_mod/album_outside_recentpic.php" ?>
This is my modified album_outside_recentpic.php :
<?
define('IN_PHPBB', true);
$phpbb_root_path = './forum/'; //set your path
$album_root_path = $phpbb_root_path . 'album_mod/';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
$language = $board_config['default_lang'];
if ( !file_exists($phpbb_root_path . 'language/lang_' . $language . '/lang_album_main.'.$phpEx) )
{
$language = 'italian'; // set your default language
}
include($phpbb_root_path . 'language/lang_' . $language . '/lang_album_main.' . $phpEx);
print "<table align=center>";
print "<tr><th align='center' colspan='3'>". $lang['Recent_Pics'] ."</th></tr>";
print "<tr>";
$sql = "SELECT pic_id, pic_title, pic_desc, pic_cat_id FROM ". ALBUM_TABLE ." ORDER BY pic_id DESC";
$picspool = $db->sql_query($sql) or die ("SQL Error");
for ($i=0;$i<3;$i++) //set number of pictures for the displayed line
{
while ($cat['cat_view_level'] != '-1')
{
$row = $db->sql_fetchrow($picspool);
$sql = "SELECT * FROM ". ALBUM_CAT_TABLE ." WHERE cat_id = '". $row['pic_cat_id'] ."'";
$result = $db->sql_query($sql) or die ("SQL Error");
$cat = $db->sql_fetchrow($result);
}
$cat['cat_view_level'] = '0';
print "<td valign='top'><table><tr><td align='center'>" . $row['pic_title'] . "<br /></td></tr><tr><td align='center'><a href='". append_sid($phpbb_root_path ."album_showpage.". $phpEx ."?pic_id=" . $row['pic_id']) ."'><img alt='" . $row['pic_desc'] . "' src='". $phpbb_root_path ."album_thumbnail.". $phpEx ."?pic_id=" . $row['pic_id'] . "'></a></td></tr></table></td>";
}
print "</tr>";
print "</table>";
?>
When I activate the block for mkportal index, I've this error:
Fatal error: Cannot redeclare class template in /web/htdocs/www.oltrelafoto.com/home/forum/includes/template.php on line 30
Pete_Z [ Sat 07 Apr, 2007 08:26 ]
Post subject: Re: [MOD] FAP Outside Pics MOD
Well make sure
phpBB2 is changed to whatever your forum is called.
<?php include "
phpBB2/album_mod/album_outside_recentpic.php" ?>
OR If that does not work...
You can use HTML BLOCK and using IFRAME. That's what I use for my
mxbb portal.
INSERT
<?php include "phpBB2/album_mod/album_outside_recentpic.php" ?>
Inside a file called ( for example ) recent.php
add:
<body bgcolor=#333333> ( to match your portals colour )
iframe example
<iframe src="http://www.your-site/recent.php" scrolling="no" width="100%" height="130" frameborder="0" marginheight="0" marginwidth="0" allowtransparency="true"></iframe>
You will have to make the pictures open up a new page or else when you click on image, it will stay in the IFRAME and it looks ugly... I used target="_blank" inside of album_outside_recentpic.php
Look for
"album_showpage.". $phpEx ."?pic_id=" . $row['pic_id']) ."'>
add for example:
."album_showpage.". $phpEx ."?pic_id=" . $row['pic_id']) ."' target=_blank>
----------------
Ive added a nice marquee to mine... if anyone is interested. it stops the scrolling when mouse is hoverd over. works for IE and FF. =)
<marquee loop="infinite" bgcolor=#333333 behavior="SCROLL" direction="left" height="135" width="100%" scrollamount="3" scrolldelay="1" ALIGN="middle" onmouseover='this.stop()' onmouseout='this.start()' ><font color=white>
<?php include "phpbb/album_mod/album_outside_recentpic.php" ?>
</marquee>
felix968 [ Sat 07 Apr, 2007 09:11 ]
Post subject: Re: [MOD] FAP Outside Pics MOD
Thank you Pete_Z,
i've only a question: in "album_outside_recentpic.php", line 28, there is
for ($i=0;$i<3;$i++) //set number of pictures for the displayed line
If I want only one pict, the correct input is for ($i=0;$i<2;$i++) ?
Well make sure phpBB2 is changed to whatever your forum is called.
<?php include "phpBB2/album_mod/album_outside_recentpic.php" ?>
OR If that does not work...
INSERT
<?php include "phpBB2/album_mod/album_outside_recentpic.php" ?>
Inside a file called ( for example ) recent.php
I've created recent.php file, but i've a blank page...

shane [ Sun 08 Apr, 2007 15:17 ]
Post subject: Re: [MOD] FAP Outside Pics MOD
I finally got the mod to work. I didn't realize the html document ouside of phpbb had to have the .php extension. Once I changed that it worked fine.
I've modified the album_outside_randompic.php file to only show one picture, and to show the picture title below the picture. My question now: How do I get the full sized image to load from phpbb instead of the thumbnail. I have poured through the album_mod files trying to figure out which variable to add instead of the album_thumbnail in the album_outside_randompic.php file.
Can someone tell me what I need to change in order to get a full sized picture instead of a thumbnail?
Here is my modified album_outside_randompic.php file code:
<?php
define('IN_PHPBB', true);
$phpbb_root_path = './forum/'; //set your path
$album_root_path = $phpbb_root_path . 'album_mod/';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
$language = $board_config['default_lang'];
if ( !file_exists($phpbb_root_path . 'language/lang_' . $language . '/lang_album_main.'.$phpEx) )
{
$language = 'english'; // set your default language
}
include($phpbb_root_path . 'language/lang_' . $language . '/lang_album_main.' . $phpEx);
print "<table align=center>";
print "<tr>";
for ($i=0;$i<1;$i++) //set number of pictures for the displayed line
{
while ($cat['cat_view_level'] != '-1')
{
$sql = "SELECT pic_id, pic_title, pic_desc, pic_cat_id FROM ". ALBUM_TABLE ." ORDER BY RAND() LIMIT 1";
$result = $db->sql_query($sql) or die ("SQL Error");
$row = $db->sql_fetchrow($result);
$sql = "SELECT * FROM ". ALBUM_CAT_TABLE ." WHERE cat_id = '". $row['pic_cat_id'] ."'";
$result = $db->sql_query($sql) or die ("SQL Error");
$cat = $db->sql_fetchrow($result);
}
$cat['cat_view_level'] = '0';
print "<td valign='top'>
<table>
<tr>
<td align='center'><a href='". append_sid($phpbb_root_path ."album_showpage.". $phpEx ."?pic_id=" . $row['pic_id']) ."'><img alt='" . $row['pic_desc'] . "' src='". $phpbb_root_path ."album_thumbnail.". $phpEx ."?pic_id=" . $row['pic_id'] . "'></a></td>
</tr>
<tr>
<td align='center'>" . $row['pic_title'] . "<br /></td>
</tr>
</table>
</td>";
}
print "</tr>";
print "</table>";
?>
I'm trying to figure this out, but if one of you gurus can chime in with an easy fix I'd be very thankful.
Page with pictures outside phpbb -
www.philmontforum.com/index.php
Thanks!
Shane
lefty74 [ Sun 08 Apr, 2007 17:21 ]
Post subject: Re: [MOD] FAP Outside Pics MOD
Hi Shane,
I think to change the size to mid thumbnail or full size in the code above you need to
--FIND
album_thumbnail
--REPLACE WITH
//mid thumbnail
album_picm
//or fullsize
album_pic
shane [ Sun 08 Apr, 2007 22:56 ]
Post subject: Re: [MOD] FAP Outside Pics MOD
Thanks Lefty. Thats just what I needed!

lefty74 [ Mon 09 Apr, 2007 03:26 ]
Post subject: Re: [MOD] FAP Outside Pics MOD
glad it worked

newguy78 [ Fri 27 Apr, 2007 09:04 ]
Post subject: Re: [MOD] FAP Outside Pics MOD
To everyone who has got this mod to work, do you have XS (extreme styles) mod installed? I'm having troubles getting the pictures to show. The pictures will show for a split second then turn into a clickable blue rectangle. Martin said it had to do something with XS but didn't go into detail how to fix the problem.
nims [ Tue 17 Jul, 2007 14:04 ]
Post subject: Re: [MOD] FAP Outside Pics MOD
Doesnt work for me either. Same problem, I see small rectangular box, no pic.
Here is a
test page
Artie [ Wed 18 Jul, 2007 00:07 ]
Post subject: Re: [MOD] FAP Outside Pics MOD
Doesnt work for me either. Same problem, I see small rectangular box, no pic.
Here is a
test page
I see all the pics on your test page. Did you fix it ?
nims [ Wed 18 Jul, 2007 13:44 ]
Post subject: Re: [MOD] FAP Outside Pics MOD
Ok I found the solution.
In your forum ACP >> Photo Album - Configuration
Find
Allowed domains for hotlink (separated by a comma)
ADD your own domain
Example : abcxyz.com
I entered it without any http or www and it is working fine.

Pete_Z [ Sat 18 Aug, 2007 07:27 ]
Post subject: Re: [MOD] FAP Outside Pics MOD
Is this working alright for anyone who is using FAP 1.4.1 and this add on?
:edit: okay nevermind, sorry.

Pete_Z [ Thu 20 Sep, 2007 03:34 ]
Post subject: Re: [MOD] FAP Outside Pics MOD
I wonder, could it be possible to cache the images that are pulled from this scripit?
Mighty Gorgon [ Fri 21 Sep, 2007 00:20 ]
Post subject: Re: [MOD] FAP Outside Pics MOD
If images are recalled by album_thumbnails then images are cached automatically.
Pete_Z [ Wed 30 Jan, 2008 01:25 ]
Post subject: Re: [MOD] FAP Outside Pics MOD
Can someone please help me exclude members personal album from the album_outside_recentpic.php file? I am aware of different settings on how to prevent this from ACP, but the way I have my site set up is runs the way I need it to run. I would like to exclude members personal album from showing up. any ideas?
<?
define('IN_PHPBB', true);
$phpbb_root_path = './phpBB/'; //set your path
$album_root_path = $phpbb_root_path . 'album_mod/';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
$language = $board_config['default_lang'];
if ( !file_exists($phpbb_root_path . 'language/lang_' . $language . '/lang_album_main.'.$phpEx) )
{
$language = 'english'; // set your default language
}
include($phpbb_root_path . 'language/lang_' . $language . '/lang_album_main.' . $phpEx);
print "<table border=0>";
print "";
print "";
/* I took out pic_desc, alt tag */
$sql = "SELECT pic_id, pic_title, pic_cat_id FROM ". ALBUM_TABLE ." ORDER BY pic_id DESC";
$picspool = $db->sql_query($sql) or die ("SQL Error");
for ($i=0;$i<8;$i++) //set number of pictures for the displayed line
{
while ($cat['cat_view_level'] != '-1')
{
$row = $db->sql_fetchrow($picspool);
$sql = "SELECT * FROM ". ALBUM_CAT_TABLE ." WHERE cat_id = '". $row['pic_cat_id'] ."'";
$result = $db->sql_query($sql) or die ("SQL Error");
$cat = $db->sql_fetchrow($result);
}
$cat['cat_view_level'] = '0';
print "<td valign='top' ><font color=white><table class=forumline width=160 cellpadding=0 bgcolor=white><tr><td align='center'><span class=gensmall><b>" . $row['pic_title'] . "</b></td></tr><tr><td align='center'><a href='". append_sid($phpbb_root_path ."album_showpage.". $phpEx ."?pic_id=" . $row['pic_id']) ."' target=_blank><img width="125" height="95" border="0" alt='" . $row['pic_desc'] . "' src='". $phpbb_root_path ."album_thumbnail.". $phpEx ."?pic_id=" . $row['pic_id'] . "'></a></td></tr></table></td>";
}
print "</tr>";
print "</table>";
?>
Artie [ Wed 30 Jan, 2008 01:35 ]
Post subject: Re: [MOD] FAP Outside Pics MOD
Try replacing
$sql = "SELECT * FROM ". ALBUM_CAT_TABLE ." WHERE cat_id = '". $row['pic_cat_id'] ."'";
WITH
$sql = "SELECT * FROM ". ALBUM_CAT_TABLE ." WHERE (cat_id = '". $row['pic_cat_id'] ."') AND (cat_user_id = 0) ";
Pete_Z [ Wed 30 Jan, 2008 04:27 ]
Post subject: Re: [MOD] FAP Outside Pics MOD
hmm, that gives me an "SQL Error" but its not spesific on what kind of error.
Pete_Z [ Thu 31 Jan, 2008 00:57 ]
Post subject: Re: [MOD] FAP Outside Pics MOD
Hey Artie, I found a fix you did here...
http://www.icyphoenix.com/viewtopic.php?t=2762
but it looks like its for the random pic file... can you help me for the recent file one the code I posted above? thanks..

Artie [ Thu 31 Jan, 2008 01:07 ]
Post subject: Re: [MOD] FAP Outside Pics MOD
Sorry bout that Pete_Z.... I was focused on the wrong SQL statement .
I edited my post above with the code that should work ... I hope

Pete_Z [ Thu 31 Jan, 2008 01:22 ]
Post subject: Re: [MOD] FAP Outside Pics MOD

yeah thanks, I was trying to figure out with the other stuff you posted in the other thread. big headache... I like this better. simple and it works, haha. thanks Artie.

Pete_Z [ Wed 06 Feb, 2008 07:16 ]
Post subject: Re: [MOD] FAP Outside Pics MOD
Alright! I didn't think my last request was possible, but I was given hope!
So I have this scripit working in a marquee like going accross my portal.
And I have this problem with long Titles. well nothing wrong with the titles, but for the marquee it is kind of too long and this is what happens:
I would widen the table, but it would make for an odd looking strip.
any ideas?
Trust me that I try my hardest to find the solution myself. im not php guru.
This clue kind of makes it close... if I can only get pic title to work....
$position=14; // Define how many character you want to display.
$message="You are now joining over 2000 current";
$post = substr($message, 0, $position);
echo $post;
echo "...";
jeez, cool java script picture effects here.
Artie [ Fri 08 Feb, 2008 00:37 ]
Post subject: Re: [MOD] FAP Outside Pics MOD
If this works it should display any title of 14 characters or less and if the title is over 14 characters it will display the first 10 followed by 4 dots.
FIND
$cat['cat_view_level'] = '0';
AFTER ADD
$pic_title = $row['pic_title'];
if (strlen($pic_title) > 14){$pic_title= (substr($pic_title,0,10)."....");}
FIND
<b>" . $row['pic_title'] . "</b>
REPLACE WITH
<b>" . $pic_title . "</b>
Pete_Z [ Tue 12 Feb, 2008 11:41 ]
Post subject: Re: [MOD] FAP Outside Pics MOD
Thank you Artie. worked great.
By the way, Not sure if that comma after "title" is supposed to be there... got errors untill I took it out.
<b>" . $pic_title'. "</b>
Thanks!
Artie [ Tue 12 Feb, 2008 23:23 ]
Post subject: Re: [MOD] FAP Outside Pics MOD
No, it should not be there ..... my bad

keith10456 [ Wed 13 Aug, 2008 22:26 ]
Post subject: Re: [MOD] FAP Outside Pics MOD
Is it possible to have this on an "html" page?