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.
if discussion older than X days display text.
Vaz
New
Hi,
I'm not fluent at all with php. I was wondering if someone could write up some code to display text if the the last post if older than X days.
psuedo code:
if last post > 30 days
write "This discussion has be inactive for more than 30 days. Please consider starting a new discussion"
else
nothing
also where would the template edit need to be made in order for it to appear just above 'enter your comments' box.
Kind regards,
Vaz
0
This discussion has been closed.
Comments
Where do u want the message to appear.
Create a new nugget
Select "Hide Nugget name"
Pan: "Below Content"
Weight: -10
Pages: Comment List only
NuggetContent:
<?php global $CommentGrid; if (strtotime("now") > $CommentGrid->Discussion->DateLastActive+(30*24*60*60)) { echo '<div style="border:#FFEDAE 1px solid; background-color:#FEF9E9;padding:10px;margin:10px 0;text-align:center;font-size:20px;" >This discussion has be inactive for more than 30 days. Please consider starting a new discussion</div>'; } ?>
style it as you wish
Mini you are right. the Discussion expiration should state as to why the discussion is closed. it will help admins know the cause of foreclosure :P