Support Forums

Latest Ads

This is a discussion on Latest Ads within the Technical Support forums, part of the Technical Support Forums category; Hi there, We have successfully run 68c on our site racecarsdirect.com for a number of years and are finally getting ...


Go Back   68 Classifieds Forums > Technical Support Forums > Technical Support

This topic is resolved.

If you have a similar issue that this thread does not address, open a new related support topic.

 
Thread Tools Display Modes
Old 09-21-2009, 10:41 AM   #1
Member
 
Join Date: Apr 2006
Location: UK
Posts: 56
Rep Power: 17
Mikael is on a distinguished road
Default Latest Ads

Hi there,

We have successfully run 68c on our site racecarsdirect.com for a number of years and are finally getting around to upgrading it to 4.1.6 Developer (currently running 4.0.9 Developer).

We have always had the latest ads showing on the home page using a 'hack' (for want of a better word) that Eric helped us implement some time ago.

We have another site eBuyGun.com (running 4.1.0 Developer which I will update this evening) which I have implemented the same code to get the latest ads listed as they do on racecarsdirect.com and it does not work.

Originally, I seem to recall I updated function.new_listing and un-commented a date statement. However, I can't seem to find function.new_listing in the latest version.

Many thanks for any suggestions and especially solutions!

Mikael
__________________
Mikael
V4.0.9 Developer
www.racecarsdirect.com
Mikael is offline  
Old 09-21-2009, 10:47 AM   #2
68 Classifieds Staff
 
Eric Barnes's Avatar
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,230
Rep Power: 123
Eric Barnes is a jewel in the rough
Default

@Mikael Can you post the plugin code and maybe I can spot the difference. I think it may be with the table names.
__________________
Eric Barnes
68 Classifieds Developer
Customer Area | Issue Tracker | Documentation | 68C Mods | 68 @ Twitter | My Modules
Eric Barnes is offline  
Old 09-21-2009, 11:02 AM   #3
Member
 
Join Date: Apr 2006
Location: UK
Posts: 56
Rep Power: 17
Mikael is on a distinguished road
Default

We have the following code in racecarsdirect.com home.tpl,

{new_listings number=12 date_format="%B %e, %Y %I:%M %p" table_attr='width="100%" style="border: 1px solid #000;"' td_attr='valign="middle" align="left"' img_break="<br />"}

which gives us the ad heading, price and date and time the ad was placed, the same code is on eBuyGun which does not show the time and date.
__________________
Mikael
V4.0.9 Developer
www.racecarsdirect.com
Mikael is offline  
Old 09-21-2009, 11:09 AM   #4
68 Classifieds Staff
 
Eric Barnes's Avatar
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,230
Rep Power: 123
Eric Barnes is a jewel in the rough
Default

Sorry I wasn't clear. I needed the actual php file. But I did just take a look and this plugin is included with v4.1.x. So I think you might have a conflict since we moved the plugins directory. To fix it delete everything from includes/smarty/plugins/ directory and then upload all the files in this dir from a stock v4.1.x download. Then it should start picking it up from the new root/plugins dir.
__________________
Eric Barnes
68 Classifieds Developer
Customer Area | Issue Tracker | Documentation | 68C Mods | 68 @ Twitter | My Modules
Eric Barnes is offline  
Old 09-21-2009, 11:24 AM   #5
Member
 
Join Date: Apr 2006
Location: UK
Posts: 56
Rep Power: 17
Mikael is on a distinguished road
Default

Ok, that had added the date to the new listings page, but not the display of new listings on the home page. In fact it doesn't show any listings after the featured ads.

Look at:
http://www.ebuygun.com

Whereas I want it to look like the latest ads we have on racecarsdirect.com (Race Cars For Sale)

Many thanks,

Mikael
__________________
Mikael
V4.0.9 Developer
www.racecarsdirect.com
Mikael is offline  
Old 09-21-2009, 11:27 AM   #6
Member
 
Join Date: Apr 2006
Location: UK
Posts: 56
Rep Power: 17
Mikael is on a distinguished road
Default

