Changeset 917:8017d60b617d for plugins/pages/page.php
- Timestamp:
- 10/26/12 17:42:29 (13 years ago)
- Branch:
- default
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/pages/page.php
r911 r917 428 428 '<p><label for="post_open_comment" class="classic">'.form::checkbox('post_open_comment',1,$post_open_comment).' '. 429 429 __('Accept comments').'</label></p>'. 430 ($core->blog->settings->system->allow_comments ? 431 (isContributionAllowed($post_id,strtotime($post_dt),true) ? 432 '' : 433 '<p class="form-note warn">'.__('Warning: Comments are not more accepted for this page.').'</p>') : 434 '<p class="form-note warn">'.__('Warning: Comments are not accepted on this blog.').'</p>'). 430 435 431 436 '<p><label for="post_open_tb" class="classic">'.form::checkbox('post_open_tb',1,$post_open_tb).' '. 432 437 __('Accept trackbacks').'</label></p>'. 438 ($core->blog->settings->system->allow_trackbacks ? 439 (isContributionAllowed($post_id,strtotime($post_dt),false) ? 440 '' : 441 '<p class="form-note warn">'.__('Warning: Trackbacks are not more accepted for this page.').'</p>') : 442 '<p class="form-note warn">'.__('Warning: Trackbacks are not accepted on this blog.').'</p>'). 433 443 434 444 '<p><label for="post_selected" class="classic">'.form::checkbox('post_selected',1,$post_selected).' '. … … 614 624 } 615 625 626 # Controls comments or trakbacks capabilities 627 function isContributionAllowed($id,$dt,$com=true) 628 { 629 global $core; 630 631 if (!$id) { 632 return true; 633 } 634 if ($com) { 635 if (($core->blog->settings->system->comments_ttl == 0) || 636 (time() - $core->blog->settings->system->comments_ttl*86400 < $dt)) { 637 return true; 638 } 639 } else { 640 if (($core->blog->settings->system->trackbacks_ttl == 0) || 641 (time() - $core->blog->settings->system->trackbacks_ttl*86400 < $dt)) { 642 return true; 643 } 644 } 645 return false; 646 } 616 647 617 648 # Show comments or trackbacks
Note: See TracChangeset
for help on using the changeset viewer.