It would be beneficial to have the ability to specify the duration for which a listing will remain active or visible.
Agreed and the best way to handle this is to have an integer permission to set the Item expire length, so that when a member creates a
new Item, the expire date is set based on that users final permission (might be 90 days, might be 180 days, might be 365 days, might be unlimited (never expires)).
Doing it this way allows you to monetize based on User Group instead of an LD Option that would apply to all newly created items.
There is a new LD Item permission "Item expire length". This is used to determine the expire date during the initial item create process.
Remember, INT permissions take the HIGHEST value for the final value, so if Registered User Group is set to 90 days, Premium User Group is set to 180 days and Staff to Unlimited, if the viewing user is only in the Registered User Group, their listing will be set to expire in 90 days, however, if they are also in the Premium User Group, heir listing will be set to expire in 180 days and if they are a Moderator or Admin, the listing will be set to not expire. KISS!
Important Note:
The upgrade handles the setting of the Item expire length permission for all user groups and sets this permission to UNLIMITED!
As part of Post Upgrade steps, you will need to edit all of your user groups and set the Item expire length to the appropriate length for that group (or just leave it to unlimited if you don't want new items to expire).
OK, so that covers setting an expire date when
CREATING A NEW ITEM.
But what about existing items?
Moderators should be able to set an expiration date or choose to have the listing never expire.
Similar to CAS, there are two Moderator functions for managing the expire date and status (active or expired). One is for
Active Items, the other is for
Expired Items.
Active Items have a moderator function "Change item expire date".
This allows a moderator to edit an active item and set an expire date for an item that is currently set to not expire (which all existing items are set to not expire). You simply set the expire date to a date in the future when you want that listing to expire.
This same function is used to change the expire date of items that have an expire date set. In this screenshot, the item is set to expire on April 2nd, 2025. That date can be changed (to include setting it into the past, which will expire the item when saved).
Expired Items have a moderator function "Change item expire status".
This function allows a moderator to edit an
expired item and change the status from expired to active. You simply set the Status to Active, set the expire date to a date in the future (setting it into the past will just expired the listing) and save.
Note: If you don't want the Item to expire, simply clear the expire date (click on the circled x in the date input).
How are Items Expired?
Via the
autoExpireItems()
function that is run during the LD: Hourly cleanup Cron.
Who can view Expired Items?
- Item Owners
- Contributors
- Moderators (w/permission)
Item Owners and Contributors can always view their own expired items.
Moderators can view if they have the permission "View expired items". They also need to be able to edit any item.
Where are Expired Items displayed?
Note:
In all of these scenarios, you must be able to view expired Items!
LD Tab >> "Your content" >> "Your expired items". This is the "Your items" page with a FILTER Status "Expired".
If you have permission, you can also view another members "Items" page... "[Author]'s expired items". This is the "[Authors]'s items" page with a FILTER Status "Expired".
LD Index and LD Category pages. These pages now only fetch
ACTIVE items (same as CAS only fetching
OPEN ads).
If you have permission to view expired items, there will be a Status Fitler that lets you fetch Expired Items (last filter, just above sort types).
Here you can see that I am filtering the Link Directory Index page by Status: Expired.
In this shot, you can see what an expired Item looks like.
Note: When an Item is Expired, none of its content is publicly viewable (comments, ratings, questions etc). This includes being fetch for widgets.
Note: When an Item is Expired, so are most of its functions (can't post comments, can't rate, can't ask questions etc).
Do Item Authors receive an alert when their listing expires? Of course
That's pretty much it in a nutshell.