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 3
Goto page 1, 2, 3  Next
 
Reply with quote Download Post 
Post FAP CUSTOMIZATION - [MOD] FAP Outside Pics MOD 
 
Hello,

Update:
Topical Version: 1.0.2 - 23.3.2006

Description:
Makes it possible to add random, recent or single pictures into php files outside of the phpBB installation.

Download:
http://martin-truckenbrodt.com/down...csMOD_1.0.2.zip

Demo:
http://www.killi.org - Random Pics
http://www.killi.org/index2.php - Recent Pics
http://www.killi.org/index3.php - Single Pic

(Additional) Support:
http://www.martin-truckenbrodt.com/cgi/phpBB2/viewforum.php?f=8

Bye Martin
 



 
MartinTruckenbrodtSend 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: [MOD] FAP Outside Pics MOD 
 
Thanks Martin for reposting this mod on this site too!
 




____________
Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
 
Mighty GorgonSend private messageSend e-mail to userVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post 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
www.zoocrew.eu - help us save our wildlife
 
lefty74Send private message  
Back to topPage bottom
Reply with quote Download Post 
Post 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

Code: [Download] [Hide]
  1. #  
  2. ---FIND---  
  3. #  
  4.         $sql = "SELECT pic_id, pic_title, pic_desc, pic_cat_id FROM ". ALBUM_TABLE ." ORDER BY RAND() LIMIT 1";  
  5. #  
  6. #  
  7. --- REPLACE WITH ----  
  8. # replace x with the user_id you want to display  
  9.  
  10.         $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";  
  11. #  
  12.  

 



 
lefty74Send private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: [MOD] FAP Outside Pics MOD 
 
This is a great add on. thank you.
 



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



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



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



 
Pete_ZSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post 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++)  ?

Pete_Z wrote: [View Post]


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...
 



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

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



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



 
lefty74Send private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: [MOD] FAP Outside Pics MOD 
 
Thanks Lefty.  Thats just what I needed!
 



 
shaneSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: [MOD] FAP Outside Pics MOD 
 
glad it worked  
 



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



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



 
nimsSend private messageVisit poster's website  
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 3
Goto page 1, 2, 3  Next


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


  

 

  cron