 |
 |
 |
 |
#260199 - 10/26/03 01:30 PM
Re: Photopost Pal 1.3
[Re: 234234]
|
Old Hand
Registered: 10/17/03
Posts: 2409
Loc: Richmond, VA
|
Just wanna check a few more things in<br /><br />photopost.inc.php should it read<br /><br />[]<br />$data_dir = "http://www.couch-tomatoe.cc/photopost/data/3003/"; //URL of your photo dir where those jpeg stored (with / at end)[/]<br /><br />or <br /><br />[]<br />$data_dir = "http://www.couch-tomatoe.cc/photopost/data/"; //URL of your photo dir where those jpeg stored (with / at end)<br />[/]<br /><br />and in custombox3pal.php should the following change?<br /><br />[]<br /><?<br />require [:"red"]("/home/scroungr/public_html/ubbthreads/photopost.inc.php");[/]<br /><br />//<br />// Featured Photos Code<br />// Follow down to End Feature Photos Code<br />//<br /><br />$Globals['pp_db_prefix'] = "[:"red"]w3t_[/]";<br /><br />// leave blank for no customization, otherwise list cats you only want images to appear from<br />$forcats = "";<br /><br />// which type of images do you want to show<br />$q_switch = "random";<br /><br />switch ($q_switch) {<br /> case "most_view":<br /> $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";<br /> break;<br /> case "lastest":<br /> $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";<br /> break;<br /> case "random":<br /> $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";<br /> break;<br />}<br /><br />$result = mysql_query($query)or die("Query failed");<br /><br />echo <<<UBBTPRINT<br />$tbopen<br /><tr class="darktable"><br /><td class="tdheader" align="center"><br />Featured Photos<br /></td><br /></tr><br /><br />UBBTPRINT;<br /><br />while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {<br /> $photo = $line["bigimage"];<br /> $photolen = strlen($photo);<br /> $photo_name = substr($photo, 0, -4);<br /> $theext = substr( $photo, $photolen-3, $photolen);<br /> <br /> print "<tr><td align=\"center\" class=\"lighttable\">";<br /> print "<br /><a href=\"". $url_path ."/showphoto.php?photo=". $line["id"]. "\">";<br /> $temp_user = ($line["userid"]);<br /><br /> $img_width = $imgsize[0];<br /> $img_height = $imgsize[1];<br /> print "<img border=\"0\" src=\"".$data_dir.$line["cat"]."/".$line["userid"].$photo_name."-thumb.$theext\" alt=\"\" />";<br /> print "</a><font size=\"1\" face=\"verdana,arial\">";<br /> <br /> if ($q_switch == "most_view") {<br /> print "<a href=\"". $url_path ."/showphoto.php?photo=". $line["id"]. "\">".$line["title"]."<br />".$line["views"]." times</a><br /></font><br />";<br /> } else {<br /> print "<a href=\"". $url_path ."/showphoto.php?photo=". $line["id"]. "\"><br />".$line["title"];<br /> print "</a><br />by ".$line["user"]."</font><br />";<br /> }<br /> <br /> print "</td></tr>";<br />}<br /><br />mysql_free_result($result);<br /><br />echo <<<UBBTPRINT<br />$tbclose<br /><br /><br />UBBTPRINT;<br /><br />//<br />// End Featured Photos Code<br />//<br /><br />mysql_select_db('[:"red"]DATABASE[/]') or die("Could not select database '[:"red"]DATABASE[/]'\n"); <br /><br />?><br />[/] <br /><br />Should I be putting my photopost or my ubbthreads database where it says 'DATABASE' or leave it the way it is?
_________________________
Couchtomatoe - www.couch-tomatoe.ccMy abilities are for hire for installs, upgrades, custom themes and custom modifications.
|
|
Top
|
|
|
|
 |
 |
 |
 |
| |