I have figured this out if anyone else is intrested I did the following.
1. Installed eXtreme style mod can be found at
http://www.phpbb.com/phpBB/viewtopic.php?t=125251 (this lets me place php code in the overall_header.tpl)
2. I wrote a php scripts that will pull photo thumbnails from coppermine I have tested it with 1.3.1 and 1.3.2 Here is the code.
gallery_block.php
<?php
//
// Change the path to the location of your config.inc.php file
// example this is how my system is setup for the file structure
// /public_html/scripts/cpg131/include/config.inc.php
// the gallery_block.php is located in ths scripts directory
// if you place the script in the Copermine directory the line would look like this
// include ('include/config.inc.php');
// Hope this helps you out with the file name
include ('cpg132/include/config.inc.php');
//
//***Enter Path information here***
//***absolute path to main coppermine directory***
// *** example
// *** http://www.yourdomain.com/scripts/cpg131/index.php is how you start your Photo Gallery
// ** then toy would put the folowinf in here /scripts/cpg131
//
$copperminepath = '/scripts/cpg132'; //***YOU MUST CHANGE THIS***
//
// Set center Var
// Set Display Album Name above Photo
// 0 = no
// 1 = yes
//
$centvar = "1"; // This Variable sets the photo to Center
$albname = "0"; // This Variable sets the Album Name to appear above the Photo
//
// 0 = random album (this will only display albums that are viewable to the Everybody (Public Photo's)
// 1 = Random Pictures (This will display any file that has been approved Private or Public)
//
$allphoto = "0"; // This Variable set to choose Random Albmus or just Random Pictures
//
// This is to set the Visiabilty for the albums
// 0 = Public Albums
// 2 = Registered Users album
//
$viz = "2";
//
// *************************************************************************
// DO NOT CHANGE ANYTHING BELOW THOS LINE UNLESS YOU KNOW WHAT YOU ARE DOING
// *************************************************************************
//
//
// This sets variables from the config.inc.php file
//
$dbalbum = "albums";
$dbpictures = "pictures";
$cpgver_album = $CONFIG['TABLE_PREFIX'].$dbalbum ;
$cpgver_pictures = $CONFIG['TABLE_PREFIX'].$dbpictures ;
$host = $CONFIG['dbserver'];
$username = $CONFIG['dbuser'];
$userpass = $CONFIG['dbpass'];
$cpgdb = $CONFIG['dbname'];
//
//This connects to the mysql DB
//***change username and password below***
//
$MZrandompic = @mysql_connect("$host", "$username", "$userpass"); //***YOU MUST CHANGE THIS***
if (!$MZrandompic) {
echo( '<p>Unable to connect to the ' .
'database server at this time.</p>' );
exit();
}
//
//select photo DB
//
if (! @mysql_select_db("$cpgdb") ) {
die( '<p>Unable to locate the picture ' .
'database at this time.</p>' );
}
//
// Select Databases to use
//
if ($allphoto == "0") {
$query1 = "SELECT * FROM .$cpgver_album WHERE visibility = '$viz' ORDER BY RAND() LIMIT 0,1";
$result1 = mysql_query($query1) or die("Query failed : " . mysql_error());
//
// Assign Var from sql data base's
//
while ($newarray = mysql_fetch_array($result1)) {
$aid = $newarray['aid'];
$title = $newarray['title'];
if ($centvar == "1") echo ("<center>");
if ($albname == "1") {
echo ("<a target '_blank' href= '$copperminepath/thumbnails.php?album=$aid'>$title </a><br>");
if ($centvar == "1") echo ("</center>");
}
}
}
if ($allphoto == "0") {
$query2 = "SELECT * FROM .$cpgver_pictures WHERE aid = '$aid' ORDER BY RAND() LIMIT 0,1";
$result2 = mysql_query($query2) or die("Query failed : " . mysql_error());
}
if ($allphoto == "1") {
$query2 = "SELECT * FROM .$cpgver_pictures WHERE approved = 'YES' ORDER BY RAND() LIMIT 0,1";
$result2 = mysql_query($query2) or die("Query failed : " . mysql_error());
}
while ($newarray1 = mysql_fetch_array($result2)) {
$filepath = $newarray1['filepath'];
$filename = $newarray1['filename'];
if ($centvar == "1") echo ("<center>");
if ($allphoto == "0") {
echo ("<a target '_blank' href= '$copperminepath/thumbnails.php?album=$aid'>");
echo ("<img border='0' src= '$copperminepath/albums/$filepath/thumb_$filename' > </a>");
} else {
echo ("<a target '_blank' href= '$copperminepath/index.php'>");
echo ("<img border='0' src= '$copperminepath/albums/$filepath/thumb_$filename' > </a>");
}
if ($centvar == "1") echo ("</center>");
}
?>
3. Then edited the overall_header.tpl file in phpBB Template directory with this code at the end of the script.
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
<tr>
<td width="20%"><?php
include ('/home/location_of_the_script/public_html/scripts/gallery_block.php');
?></td>
<td width="20%"><?php
include ('/home/location_of_the_script/public_html/scripts/gallery_block.php');
?></td>
<td width="20%"><?php
include ('/home/location_of_the_script/public_html/scripts/gallery_block.php');
?></td>
<td width="20%"><?php
include ('/home/location_of_the_script/gallery_block.php');
?></td>
<td width="20%"><?php
include ('/home/location_of_the_script/gallery_block.php');
?></td>
</tr>
</table>
you will need to replace /home/location_of_the_script/gallery_block.php with the location of the gallery_block.php script
I have optons added to the galley_block.php file so you can display all photo's and once clicked on it will take you to the copermine main page or you can select random albums based on the vis of the directory example if you only want to display albums that are public you need to set the $viz var to 0 and registered albums to 2 also you can display the album name above the photo. if you select random albums if you click on the photo it will take you to that album in copermine. there are other options in the script and it is comented so you can turn them on or off if you like. The script will also pull the database name username and password from copermine so you do not have to look this info up.
Hope this helps some people out I wrote this because I want to add a gallery to my phpbb with more features then smartor photo gallery and not to have to buy photopost.