Sorry, I had to take the mod off ebuygun temporarily, we have a new customer placing a lot of free ads and I don't want him to be put off by the home page not displaying correctly.
__________________
Mikael
V4.0.9 Developer
www.racecarsdirect.com
Mikael is offline  
Old 09-21-2009, 02:53 PM   #7
Member
 
Join Date: Apr 2006
Location: UK
Posts: 56
Rep Power: 17
Mikael is on a distinguished road
Default We continue...

Hi,

Right, I have just completed a clean install of 68c 4.1.6 Developer on to another domain so I can test this functionality out without it being a site that is in use. http://www.rallycarsdirect.com

I have set up a demo test category so I could place a test ad and added our code from racearsdirect to show the latest ads on home.tpl using the following.

Code:
<table class="main" width="100%">	
<tr>
	<th>Latest Ads <a href="{$smarty.const.URL}/toplistings.php?pg=new"style="color:#FFCC00">More here...</a></th>
</tr>
<tr>
	<td>
	<table width="100%">
	<tr>	
{new_listings number=12 date_format="%B %e, %Y %I:%M %p" table_attr='width="100%" style="border: 1px solid #000;"' td_attr='valign="middle" align="left"' img_break="<br />"}
</td></tr>
</table>
And I have amended function.new_listings.php by uncommenting the //date as follows.

Code:
//date
$output.=smarty_modifier_date_format($loop[$x][dateadded], $date_format);
And as in the previous post the latest ad does not appear on the home page.

I feel I am missing something...

Many thanks,

Mikael
__________________
Mikael
V4.0.9 Developer
www.racecarsdirect.com
Mikael is offline  
Old 09-21-2009, 03:06 PM   #8
Coder
 
Join Date: Mar 2006
Posts: 4,798
Rep Power: 117
Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light
Default

Quote:
Originally Posted by Mikael
I feel I am missing something...

Many thanks,

Mikael
My suggestion would be that before you start hacking things up, make sure things work first.

For example, on your test site, place a minimum call to the new_listings plugin and see if it work, then slowly tweak things from there.
__________________
Larry

Knowledge learned is more valuable than knowledge given.
Lhotch is offline  
Old 09-21-2009, 03:42 PM   #9
Member
 
Join Date: Apr 2006
Location: UK
Posts: 56
Rep Power: 17
Mikael is on a distinguished road
Default

Hi Larry,

It works fine if I comment out the date output in function.new_listings.php (as in it displays the latest ads). Except it doesn't show the functionality I am after which is showing the time and date the ad was placed. As it does on racecarsdirect.

Any other thoughts?

Many thanks

Mikael
__________________
Mikael
V4.0.9 Developer
www.racecarsdirect.com
Mikael is offline  
Old 09-21-2009, 03:58 PM   #10
Coder
 
Join Date: Mar 2006
Posts: 4,798
Rep Power: 117
Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light
Default

Quote:
Originally Posted by Mikael
Hi Larry,

It works fine if I comment out the date output in function.new_listings.php (as in it displays the latest ads). Except it doesn't show the functionality I am after which is showing the time and date the ad was placed. As it does on racecarsdirect.

Any other thoughts?

Many thanks

Mikael

My guess is the reason its not working is because it has no idea what "smarty_modifier_date_format" so why ont you simplify things and change your date line to something simple.

$output.=$loop[$x][dateadded];


Then if that works look at the pho manual and use a php function to alter the date to display who you would like it.
__________________
Larry

Knowledge learned is more valuable than knowledge given.
Lhotch is offline  
Closed Thread

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Latest listing to appear first? newcastledirectory Technical Support 2 09-03-2009 06:49 PM
4.0.9 or the latest version? ryanreed71 Pre Sales Questions 5 03-11-2009 04:05 PM
How do I know I have the latest 3.1.5? dawyatt v3.1 Questions & Support 3 08-08-2006 04:52 PM


All times are GMT -4. The time now is 03:26 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0