Legacy Classifieds in widget in cms

Status
Not open for further replies.

Hyperweb

Customer
Hi.

I had a little php script I used on my old Classifieds fr Photopost, to create a widget to show listings in CMS like this:

$host = 'localhost';
$dbUser = '7383';
$dbPass = 'kHHjjh2';
$db = '7383_h';
mysql_connect("$host", "$dbUser", "$dbPass") or die(mysql_error());
mysql_select_db("$db") or die(mysql_error());

ob_start();

$result = mysql_query("SELECT id,cat,bigimage,title FROM cp_products WHERE bigimage != '' AND adoptions > 3 order by rand() LIMIT 5" ) or die(mysql_error());
print"<table cellpadding=5 cellspacing=5><tr>";
while($row = mysql_fetch_array( $result )) {
print"";
print "<td align="center" width="20%"><a href="http://www.hunde-forum.dk/hundeannoncer/showproduct.php?product=" . $row['id'] . "&cat=" . $row['cat'] . ""><img src="http://www.hunde-forum.dk/hundeannoncer/data/" . $row['cat'] . "/thumbs/" . $row['bigimage'] . "" border="0" height="100"></a>";
print "<br />" . $row['title'];
print "<br /><a href=http://www.hunde-forum.dk/hundeannoncer/uploadproduct.php>(Opret annonce)</a></td>";
}
print"</tr></table>";

$output .= ob_get_contents();
ob_end_clean();


Can you help me with something similar for Dragonbyte Classifieds?
 
Upvote 0
This suggestion has been closed. Votes are no longer accepted.
That won't work for Classifieds. There's a few things we are working on for version 2, including a better support for the CMS blocks and the forum blocks. So you should have access to something like what you are wanting soon enough. :)
 
Status
Not open for further replies.
Back
Top