I have one question related to How to forbid user to edit his own question?
As I must prevent users editing their posts I need to disable that option.
How I hacked the qa-page-question-view.php now:
At the end of function qa_page_q_post_rules() I added:
$rules['editable'] = $rules['editbutton'] = $rules['hideable'] = false;
$level=qa_get_logged_in_level();
if ($level>=QA_USER_LEVEL_ADMIN) {
$rules['editable'] = $rules['editbutton'] = $rules['hideable'] = true;
}
This works (and I hope is correct). could be coded shorter of course.
However, it would be great to have a time-based disable of the edit button. So how can I check how old the question is?
Something like 10 minutes (for sure wrong call, and does it give unix timestamp?):
if($this -> $post['created']>10*60) { ... }
Thanks!