Jump to content
xisto Community
irishpeck

Php Help For A Classifieds Website Php Help for a Classifieds Website

Recommended Posts

Ok i am currently helping to setup a new website called Flog-It (its a new classified website). I have a few things i need help with.

1. I need to put the latest ads section which is located at the end of the page in the recent ads box at the top. But the text which is associated with the ad needs to be removed so only the image is displayed with a link to the ad. This can be seen on the homepage of https://www.donedeal.ie/.

2. I need the subcategories to be shortened to 4 or 5 subcategories with a link below it which expands that category into all of its subcategories. An example of this can be seen at https://www.appliancesdelivered.ie/. I would also like this to be an ajax style slide function instead of going to a new webpage although i dont mind if it does.

3. This website allows people to upload images with their ad. I want to be able to add our own dynamic watermark to each image uploaded if its possible.

I have all the necessary php pages and would like someone to help me with these codes as i have limited php knowledge. Thanks so much in advance. You can email me on sakura-designs@hotmail.com also.

Share this post


Link to post
Share on other sites

What kind of cms is that could you tell, is that your website??

I dont know what cms it is, yeah its my website im currently developing it and need help with lots of bits of code. What would be the easiest thing and where could i start. If you could help me i can send you whatever files you need!!

Share this post


Link to post
Share on other sites

Cms means content management system, like wordpress, joomla, and drupal. I don't see which is your website amongst them, please refer to your website and I can help, with what you need..

Share this post


Link to post
Share on other sites

Cms means content management system, like wordpress, joomla, and drupal. I don't see which is your website amongst them, please refer to your website and I can help, with what you need..

Hello i contacted the server ok and this is the response i recieved from them

"The site is not an existing CMS installation or component, it is a PHP driven script which stands alone, there are, however, elements in the PHP that have been assimilated from Joomla. Is there anything we may be able to help you with?"

Can you still help me out with these? Thank you so much for all your help so far

Share this post


Link to post
Share on other sites

We would need to see the code to assist with this issue.

Well ive got the subcategories part fixed and it now displays the A-Z instead so thats grand but i still need help with the others. I want the latest ads section (you can see it at the end of the page) with this we want to only display the thumbnails of the 10 latest ads and then this script will be placed within the recent ads box at the top of the page. Thanks so much

<?phprequire_once("config.inc.php");?><?phpif($latestads_count){?><div class="latestads"><div class="head"><?php echo $lang['LATEST_ADS']; ?></div><table border="0" cellspacing="0" cellpadding="0"  class="adlisting" width="100%"><?php	$sql = "SELECT a.*, ct.cityname, UNIX_TIMESTAMP(a.createdon) AS timestamp, feat.adid AS isfeat,				COUNT(*) AS piccount, p.picfile AS picfile, scat.subcatname, scat.catid, cat.catname			FROM $t_ads a				INNER JOIN $t_cities ct ON a.cityid = ct.cityid				INNER JOIN $t_subcats scat ON a.subcatid = scat.subcatid				INNER JOIN $t_cats cat ON scat.catid = cat.catid				LEFT OUTER JOIN $t_featured feat ON a.adid = feat.adid AND feat.adtype = 'A' AND feat.featuredtill >= NOW()				LEFT OUTER JOIN $t_adpics p ON a.adid = p.adid AND p.isevent = '0'			WHERE $visibility_condn				$loc_condn			GROUP BY a.adid			ORDER BY a.createdon DESC			LIMIT $latestads_count";	$res_latest = mysql_query($sql) or die($sql.mysql_error());	$css_first = "_first";	while($row = mysql_fetch_array($res_latest))	{				$catname_inurl = RemoveBadURLChars($row['catname']);		$subcatname_inurl = RemoveBadURLChars($row['subcatname']);		if($sef_urls) $url = "{$vbasedir}$xcityid/posts/{$row[catid]}_{$catname_inurl}/{$row[subcatid]}_{$subcatname_inurl}/$row[adid]_" . RemoveBadURLChars($row['adtitle']) . ".html";		else $url = "?view=showad&adid=$row[adid]&cityid=$xcityid〈=$xlang{$link_extra}";?>			<?php 		if($row['isfeat']) 		{			//$feat_class = "class=\"featured\"";			$feat_img = "<img src=\"images/featured.gif\" align=\"absmiddle\">";		} 		else 		{ 			//$feat_class = "";			$feat_img = "";		}		if($row['picfile']) 		{			$picfile = $row['picfile'];			$imgsize = GetThumbnailSize("{$datadir[adpics]}/{$picfile}", $tinythumb_max_width, $tinythumb_max_height);		}		else 		{			$picfile = "";		}		?>		<tr>			<td width="15">			<img src="images/bullet.gif" align="absmiddle">			</td>						<td>			<b><a href="<?php echo $url; ?>" <?php echo $feat_class; ?>><?php echo $row['adtitle']; ?></a></b> 			<?php if(0&&$row['picfile']) { ?><img src="images/adwithpic.gif" align="absmiddle"><?php } ?>			<?php echo $feat_img; ?><br>			<span class="adcat">												<?php echo "$row[catname] $path_sep $row[subcatname]"; ?>												<?php 			$loc = "";			if($row['area']) $loc = $row['area'];			if($xcityid < 0) $loc .= ($loc ? ", " : "") . $row['cityname'];			if($loc) echo "<br>$loc";			?>									</span>									</td>			<td  align="right" width="<?php echo $tinythumb_max_width; ?>">			<?php if($picfile) { ?>			<a href="<?php echo $url; ?>"><img src="<?php echo "{$datadir[adpics]}/{$picfile}"; ?>" border="0" width="<?php echo $imgsize[0]; ?>" height="<?php echo $imgsize[1]; ?>" style="border:1px solid black"></a>			<?php } ?>			</td>					</tr><?php		$css_first = "";	}?></table></div><?php}?>

That is the php code to display the latest ads on the homepage at the bottom. If there is any other code you require please dont hesitate to ask.

Share this post


Link to post
Share on other sites

Hi!

You've also made this post in another thread and I've replied to you there:
http://forums.xisto.com/topic/66602-help-with-the-latest-ads-section-of-our-classifieds-website/

BTW, would it be possible for you to post a dump of the database so we can set up a test environment that mirrors what you have out there.

Regards,
Nitin Reddy

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.