private function loadForm()
{
$this->isGod = BackendAuthentication::getUser()->isGod();
$this->frm = new BackendForm('settings');
// add fields for pagination
$this->frm->addDropdown('overview_number_of_items', array_combine(range(1, 30), range(1, 30)), $this->get('fork.settings')->get($this->URL->getModule(), 'overview_num_items', 10));
$this->frm->addDropdown('recent_articles_full_number_of_items', array_combine(range(1, 10), range(1, 10)), $this->get('fork.settings')->get($this->URL->getModule(), 'recent_articles_full_num_items', 5));
$this->frm->addDropdown('recent_articles_list_number_of_items', array_combine(range(1, 10), range(1, 10)), $this->get('fork.settings')->get($this->URL->getModule(), 'recent_articles_list_num_items', 5));
// add fields for spam
$this->frm->addCheckbox('spamfilter', $this->get('fork.settings')->get($this->URL->getModule(), 'spamfilter', false));
// no Akismet-key, so we can't enable spam-filter
if ($this->get('fork.settings')->get('Core', 'akismet_key') == '') {
$this->frm->getField('spamfilter')->setAttribute('disabled', 'disabled');
$this->tpl->assign('noAkismetKey', true);
}
// add fields for comments
$this->frm->addCheckbox('allow_comments', $this->get('fork.settings')->get($this->URL->getModule(), 'allow_comments', false));
$this->frm->addCheckbox('moderation', $this->get('fork.settings')->get($this->URL->getModule(), 'moderation', false));
// add fields for notifications
$this->frm->addCheckbox('notify_by_email_on_new_comment_to_moderate', $this->get('fork.settings')->get($this->URL->getModule(), 'notify_by_email_on_new_comment_to_moderate', false));
$this->frm->addCheckbox('notify_by_email_on_new_comment', $this->get('fork.settings')->get($this->URL->getModule(), 'notify_by_email_on_new_comment', false));
// add fields for SEO
// @TODO remove this when the api is kicked out
$this->frm->addCheckbox('ping_services', $this->get('fork.settings')->get($this->URL->getModule(), 'ping_services', false));
// add fields for RSS
$this->frm->addCheckbox('rss_meta', $this->get('fork.settings')->get($this->URL->getModule(), 'rss_meta_' . BL::getWorkingLanguage(), true));
$this->frm->addText('rss_title', $this->get('fork.settings')->get($this->URL->getModule(), 'rss_title_' . BL::getWorkingLanguage()));
$this->frm->addTextarea('rss_description', $this->get('fork.settings')->get($this->URL->getModule(), 'rss_description_' . BL::getWorkingLanguage()));
// god user?
if ($this->isGod) {
$this->frm->addCheckbox('show_image_form', $this->get('fork.settings')->get($this->URL->getModule(), 'show_image_form', true));
}
}