• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: LISE expire item based on custom fielddef date
PostPosted: Fri Jul 26, 2019 11:27 am 
Offline
Forum Members
Forum Members

Joined: Thu Feb 07, 2008 10:28 pm
Posts: 144
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.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: LISE expire item based on custom fielddef date
PostPosted: Fri Jul 26, 2019 3:55 pm 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Wed Feb 25, 2009 4:25 am
Posts: 904
Location: Victoria, BC
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


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: LISE expire item based on custom fielddef date
PostPosted: Fri Jul 26, 2019 5:44 pm 
Offline
Forum Members
Forum Members

Joined: Thu Feb 07, 2008 10:28 pm
Posts: 144
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.

Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: LISE expire item based on custom fielddef date
PostPosted: Fri Jul 26, 2019 5:47 pm 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Wed Feb 25, 2009 4:25 am
Posts: 904
Location: Victoria, BC
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


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: LISE expire item based on custom fielddef date
PostPosted: Fri Jul 26, 2019 5:51 pm 
Offline
Forum Members
Forum Members

Joined: Thu Feb 07, 2008 10:28 pm
Posts: 144
Sorry for being unclear, I meant the CMSMS search :).


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: LISE expire item based on custom fielddef date
PostPosted: Fri Jul 26, 2019 5:55 pm 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Wed Feb 25, 2009 4:25 am
Posts: 904
Location: Victoria, BC
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


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: LISE expire item based on custom fielddef date
PostPosted: Fri Jul 26, 2019 6:12 pm 
Offline
Forum Members
Forum Members

Joined: Thu Feb 07, 2008 10:28 pm
Posts: 144
I would love to sponsor a few new features--how do I that?


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: LISE expire item based on custom fielddef date
PostPosted: Fri Jul 26, 2019 6:14 pm 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Wed Feb 25, 2009 4:25 am
Posts: 904
Location: Victoria, BC
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


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
A2 Hosting