LISE expire item based on custom fielddef date

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
rbaby
Forum Members
Forum Members
Posts: 144
Joined: Thu Feb 07, 2008 10:28 pm

LISE expire item based on custom fielddef date

Post by rbaby »

I have a datetime field definition for an event date and I'd like to essentially expire it after this date has passed. I'm not using the "timed control" feature because I can't seem to make that a required field.

a) How do I make the summary templates and detail templates remove this record after the set expiry date at the end of the day?
b) How do I get search to remove/not index it as well?
c) Is there a way to set the record to not be active after it expires?

Optionally... is there a way I can make "Timed Control" required so that I can leverage its pre-existing logic?

Thanks in advance for your time.
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1619
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: LISE expire item based on custom fielddef date

Post by DIGI3 »

You can use probably use module_custom to edit the module templates and add the required parameter.

If you'd rather do it with the field in your form, you'd just update your templates to compare the chosen date to $smarty.now and skip the item if it's expired.
Not getting the answer you need? CMSMS support options
rbaby
Forum Members
Forum Members
Posts: 144
Joined: Thu Feb 07, 2008 10:28 pm

Re: LISE expire item based on custom fielddef date

Post by rbaby »

Thank you DIGI, would that be sufficient in ensuring that it wouldn't be searchable?
Last edited by rbaby on Fri Jul 26, 2019 5:50 pm, edited 1 time in total.
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1619
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: LISE expire item based on custom fielddef date

Post by DIGI3 »

No, not really. It would just output a blank page (or whatever you put in the {else} part of your template). Simplest would just be having it say "this content is no longer available" and perhaps add a meta no-index tag to the page.

You could get creative and have your template update the page headers to 404 with a udt/plugin but at that point it's probably better to just customize the module.
Not getting the answer you need? CMSMS support options
rbaby
Forum Members
Forum Members
Posts: 144
Joined: Thu Feb 07, 2008 10:28 pm

Re: LISE expire item based on custom fielddef date

Post by rbaby »

Sorry for being unclear, I meant the CMSMS search :).
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1619
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: LISE expire item based on custom fielddef date

Post by DIGI3 »

That'd be more difficult. You could exclude them from LISE search/filtering, but for CMSMS search you'd need to get more creative. Either a udt on a cron job, or some customization of the CMSMS search results template, having it do checks on every returned result. Not ideal.

I think just adding the required parameter to the existing expiry fields via module_custom is going to be far easier. You can then make a feature request (and sponsor it, if possible) to have the ability to make that field required in future LISE versions.
Not getting the answer you need? CMSMS support options
rbaby
Forum Members
Forum Members
Posts: 144
Joined: Thu Feb 07, 2008 10:28 pm

Re: LISE expire item based on custom fielddef date

Post by rbaby »

I would love to sponsor a few new features--how do I that?
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1619
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: LISE expire item based on custom fielddef date

Post by DIGI3 »

You need to contact the module's author, JoMorg. He's in the Slack channel quite often so you can @ him on there, message him through this forum, or check the module help to see if there's a contact email address.
Not getting the answer you need? CMSMS support options
Post Reply

Return to “Modules/Add-Ons”