It would be great to have an admin-accessible template for that form, similar to that used for the mylinks module (mylinks_submit.html). It's a little cumbersome to have to modify a php file when simply trying to add a disclaimer such as: "Please note your news submission will be reviewed for relevance to our site."
Any plans of doing that? The list of tweaks I have to re-implement on every upgrade is starting to lenghthen
.
As a help to others, here's what you have to do in /modules/news/include/storyform.inc.php (under 2.0.7) to include a disclaimer just before the bottom form buttons:
include XOOPS_ROOT_PATH."/class/xoopsformloader.php";
$sform = new XoopsThemeForm(_NW_SUBMITNEWS, "storyform", xoops_getenv('PHP_SELF'));
$sform->addElement(new XoopsFormText(_NW_TITLE, 'subject', 50, 80, $subject), true);
ob_start();
$xt->makeTopicSelBox(0);
$sform->addElement(new XoopsFormLabel(_NW_TOPIC, ob_get_contents()));
ob_end_clean();
$sform->addElement($topic_select);
$sform->addElement(new XoopsFormDhtmlTextArea(_NW_THESCOOP, 'message', $message, 15, 60), true);
$option_tray = new XoopsFormElementTray(_OPTIONS,'
');
if ($xoopsUser) {
if ($xoopsConfig['anonpost'] == 1) {
$noname_checkbox = new XoopsFormCheckBox('', 'noname', $noname);
$noname_checkbox->addOption(1, _POSTANON);
$option_tray->addElement($noname_checkbox);
}
$notify_checkbox = new XoopsFormCheckBox('', 'notifypub', $notifypub);
$notify_checkbox->addOption(1, _NW_NOTIFYPUBLISH);
$option_tray->addElement($notify_checkbox);
if ($xoopsUser->isAdmin($xoopsModule->getVar('mid'))) {
$nohtml_checkbox = new XoopsFormCheckBox('', 'nohtml', $nohtml);
$nohtml_checkbox->addOption(1, _DISABLEHTML);
$option_tray->addElement($nohtml_checkbox);
}
}
$smiley_checkbox = new XoopsFormCheckBox('', 'nosmiley', $nosmiley);
$smiley_checkbox->addOption(1, _DISABLESMILEY);
$option_tray->addElement($smiley_checkbox);
$sform->addElement($option_tray);
[b][color=FF0000]$sform->addElement(new XoopsFormLabel('Disclaimer', 'Check your spelling'));[/color][/b]
$button_tray = new XoopsFormElementTray('' ,'');
$button_tray->addElement(new XoopsFormButton('', 'preview', _PREVIEW, 'submit'));
$button_tray->addElement(new XoopsFormButton('', 'post', _NW_POST, 'submit'));
$sform->addElement($button_tray);
$sform->display();
?>
Eric