Just wanna check a few more things in
photopost.inc.php should it read
[]
$data_dir = "http://www.couch-tomatoe.cc/photopost/data/3003/"; //URL of your photo dir where those jpeg stored (with / at end)[/]
or
[]
$data_dir = "http://www.couch-tomatoe.cc/photopost/data/"; //URL of your photo dir where those jpeg stored (with / at end)
[/]
and in custombox3pal.php should the following change?
[]
<?
require [:"red"]("/home/scroungr/public_html/ubbthreads/photopost.inc.php");[/]
//
// Featured Photos Code
// Follow down to End Feature Photos Code
//
$Globals['pp_db_prefix'] = "[:"red"]w3t_[/]";
// leave blank for no customization, otherwise list cats you only want images to appear from
$forcats = "";
// which type of images do you want to show
$q_switch = "random";
switch ($q_switch) {
case "most_view":
$query = "SELECT id,user,userid,cat,title,bigimage,views FROM {$Globals['pp_db_prefix']}photos WHERE bigimage!='' AND approved='1' $forcats ORDER BY views DESC LIMIT 5";
break;
case "lastest":
$query = "SELECT id,user,userid,cat,title,bigimage,views FROM {$Globals['pp_db_prefix']}photos WHERE bigimage!='' AND approved='1' $forcats ORDER BY date DESC LIMIT 5";
break;
case "random":
$query = "SELECT id,user,userid,cat,title,bigimage,views FROM {$Globals['pp_db_prefix']}photos WHERE bigimage!='' AND approved='1' $forcats ORDER BY RAND() DESC LIMIT 5";
break;
}
$result = mysql_query($query)or die("Query failed");
echo <<<UBBTPRINT
$tbopen
<tr class="darktable">
<td class="tdheader" align="center">
Featured Photos
</td>
</tr>
UBBTPRINT;
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
$photo = $line["bigimage"];
$photolen = strlen($photo);
$photo_name = substr($photo, 0, -4);
$theext = substr( $photo, $photolen-3, $photolen);
print "<tr><td align="center" class="lighttable">";
print "<br /><a href="". $url_path ."/showphoto.php?photo=". $line["id"]. "">";
$temp_user = ($line["userid"]);
$img_width = $imgsize[0];
$img_height = $imgsize[1];
print "<img border="0" src="".$data_dir.$line["cat"]."/".$line["userid"].$photo_name."-thumb.$theext" alt="" />";
print "</a><font size="1" face="verdana,arial">";
if ($q_switch == "most_view") {
print "<a href="". $url_path ."/showphoto.php?photo=". $line["id"]. "">".$line["title"]."<br />".$line["views"]." times</a><br /></font><br />";
} else {
print "<a href="". $url_path ."/showphoto.php?photo=". $line["id"]. ""><br />".$line["title"];
print "</a><br />by ".$line["user"]."</font><br />";
}
print "</td></tr>";
}
mysql_free_result($result);
echo <<<UBBTPRINT
$tbclose
<br />
UBBTPRINT;
//
// End Featured Photos Code
//
mysql_select_db('[:"red"]DATABASE[/]') or die("Could not select database '[:"red"]DATABASE[/]'\n");
?>
[/]
Should I be putting my photopost or my ubbthreads database where it says 'DATABASE' or leave it the way it is?