create(ereg_replace('[^_\.0-9a-z-]','-', strtolower($summary)),$details,1,'',0,0)) { db_rollback(); exit_error('Error',$f->getErrorMessage()); } $new_id=$f->getID(); $sanitizer = new TextSanitizer(); $details = $sanitizer->SanitizeHtml($details); $sql="INSERT INTO news_bytes (group_id,submitted_by,is_approved,post_date,forum_id,summary,details) ". " VALUES ('$group_id','".user_getid()."','0','".time()."','$new_id','".htmlspecialchars($summary)."','".$details."')"; $result=db_query($sql); if (!$result) { db_rollback(); $feedback = ' '._('ERROR doing insert').' '; } else { db_commit(); $feedback = ' '._('News Added.').' '; } } else { $feedback = ' '._('ERROR - both subject and body are required').' '; } } //news must now be submitted from a project page - if (!$group_id) { exit_no_group(); } /* Show the submit form */ news_header(array('title'=>_('News'))); $jsfunc = notepad_func(); $group = group_get_object($group_id); echo '
'. sprintf(_('You can post news about your project if you are an admin on your project. You may also post "help wanted" notes if your project needs help.
All posts for your project will appear instantly on your project summary page. Posts that are of special interest to the community will have to be approved by a member of the %1$s news team before they will appear on the %1$s home page.
You may include URLs, but not HTML in your submissions.
URLs that start with http:// are made clickable.'), $GLOBALS['sys_name']) .'
' . $jsfunc . ''; news_footer(array()); } else { exit_not_logged_in(); } // Local Variables: // mode: php // c-file-style: "bsd" // End: ?>