http://mozdev.org/bugs/show_bug.cgi?id=2345 $text = eregi_replace("(bug[\ ]+[#%]?[0-9]{1,})", "\\1",$text); $text = eregi_replace('"bug[\ ]+[#%]?', '"http://' . HOST . '/bugs/show_bug.cgi?id=', $text); return $text; } function slash($_page) { // if no leading slash - add one if ( !ereg('^/', $_page) ) { return '/'; } } function findComments($text) { // find and 'linkify' mozdev comment references in posts // // Initial version, only places links into html, mail and NG miss out : ) // comment[\ ]?[#%]?[0-9]{1,} // comment 2345 // comment #2345 // comment %2345 -> http://PROJECT.mozdev.org/PAGE#2345 $text = eregi_replace("(comment[\ ]+[#%]?[0-9]{1,})", "\\1",$text); $text = eregi_replace('"comment[\ ]+[#%]?', '"' . THIS_PAGE, $text); return $text; } function findLinks($text) { // find and 'linkify' links $text = eregi_replace("((http|https|ftp):\/\/[^[:space:]<>]{1,})", "\\1",$text); /* find name@host.tld, where no mailto: $regExp = "^[\+\&_\.0-9a-z-]+@([0-9a-z]+-*[0-9a-z]+[^-]*[.]?)+([a-z]{2,4}[.]?$)"; eregi_replace $regExp, mailto:$regExp */ $text = eregi_replace("(mailto:[^[:space:]<>]{1,})", "\\1",$text); // tidy email references $text = str_replace('>mailto:', '>', $text); return $text; } function htmlise($text) { $text = htmlspecialchars(str_replace("\\", "", $text)); $text = findLinks($text); $text = findBugs($text); $text = findComments($text); $text = ereg_replace("\r\n\r\n", "\n

", $text); $text = ereg_replace("\r\n", "\n
", $text); return $text; } ?>

User Notes: [?]
HTML is not allowed in posts.
URLs in the text that use mailto:, https://, http:// and ftp:// will be converted into hyperlinks.

If you do not get a response to a question posted in this forum, please try sending a message to the project's mailing list or to the project owner directly.

[', $file); $_strap = array_reverse($_parts); $_parts = explode(']<', $_strap[0]); $NOTE_date = intval($_parts[0]); // increment count $NOTE_date += 1; $author_prepend .= THIS_PAGE . $NOTE_date; // -- /make link to this comment if ( $post_to_list ) { $mailto = $project . '@' . HOST; if ( isset($author) ) { $extra = 'Bcc: ' . base64_decode($_POST['author']) . "\n"; } } elseif ( isset($author) ) { $mailto = base64_decode($_POST['author']); } if ( $target_page == 'Index' && $page != '/index.html' ) { // if [Index] try subdirectory above : e.g. games.m.o/xultris/index.html -> Xultris $target_page = ucwords( substr($page, 0, strrpos($page, "/")) ); $target_page = str_replace('/', '', $target_page); } if ( isset($target_page_override) ) { // if author / developer has something else in mind use that : $target_page = ucwords($target_page_override); } if ( !empty($target_page) ): $target_page = ' [' . $target_page . ']'; endif; // $name = ereg_replace('^\ ', '', $name); $name = ereg_replace('<[^>]+>', '', $name); // pre-process name $name_html = htmlspecialchars($name); // pre-process entry $message_html = htmlise($message); if(!file_exists($target_dir)) mkdir($target_dir, 0755); // link placement subject to committee $c_link = '['; $c_link .= $NOTE_date . '] '; // $c_link should be [$NOTE_date] // create start of entry $start = "\n\n" . ''; // Pointless options if to be globally accepted if ( !$hide_c_link ) { $start .= $c_link . ' '; } $start .= '' . "\nSubmitted by: "; // Pointless options if to be globally accepted $head = "$name"; if ( $not_bugzilla_format ) { $head .= '
'; } else { $head .= ' '; } $head .= DATE . "\n\n"; $head .= '' . "\n"; // pre-process entry // fin $end = "
\n\n\n"; // trying to prevent reload from adding (yet) another post/email/NG post $already_posted = false; $already_posted = strstr($file, $head . $message_html . $end); if( ($post_to_list || isset($author) ) && !empty($name) && !empty($message) && !$already_posted) { mail($mailto, PROJECT.":$target_page New Feedback from $name", $author_prepend . "\n\n" . $message, "From: notes@mozdev.org\n" . $extra); } // write to file if fields not left blank if(!empty($name) && !empty($message) && !$already_posted) { // open file handle to append $fp = fopen ($readfile, "a"); fwrite ($fp, $start.$head.$message_html.$end); fclose ($fp); } }// /if ($_POST['message']) function new_notes($file) { $start = implode('', file($file)); $start = str_replace("\r\n", "\n", $start); // lineendings fun ? fix $start = str_replace("\n\r", "\n", $start); // lineendings fun ? fix $start = eregi_replace("\n{4,}", "\n\n\n", $start); // may fix the count problem - or not $start = str_replace("\n\n", "\n", $start); if ( ereg("\r\n", $start) || ereg("\n", $start) ) { $middle = explode('", '[' . $j . '] ', $second[$i]); $second[$i] = eregi_replace("", ' ', $second[$i]); $end .= $second[$i] . "\n\n\n"; } for ( $i = 1; $middle[$i] != ''; ++$i ) { $end .= '' . "\n"; // new_notes($readfile); readfile($readfile); echo ''; echo '' . "\n"; if ( !$hide_text_control ) { echo '

HTML is not allowed'; echo ' in posts.
' . "\n"; echo 'URLs in the text that use mailto:,'; echo ' https://, http:// and ftp:// will be converted into hyperlinks.
' . "\n"; } } if (!$hide_text_control) { echo '
' . "\n"; echo '
' . "\n"; echo '

'; if ( isset($author) ) echo '' . "\n"; ?>
To add your own comment, fill in the form below. [?]
(Note: use two carriage returns to start a new paragraph.)