(.*?)\ wrote:/i", "<quote><b>\\1 " . _HASWROTE . " :</b><br />", $text); if ($bbcodeoff == 0) { $text = preg_replace("/\[color=(.*?)\](.*?)\[\/color\]/i", "<font color=\"\\1\">\\2</font>", $text); $text = preg_replace("/\[size=(.*?)\](.*?)\[\/size\]/i", "<font size=\"\\1\">\\2</font>", $text); $text = preg_replace("/\[font=(.*?)\](.*?)\[\/font\]/i", "<font face=\"\\1\">\\2</font>", $text); $text = preg_replace("/\[align=(.*?)\](.*?)\[\/align\]/i", "<p align=\"\\1\">\\2</p>", $text); $text = str_replace("
", "<b>", $text); $text = str_replace("", "</b>", $text); $text = str_replace("
", "<i>", $text); $text = str_replace("", "</i>", $text); $text = str_replace("
", "<u>", $text); $text = str_replace("", "</u>", $text); $text = str_replace("[li]", "<li>", $text); $text = str_replace("[/li]", "</li>", $text); $text = str_replace("[center]", "<center>", $text); $text = str_replace("[/center]", "</center>", $text); $text = str_replace("[strike]", "<strike>", $text); $text = str_replace("[/strike]", "</strike>", $text); $text = str_replace("[blink]", "", $text); $text = str_replace("[/blink]", "", $text); $text = str_replace("[flip]", "", $text); $text = str_replace("[/flip]", "", $text); $text = str_replace("[blur]", "", $text); $text = str_replace("[/blur]", "", $text); $text = preg_replace("/\[glow\](.*?)\[\/glow\]/i", "", $text); $text = preg_replace("/\[glow=(.*?)\](.*?)\[\/glow\]/i", "", $text); $text = preg_replace("/\[shadow\](.*?)\[\/shadow\]/i", "", $text); $text = preg_replace("/\[shadow=(.*?)\](.*?)\[\/shadow\]/i", "", $text); $text = preg_replace("/\[email\](.*?)\[\/email\]/i", "<a href=\"mailto:\\1\">\\1</a>", $text); $text = preg_replace("/\[email=(.*?)\](.*?)\[\/email\]/i", "<a href=\"mailto:\\1\">\\2</a>", $text); $text = preg_replace("/\[img\](.*?)\[\/img\]/i", "<img src=\"\\1\" border=\"0\">", $text); $text = preg_replace("/\[img=(.*?)x(.*?)\](.*?)\[\/img\]/i", "<img width=\"\\1\" height=\"\\2\" src=\"\\3\" border=\"0\">", $text); $text = preg_replace("/\[flash\](.*?)\[\/flash\]/i", "", $text); $text = preg_replace("/\[flash=(.*?)x(.*?)\](.*?)\[\/flash\]/i","", $text); $text = preg_replace("/\[url\]www.(.*?)\[\/url\]/i", "<a href=\"http://www.\\1\" target=\"_blank\">\\1</a>", $text); $text = preg_replace("/\[url\](.*?)\[\/url\]/i", "<a href=\"\\1\" target=\"_blank\">\\1</a>", $text); $text = preg_replace("/\[url=(.*?)\](.*?)\[\/url\]/i", "<a href=\"\\1\" target=\"_blank\">\\2</a>", $text); $text = str_replace("\r", "", $text); $text = str_replace("\n", "<br />", $text); $text = ltrim($text); } if ($smileyoff == 0) { $text = icon($text); } $text = str_replace("<font color=\"red;\">", "<font color=\"#FF0000\">", $text); $text = str_replace("<font color=\"darkred\">", "<font color=\"#8B0000\">", $text); $text = str_replace("<font color=\"blue\">", "<font color=\"#0000FF\">", $text); $text = str_replace("<font color=\"darkblue\">", "<font color=\"#00008B\">", $text); $text = str_replace("<font color=\"orange\">", "<font color=\"#FFA500\">", $text); $text = str_replace("<font color=\"orange\">", "<font color=\"#FFA500\">", $text); $text = str_replace("<font color=\"brown\">", "<font color=\"#A52A2A\">", $text); $text = str_replace("<font color=\"yellow\">", "<font color=\"#FFFF00\">", $text); $text = str_replace("<font color=\"green\">", "<font color=\"#008000\">", $text); $text = str_replace("<font color=\"violet\">", "<font color=\"#EE82EE\">", $text); $text = str_replace("<font color=\"olive\">", "<font color=\"#808000\">", $text); $text = str_replace("<font color=\"cyan\">", "<font color=\"#00FFFF\">", $text); $text = str_replace("<font color=\"indigo\">", "<font color=\"#4B0082\">", $text); $text = str_replace("<font color=\"white\">", "<font color=\"#FFFFFF\">", $text); $text = str_replace("<font color=\"black\">", "<font color=\"#000000\">", $text); $text = str_replace(""", "\"", $text); $text = str_replace("'", "\'", $text); $text = str_replace("à", "à", $text); $text = str_replace("â", "â", $text); $text = str_replace("é", "é", $text); $text = str_replace("è", "è", $text); $text = str_replace("ê", "ê", $text); $text = str_replace("û", "û", $text); $texte = $posted . $text; $articleurl = $nuked['url'] . "/index.php?file=News&op=index_comment&news_id=" . $news_id; include ('Includes/html2fpdf/html2fpdf.php'); $sitename = $nuked['name'] . " - " . $nuked['slogan']; $sitename = @html_entity_decode($sitename); $texte = "<h1>".$title."</h1><hr />".$texte."<hr />".$sitename."<br />".$articleurl; $file = $sitename."_".$title; $file = str_replace(' ','_',$file); $file .= ".pdf"; $pdf = new HTML2FPDF(); $pdf->AddPage(); $pdf->header(); $pdf->WriteHTML($texte); $pdf->Output($file,D); } function sendfriend($news_id) { global $nuked, $user, $captcha; opentable(); echo "<script type=\"text/javascript\">\n" ."<!--\n" ."\n" . "function verifchamps()\n" . "{\n" . "\n" . "if (document.getElementById('sf_pseudo').value.length == 0)\n" . "{\n" . "alert('" . _NONICK . "');\n" . "return false;\n" . "}\n" . "\n" . "if (document.getElementById('sf_mail').value.indexOf('@') == -1)\n" . "{\n" . "alert('" . _BADMAIL . "');\n" . "return false;\n" . "}\n" . "\n" . "return true;\n" . "}\n" ."\n" . "// -->\n" . "</script>\n"; $sql = mysql_query("SELECT titre FROM " . NEWS_TABLE . " WHERE id = '" . $news_id . "'"); list($title) = mysql_fetch_array($sql); $title = stripslashes($title); $title = stripslashes($title); echo "<form method=\"post\" action=\"index.php?file=News\" onsubmit=\"return verifchamps()\">\n" . "<table style=\"margin-left: auto;margin-right: auto;text-align: left;\" width=\"60%\" cellspacing=\"1\" cellpadding=\"1\" border=\"0\">\n" . "<tr><td align=\"center\"><br /><big><b>" . _FSEND . "</b></big><br /><br />" . _YOUSUBMIT . " :<br /><br />\n" . "<b>" . $title . "</b><br /><br /></td></tr><tr><td align=\"left\">\n" . "<b>" . _YNICK . " : </b> <input type=\"text\" id=\"sf_pseudo\" name=\"pseudo\" value=\"" . $user[2] . "\" size=\"20\" /></td></tr>\n" . "<tr><td><b>" . _FMAIL . " : </b> <input type=\"text\" id=\"sf_mail\" name=\"mail\" value=\"
mail@gmail.com\" size=\"25\" /></td></tr>\n" . "<tr><td><b>" . _YCOMMENT . " : </b><br /><textarea name=\"comment\" cols=\"60\" rows=\"10\"></textarea></td></tr>\n"; if ($captcha == 1) create_captcha(1); echo "<tr><td align=\"center\"><input type=\"hidden\" name=\"op\" value=\"sendnews\" />\n" . "<input type=\"hidden\" name=\"news_id\" value=\"" . $news_id . "\" />\n" ." <input type=\"hidden\" name=\"title\" value=\"" . $title . "\" />\n" ." <input type=\"submit\" value=\"" . _SEND . "\" /></td></tr></table></form><br />\n"; closetable(); } function sendnews($title, $news_id, $comment, $mail, $pseudo) { global $nuked, $user_ip, $captcha; opentable(); if ($captcha == 1 && $_POST['code_confirm'] != crypt_captcha($_POST['code'])) { echo "<div style=\"text-align: center;\"><br /><br />" . _BADCODECONFIRM . "<br /><br /><a href=\"javascript:history.back()\">[ <b>" . _BACK . "</b> ]</a></div>"; } else { $date2 = time(); $date2 = strftime("%x %H:%M", $date2); $title = stripslashes($title); $comment = stripslashes($comment); $mail = trim($mail); $pseudo = trim($pseudo); $subject = $nuked['name'] . ", " . $date2; $corps = $pseudo . " (IP : " . $user_ip . ") " . _READNEWS . " " . $title . ", " . _NEWSURL . "\r\n" . $nuked['url'] . "/index.php?file=News&op=index_comment&news_id=" . $news_id . "\r\n\r\n" . _YCOMMENT . " : " . $comment . "\r\n\r\n\r\n" . $nuked['name'] . " - " . $nuked['slogan']; $from = "From: " . $nuked['name'] . " <" . $nuked['mail'] . ">\r\nReply-To: " . $nuked['mail']; $subject = @html_entity_decode($subject); $corps = @html_entity_decode($corps); $from = @html_entity_decode($from); mail($mail, $subject, $corps, $from); echo "<div style=\"text-align: center;\"><br />" . _SENDFMAIL . "<br /><br /></div>"; redirect("index.php?file=News", 2); } closetable(); } switch ($op) { case"index": index(); break; case"index_comment": index_comment($news_id); break; case"suite": suite($news_id); break; case"categorie": categorie($cat_id); break; case"sujet": sujet(); break; case"pdf": pdf($news_id); break; case"sendfriend": sendfriend($news_id); break; case"sendnews": sendnews($title, $news_id, $comment, $mail, $pseudo); break; default: index(); break; } } else if ($level_access == -1){ opentable(); echo "<br /><br /><div style=\"text-align: center;\">" . _MODULEOFF . "<br /><br /><a href=\"javascript:history.back()\"><b>" . _BACK . "</b></a><br /><br /></div>"; closetable();} else if ($level_access == 1 && $visiteur == 0){ opentable(); echo "<br /><br /><div style=\"text-align: center;\">" . _USERENTRANCE . "<br /><br /><b><a href=\"index.php?file=User&op=login_screen\">" . _LOGINUSER . "</a> | <a href=\"index.php?file=User&op=reg_screen\">" . _REGISTERUSER . "</a></b><br /><br /></div>"; closetable();} else{ opentable(); echo "<br /><br /><div style=\"text-align: center;\">" . _NOENTRANCE . "<br /><br /><a href=\"javascript:history.back()\"><b>" . _BACK . "</b></a><br /><br /></div>"; closetable();} ?>
Now when someone opens up a link the the News page it will open the link up as
http://www.prodrift.exofire.net/index.php?file=News (News being the name of the folder the index.php file is in which is what I want). And when users open that link it will load the page with all the contents of News/index.php shown in the contents area of the page.
As you can see in the second script they are using "$ModName = basename(dirname(__FILE__));" to get the folder name which I can only assume they are applying to the links.
Anyways I can't talk anymore, have to take my pop somewhere. But any help would be greatly appreciated. I do hope your understanding what I mean. It's not exactly easy to explain

considering I'm a php noob. But I'm also a quick learner, I tend to learn the more advanced stuff faster then the basic stuff.