Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Event Managment/Close dates for posts #8

Open
eckleyval opened this issue Jul 6, 2013 · 4 comments
Open

Event Managment/Close dates for posts #8

eckleyval opened this issue Jul 6, 2013 · 4 comments

Comments

@eckleyval
Copy link

This has been worked on in the forms but we need a better solution. I need event management where I can post pages of events on future dates (which is accessible to the public), and the events will automatically remove themselves from the listings after the event date has passed. This can also be managed via a "close date" function for posts. Some of my clients run a ton of events and they have not been able to manually close everything out, which is the only working solution as of now, so this would be an awesome feature for Hero :D Thanks

@brockf
Copy link
Owner

brockf commented Jul 7, 2013

Hello -

The basic {content} template plugin should already cover you, here, if I understand correctly. You can grab only content items where the close date is >= today's date. Thus all things that have already "closed" will not be retrieved and displayed in the template.

@eckleyval
Copy link
Author

I have noticed a call to a close function in the code, but I have never really found out how to set it in the entry.
How does one go about doing this? The only date in the publish options is the "publish date"... thanks :D

@brockf
Copy link
Owner

brockf commented Jul 7, 2013

You are right, actually. We don't have a great way to retrieve posts by less than or greater than comparisons. For == comparisons, you can add the field name and value right into the {content} tag or publish_model->get_content() call as a $filter. But, in this case, you are kind of at a loss.

We will add a close date for posts in the future that will automatically close them.

@josev814
Copy link

I have a fix for this in my fork. I made all content types with standard fields include an unpublish date. The db holds that date and the status of the content type. Once the unpublish date is encountered, the item is then Disabled. You can still see it in the admin section but the users on the front end will no longer see it. I used a cron hook for that part. Items the have a pub date after the current date will also be Disabled initially, and then enabled once the publish date/time occurs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants