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", "\nIf 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" . '