I'm trying to use Zarsky's hack..in my Smartor EZ portal...but no luck yet.
I installed the Extreme Mod and have files i the cache folder, so that is working...yes?
Here is the line inseted in my portal tpl file
<? include("/home/plolps4/public_html/coppermine_dir/copper.php"); ?>
Ad this is my copper.php file
<?php
//
//***Enter Path information here***
//***absolute path to main coppermine directory***
//
$copperminepath = '/home/plolps4/public_html/coppermine_dir/'; //***YOU MUST CHANGE THIS***
//
//This connects to the mysql DB
//***change username and password below***
//
$MZrandompic = @mysql_connect('localhost', 'mydbusername', 'mydbpassword'); //***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('coppermine_1_1') ) {
die( '<p>Unable to locate the picture ' .
'database at this time.</p>' );
}
//
//This gets a random picture record from the database and
//the picture's location and displays it
//
$MZresult = @mysql_query("SELECT * FROM cpg11d_pictures ORDER BY RAND() LIMIT 0,1");
if (!$MZresult) {
die('<p>Error performing query: ' . mysql_error() .
'</p>');
}
while ( $MZrow = mysql_fetch_array($MZresult) ) {
$albumid = $MZrow['aid']; //This gets the picture's associated album name
$pos = $MZrow['pid']; //This finds the picture's coppermine location
echo('<P ALIGN=center>');
echo('<a target = "_new" href="' . $copperminepath . '/displayimage.php?album=' . $albumid .
'&pos=-' . $pos . '">'); //make thumbnail clickable
echo('<IMG SRC="' . $copperminepath . '/albums/'); //append base dir structure
echo($MZrow['filepath'].thumb_.$MZrow['filename'] . '">' . '</a>'); //outputs path from /userspics
}
//
//This displays the picture's album name and
//links it to the coppermine album
//
$MZalbumresult = @mysql_query("SELECT * FROM cpg11d_albums WHERE aid = '$albumid'");
if (!$MZalbumresult) {
die('<p>Error performing query: ' . mysql_error() .
'</p>');
}
while ( $MZalbumname = mysql_fetch_array($MZalbumresult) ) {
echo('<FONT SIZE=2>');
echo('<P ALIGN=center>');
echo('<a target = "_new" href="' . $copperminepath .
'/thumbnails.php?album=' . $albumid . '">' .
$MZalbumname['title'] . '</a>' . '</p>');
}
?>
Nothing happens