\n"; $str .= "function addcontent(text) {\n"; $str .= " document.post_form.message.value += text;\n"; $str .= " document.post_form.message.focus();\n"; $str .= "}\n"; $str .= "\n"; $title = "En titel"; $message = "Something useful"; if($fid && $tid && $pid) { include_once("posts.php"); $posts = new Posts($FORUMS_DIR . "/" . $fid . "/" . $tid . ".xml"); if($pid != -1) $post = $posts->getPost($pid); if($post || $pid == -1) { $title = ""; $message = ""; switch($task) { case "new": $title = "Title"; $message = "Message"; break; case "reply": if(substr($post->title, 0, 4) != "Re: ") $title = "Re: " . $post->title; else $title = $post->title; $message = ""; break; case "edit": $title = $post->title; $message = $post->message; break; case "quote": if(substr($post->title, 0, 4) != "Re: ") $title = "Re: " . $post->title; else $title = $post->title; $user = $users->getUser($post->user); $message = "[quote title=" . $user->name . " wrote on " . date("r", $post->date) ."]" . $post->message . "[/quote]"; break; default: $str .= error("No mode supplied!"); return $str; break; } $str .= "
\n"; $str .= "

Title:

\n"; $str .= "

\n"; include_once($UTIL_DIR . "/smileys.php"); foreach($smileys as $smiley) { $smile = $smiley[0][0]; if($smile == "\\m/") $smile = "\\\\m/"; $str .= " \"\""; } $str .= "

\n"; $str .= "

\n"; $str .= " \n"; $str .= "

\n"; $str .= "

\n"; $str .= " To make a link, simply type the URL, and the system will\n"; $str .= " automagically transform it into an anchor (remember the\n"; $str .= " http:// part).
\n"; $str .= " Example: http://www.example.com
\n"; $str .= "

\n"; $str .= "

\n"; $str .= " To insert an image, simply type the URL to that image, it will\n"; $str .= " automagically be transformed into an image, with a link to the\n"; $str .= " original image (again, remember the http:// part).
\n"; $str .= " Example: http://www.example.com/image.jpg\n"; $str .= "

\n"; $str .= "

\n"; $str .= " \n"; $str .= "

\n"; $str .= "
\n"; if($pid != -1) $str .= $posts->show(); } else { $str .= error("Message " . $pid . " not found!"); } } else { $str .= error("No message supplied!"); } return $str; } ?>