Support Forums

plugin function.new_listings.php

This is a discussion on plugin function.new_listings.php within the Modules / Plugins / Modifications forums, part of the Developer Forums category; Hello there, In order to get a date for the new listings displayed on my home page, I have added ...


Go Back   68 Classifieds Forums > Developer Forums > Modules / Plugins / Modifications

Reply
 
Thread Tools Display Modes
Old 08-01-2010, 07:58 PM   #1
Customer
 
Join Date: Apr 2009
Location: South of Spain
Posts: 207
Rep Power: 14
magicosta is on a distinguished road
Default plugin function.new_listings.php

Hello there,

In order to get a date for the new listings displayed on my home page, I have added the following line of code in function.new_listings.php

//date
$output.=$loop[$x][dateadded];
$output.="</td>\n";
$output .= "<td" . smarty_function_html_table_cycle_newlistings('td', $td_attr, $c) . ">\n";


after these lines of code (on line 96):

//opening tr
$output .= "<tr" . smarty_function_html_table_cycle_newlistings('tr', $tr_attr, $c) . ">\n";
//opening td
$output .= "<td" . smarty_function_html_table_cycle_newlistings('td', $td_attr, $c) . ">\n";
//title
$link = $modules->call_hook('listing_url', $loop[$x]);
if($link == '')
{
$link="viewlisting.php?view=".$loop[$x][id];
}


It is working fine, I have the date of publication for each listing and as well the hour of publiction which I don't want!

I have looked around but I didn't find out anything to remove the hour!

Any idea where I have to look at ?

Thank you
__________________
Default Template - V 4.1.10 - Developper
magicosta is offline   Reply With Quote
Old 08-01-2010, 08:59 PM   #2
curmudgeon
 
Join Date: Mar 2006
Posts: 5,413
Rep Power: 138
Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light
Default

Depends on the format of the date. You can probably just strip off X number of characters or use the date/time with the proper php function.

PHP: Date/Time Functions - Manual
__________________
Larry

Knowledge learned is more valuable than knowledge given.
Lhotch is offline   Reply With Quote
Old 08-02-2010, 06:16 AM   #3
Customer
 
Join Date: Apr 2009
Location: South of Spain
Posts: 207
Rep Power: 14
magicosta is on a distinguished road
Default

Thank you Larry for your reply.

I have tried to find out the solution with your advices but till now I am not successful!

As you can see on my image, I got the dates with the hours and I would like to remove theses hours to get more space between cols.

Thank you in advance for any more help
Attached Images
File Type: jpg new-listing-list2.jpg (31.7 KB, 11 views)
__________________
Default Template - V 4.1.10 - Developper
magicosta is offline   Reply With Quote
Old 08-02-2010, 07:44 AM   #4
curmudgeon
 
Join Date: Mar 2006
Posts: 5,413
Rep Power: 138
Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light
Default

//date
$output.=substr($loop[$x][dateadded],0,10);
$output.="</td>\n";
$output .= "<td" . smarty_function_html_table_cycle_newlistings('td', $td_attr, $c) . ">\n";
__________________
Larry

Knowledge learned is more valuable than knowledge given.
Lhotch is offline   Reply With Quote
Old 08-02-2010, 10:29 AM   #5
Customer
 
Join Date: Apr 2009
Location: South of Spain
Posts: 207
Rep Power: 14
magicosta is on a distinguished road
Default

Thank you very much Larry.

there is no way I would have sorted it out by myself

Thanks again, I appreciate a lot your help.
__________________
Default Template - V 4.1.10 - Developper
magicosta is offline   Reply With Quote
Old 08-03-2010, 06:55 AM   #6
Customer
 
Join Date: Apr 2009
Location: South of Spain
Posts: 207
Rep Power: 14
magicosta is on a distinguished road
Default

Hello again,

My regional sttings for the date is correctly set up but my date is still written in the english way and I will be better to get it like: Day-Month-Year with a code like that I suppose: %d %m %Y

Anyone can point me to the right direction to alter this date, thank you in advance.
__________________
Default Template - V 4.1.10 - Developper
magicosta is offline   Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
function.css_listings_horizontal plugin jason1971 TemplateCodes 1 03-20-2010 04:59 PM
New_listings plugin jason1971 Templates, HTML, CSS, and Design Help 2 02-25-2010 12:44 PM
{New_Listings} Smarty Plugin - adding city and state LittleRascal Customizations 4 11-15-2009 03:54 PM
new_listings row color mbworks Customizations 7 10-16-2009 11:16 AM
Issue with new_listings plugin jason1971 Technical Support 3 05-07-2009 07:34 AM


All times are GMT -4. The time now is 02:10 AM.


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