Support Forums

Modify listing - reset dateadded

This is a discussion on Modify listing - reset dateadded within the Technical Support forums, part of the Technical Support Forums category; All When a user renews their ad, we want to set the date added to the date renewed so that ...


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 10-14-2009, 09:07 AM   #1
Customer
 
Join Date: Jun 2009
Location: Oxford, UK
Posts: 47
Rep Power: 5
mark is on a distinguished road
Default Modify listing - reset dateadded

All

When a user renews their ad, we want to set the date added to the date renewed so that the ad appears at the top of the listings for that category and new listings etc. I think that I may have found a way to achieve this with minimal coding and was looking for some input from the experts out there.

In listings.php, the function editListing($data) updates the listing after an edit. I was hoping to
slot in : $now=date_now();
and replace: GetSQLValueString($data['dateadded'], "text"),
with: GetSQLValueString($now, "text"),
for the $sSQL UPDATE statement.

I am aware that this would populate any modified listing with the new dateadded but I think we could live with this.

Any thoughts?

Cheers

Mark
4... Developer
mark is offline  
Old 10-14-2009, 09:12 AM   #2
curmudgeon
 
Join Date: Mar 2006
Posts: 5,248
Rep Power: 128
Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light
Default

If I was a user on your site and I knew I could just edit my ad to get its dateadded changed so it stayed at the top of things like recent ad listings etc I would be editing it every day.
__________________
Larry

Knowledge learned is more valuable than knowledge given.
Lhotch is offline  
Old 10-14-2009, 09:26 AM   #3
Customer
 
Join Date: Jun 2009
Location: Oxford, UK
Posts: 47
Rep Power: 5
mark is on a distinguished road
Default

Yes I can see that. But they could renew everyday and do the same.

I was going to implement and see what the result would be. If users were modfying every day, we could just turn it off and find another solution. It's finding the other solution that I am struggling to find.

Mark
mark is offline  
Old 10-15-2009, 06:37 AM   #4
Senior Member
 
MrGForce's Avatar
 
Join Date: May 2009
Posts: 219
Rep Power: 10
MrGForce is on a distinguished road
Default

Good Morning Mark;

I've asked the same question several times in the forum and get the same response that you are getting. It shouldn't matter that others don't like the idea of changing the date added when a listing is edited, but there are those like us that would like this to be the case.

If I'm able to come up with a solution, I'll let you know. If you do, please let me know. Thanks.
__________________
MrGForce

Currently running 68Classifieds v4.1.5 Developer Edition ... Purple Template
MrGForce is offline  
Old 10-15-2009, 08:24 AM   #5
curmudgeon
 
Join Date: Mar 2006
Posts: 5,248
Rep Power: 128
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 MrGForce
Good Morning Mark;

I've asked the same question several times in the forum and get the same response that you are getting. It shouldn't matter that others don't like the idea of changing the date added when a listing is edited, but there are those like us that would like this to be the case.

If I'm able to come up with a solution, I'll let you know. If you do, please let me know. Thanks.
Personally I am a bit confused by the question in this thread. I understand what you want to do and Marks method should work. He should try it and find out. I assumed he was asking more for input on the why and if anyone saw a problem with it.

With coding its not always as simple as asking for an answer to the question of "whats 2 + 2?" and sometimes the best thing to do is try it. We have files nested in files and functions that call functions so sometimes the obvious answer doesnt always work as planned.

With that being said, you have been given a few pointers on how to accomplish your goal, you reported they didnt work but at the end of the day you are asking someone to cough up some code that works which means you want someone to dream up the code, implement it in a site, create an ad, edit the ad and just flat out test it for you.

If this functionality is so important to you then why dont you learn to use PHP?
__________________
Larry

Knowledge learned is more valuable than knowledge given.
Lhotch is offline  
Old 10-15-2009, 09:06 AM   #6
Senior Member
 
MrGForce's Avatar
 
Join Date: May 2009
Posts: 219
Rep Power: 10
MrGForce is on a distinguished road
Default

Didn't think we were asking for the world. Sorry it caused such a negative response.

I won't ask again, ever.

Have a great day.
__________________
MrGForce

Currently running 68Classifieds v4.1.5 Developer Edition ... Purple Template
MrGForce is offline  
Old 10-15-2009, 09:22 AM   #7
68 Classifieds Staff
 
Eric Barnes's Avatar
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,471
Rep Power: 130
Eric Barnes is just really nice Eric Barnes is just really nice
Default

Things like this are why we added the new feedback system. Just make a request for a new date modified field and then if that is added it would be very easy to work with.
__________________
Eric Barnes
68 Classifieds Developer
Customer Area | Issue Tracker | Documentation | 68C Mods | 68 @ Twitter | My Modules
Eric Barnes is online now  
Old 10-15-2009, 09:47 AM   #8
curmudgeon
 
Join Date: Mar 2006
Posts: 5,248
Rep Power: 128
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 MrGForce
Didn't think we were asking for the world. Sorry it caused such a negative response.

I won't ask again, ever.

Have a great day.
Asking a question is fine and dandy, thats what the forum is for.

But then you go on to complain that you have asked many times before and still dont have an answer. It comes across like you expect people here to drop what they are doing and whip up some tested custom code for you. No where does it state that all of your custom coding needs will be freely given in a timely fashion.

The world revolves around knowledge. If you dont know how to replace your water heater you learn how or pay someone to do it for you. If your car breaks down you learn to fix it or pay someone to do it. When it comes to running a web site why do people assume that someone else should take time to solve their problem?

Have YOU tried Marks method above? I said above that it should work but you seem upset that I am not taking the time to implement and test it for you.

Where is your ownership of finding a solution to your problem? You dont seem to be taking any responsibility for finding a solution yourself beyond asking others to do it for you.
__________________
Larry

Knowledge learned is more valuable than knowledge given.
Lhotch is offline  
Old 10-15-2009, 12:09 PM   #9
Customer
 
Join Date: Jun 2009
Location: Oxford, UK
Posts: 47
Rep Power: 5
mark is on a distinguished road
Default

Been busy today with a featured listing problem and should have it sorted soon.

I will try my proposed changes in the morning and let you all know.

Mark
mark is offline  
Old 10-16-2009, 08:26 AM   #10
Customer
 
Join Date: Jun 2009
Location: Oxford, UK
Posts: 47
Rep Power: 5
mark is on a distinguished road
Default

All

Unfortunately the code:
In listings.php, the function editListing($data) updates the listing after an edit. I was hoping to
slot in : $now=date_now();
and replace: GetSQLValueString($data['dateadded'], "text"),
with: GetSQLValueString($now, "text"),
for the $sSQL UPDATE statement.

Had no effect whatsoever. I even replaced the expiration date to date_now() and this had no effect either. Seems as though the function editListing($data) in Listings.php is not called when renewing the listing.

However, I did notice that when renewing a listing it is labeled as Upgrade in the user browse listings.

I have tried this through user->browse my listings and also by following the link given in the renewal email and both had no change in dateadded.

Does anyone know which function is called when an upgrade/renew is performed?

Mark
mark is offline  
Closed Thread

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
provide Modify Listing link on viewlisting page business Technical Support 9 07-04-2009 11:05 AM
user/Modify Listing Error in (IE) Only newcastledirectory Technical Support 9 01-19-2009 04:41 PM
modify listing issue centinel3 Technical Support 4 08-21-2008 09:54 AM


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


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