What do you mean "auto end date"? Do you have the rest of it working?
Superficially this is a simple mod, but in actuality it's a bit more complex than first look would indicate. Once the plug-in system is finalized and more people have understanding of it, this would become a much more viable project.
If all you want is a special offer attached to a link, you can add two fields to the link "Offer" and "Offer_Expire" Offer_Expire is a date. In the link-build routine just check for the date in Offer_Expire and if it's less than today, set it to ''.
If you wanted to have a separate database of offers:
ID, Offer Title, Description, Owner, Start, Expire
Then, just add a field "Offer_ID" to the Link record. During a build, check for
if ($rec->{'Offer_ID'}) { do something, set some variables, grab the offer, etc }
This adds overhead that is not there for the first solution, but it makes things a little more flexible, and ties the offer to an "Owner" rather than a Link.
PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://pugdog.com/FAQ
Superficially this is a simple mod, but in actuality it's a bit more complex than first look would indicate. Once the plug-in system is finalized and more people have understanding of it, this would become a much more viable project.
If all you want is a special offer attached to a link, you can add two fields to the link "Offer" and "Offer_Expire" Offer_Expire is a date. In the link-build routine just check for the date in Offer_Expire and if it's less than today, set it to ''.
If you wanted to have a separate database of offers:
ID, Offer Title, Description, Owner, Start, Expire
Then, just add a field "Offer_ID" to the Link record. During a build, check for
if ($rec->{'Offer_ID'}) { do something, set some variables, grab the offer, etc }
This adds overhead that is not there for the first solution, but it makes things a little more flexible, and ties the offer to an "Owner" rather than a Link.
PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://pugdog.com/FAQ