Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Discussion Expiry
An option to set a message to "expire" on a certain day. We use the forum internally for things like shift swaps and company notices and the board can get really cluttered with old posts. I think it would be sweet to have a discussion set to expire when it is no longer relevant. That post could either be set to close, sink, or hide/delete.
Would anyone else find this useful? Any takers on developing one? I am going to try but I am very new to PHP and this may be out of my scope.
Would anyone else find this useful? Any takers on developing one? I am going to try but I am very new to PHP and this may be out of my scope.
0
This discussion has been closed.
Comments
My example: I post info on events that repeat yearly. It would be great to auto-expire
those posts after 240 days, just so there will be less confusion about the 2007 or 2008
event (especially in Vanilla where old discussions are easily 're-posted' to the home page
with one new comment.
I cannot seem to figure out when do i make that check. Check it when the record is pulled from the database. If the posted data is 30 days older than the current day then Its closed on the spot. Or I do I run a automatic script that checks the database once a day and closes old posts.
if u make a mockup of the interface. I'll make an extension of it.
Ideally, I figure there would be an option menu under Settings that would allow you to select the Categories its enabled for (eg: enable for event listings, disable for General Discussion.) but I think that would be more complicated.
Another possible option would be what choices are available for the change (eg: Closed, Sink, Deleted) and maybe what roles have access.
With that said, even a basic version would be handy.
i was thinking discussion expires after X days. which is real easy to do. plus u will be able to assign a default value of 30 days for eg.
to do the way in the mockup. 95% of the code will be to make the calender and 5% to do what the extension is supposed to do
what happens u edit a closed discussion. Should u be allowed to change the time or only admins can do that
What happens when u change ur mind about a particular category not having expiration date. and tons of ur posts for that category already have expirations on them.
If that just complicates things, a text field could be fine with a (MM/DD/YYYY) to the side. Not as user-friendly, but an option. Or just go with a drop down I just think it would be a great Add-on either way.
Re Editing, I guess run a check when resubmitted and if the date is now in the future, change the status back to normal. I am not sure really since this is still all pretty new to me.
...Although if you close someones discussion, they could reopen it just by adding a future expire date. Hmmm I would say the date would have to be edited my a Moderator/admin. OR, even better. Can we create other statuses in addition to the four (sticky, closed, sink, deleted)? If so, a status of "expired" would solve that. Especially if you could hide expired from view.
Re Categories. I would disregard that as an option since I think it just adds too many layers of what-ifs
Update: Here are a couple more
http://www.mattkruse.com/javascript/calendarpopup/ (second and 4th seem best for this)
http://www.javascriptkit.com/script/script2/epoch/index.shtml (last one "Date picker calendar")
http://developer.yahoo.com/yui/examples/calendar/formtxt/2.html (from Yahoo's Code)
users should not be allowed to reopen once its closed.
I like the calender examples. I'm picking the calender popup example 5. It has a nice blocking code, to block out all dates before Today. So users won't mess things up by selecting a previous date than posting date.
Problem without a separate classification.
*Moderator makes a discussion 'closed'.
*User edits their discussion and changes expiration to some date in the future
*That re-establishes the discussion as 'open' and thus the loophole
Fix with 'expired' classification
*Moderator makes a discussion 'closed'.
*Discussion 'expires' (discussion now 'closed' and 'expired')
*User edits their discussion and changes expiration, that removes the 'Expired' tag but it remains 'closed'.
So basically ignore the "and changes to" option in my mockup. The best way would be to have an option in the settings to have 'expired' behave as 'deleted' (hidden), 'closed' (no comments), or 'sink' (comments allowed)
the expiration selection only appears on nonclosed discussions.
Moderators can unclose the discussion. when that happens the expiration thingy appears again and moderator can put in a new date.
Deleted is no good. then people won't find discussions they posted. what if that discussion has imp info for others. and now no one can find it . It has to be closed. So its still visible and searcable
There is one CSS issue I can't seem to solve. the calender icon is appearing below the input field rather than next to it.
Once Someone tells me how to store NULL in the database. I'll upload the extension for testing
But wallphone suggested i add support for verbose dates like "Next month" or "next friday" using strtotime() function. I'll try if i can't do it i'll release what i have now.
what u can do to help is make a nice colored table
I'm using this date picker
http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/
it comes with a butt ugly table colors
make the colors like this calendar from Veerle
http://veerle.duoh.com/blog/comments/a_css_styled_calendar/
u just have to change the color values in the css. thats all. do that and whisper me the css
I am in meeting all day until 11pm EST so I will tackle it then.
Why not? Works for Squirrel