PHP Help - Bumping of Ads

Status
Not open for further replies.

offloadit

New Member
Anyone know how to set it up so that adverts on a classifieds site can be bumped up to the top?

My classifieds website uses PHP for the placement of new ads but I want to allow users to bump their ads to the top (for a small fee).
 

php.allstar

New Member
I'd say your script displays ads in reverse chronological order (i.e. - newest ads first) this is the norm.

If so, its just a matter of writing a custom "bump" script where the user provides the username and password and possibly the id of the ad they want to bump. If the credentials are correct the user is prompted for payment details. Upon payment success, the payment processor triggers your script to update the ad in the database with the current timestamp.

You'd possibly want to modify your database for this. It's always a good idea to keep the original timestamp of when the ad was erm, added, just add a timestamp field for "bump" which by default gets set with the current timestamp when the user initially adds their ad. Then just modify your php script to sort listings by this "bump" field.

Hope I haven't confused you too much!
 
Status
Not open for further replies.
Top