bbcosdes und smileys
Verfasst: 23.11.2004 11:05
HZallo leute ich hoffe von euch kann mir wer helfen:
vl. kann mir wer helfen
includ. hab ichs aber wie muss ich diese funktion starten?Zum Einbauen des Sciptes einfach bbcode_n_smilies.inc.php includen und die Funtkion bbcode_n_smilies() aufrufen. Diese erwartet als Parameter den zu bearbeitenden Text.
Hier ein Beispiel:
[...]
$command = "SELECT * FROM comments";
$handle = mysql_query($command);
include("bbcode_n_smilies.inc.php");
while ($comment = mysql_fetch_array($handle)) {
echo bbcode_n_smilies($comment[text]);
}
[...]
Code: Alles auswählen
<?php
include("../../config/config.inc.php");
include("../../config/registry.inc.php");
include("../../registry/bbcodes/bbcode_n_smilies.inc.php");
$HTTP_GET_VARS["edit_username"]=htmlspecialchars($HTTP_GET_VARS["edit_username"]);
$HTTP_GET_VARS["edit_password"]=htmlspecialchars($HTTP_GET_VARS["edit_password"]);
?>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
<link rel="stylesheet" type="text/css" href="styles.css">
<title>Einstellungen</title>
<?php
if (strcmp($HTTP_GET_VARS["send"],"ok")==0) /* check for update */
{ /* check login input */
$status=verify_unpw($HTTP_GET_VARS["edit_username"],$HTTP_GET_VARS["edit_password"]); /* pw & un match */
if (strlen($status)>0) /* show error */
{
echo "<div class=\"errorbox\">";
echo $status;
echo "</div></body></html><br />";
include("login_mask.html");
echo "$document_footer";
echo "</body></html>";
return;
}
$status=update_registration($HTTP_GET_VARS); /* data ok ? */
if (strlen($status)>0) /* show error */
{
echo "<div class=\"errorbox\">";
echo $status;
echo "</div></body></html><br />";
$VARS=read_userprofile($HTTP_GET_VARS["edit_username"]);
}
else /* data updated, bye bye .. */
{
echo "<div class=\"infobox\">";
echo "Die Benutzerdaten wurden aktualisiert..., bitte klicken Sie <a href=\"../../init.php\">hier</a> um in den Chat zu gelangen<BR>";
echo "</div><br /></body></html>";
return;
}
}
else
{
if (strcmp($HTTP_GET_VARS["send"],"login")==0) /* check for login */
{
$status=verify_unpw($HTTP_GET_VARS["edit_username"],$HTTP_GET_VARS["edit_password"]); /* pw & un match */
if (strlen($status)>0) /* show error */
{
echo "<div class=\"errorbox\">";
echo $status;
echo "</div></body></html><br />";
include("login_mask.html");
echo "$document_footer";
echo "</body></html>";
return;
}
else /* show edit mask */
{
$VARS=read_userprofile($HTTP_GET_VARS["edit_username"]);
}
}
else /* no login, no edit -> show login mask */
{
include("login_mask.html");
echo "$document_footer";
echo "</body></html>";
return;
}
}
?>
<?php
if (strcmp($HTTP_GET_VARS["send"],"ok")==0)
{
$status=verify_registration($HTTP_GET_VARS);
if (strlen($status)>0)
{
echo "<div class=\"errorbox\">";
echo $status;
echo "</div><br /></body></html>";
}
else
{
echo "<div class=\"infobox\">";
echo "Das Benutzerkonto wurde angelegt, bitte klicken Sie <a href=\"../../init.php\">HIER</a> um in den Chat zu gelangen<BR>";
echo "</div><br /></body></html>";
return;
}
}
?>
<div style="width: 30%" align="left" class="formular"> <span style="font-weight: bold">Benutzerkonto ändern : </span><span class="Stil1"><br />
</span>
<form name="login" method="get" action="<?php echo $PHP_SELF;?>">
<span class="Stil1">
<input type="hidden" name="edit_username" value="<?php echo htmlspecialchars($HTTP_GET_VARS["edit_username"]) ?>">
<input type="hidden" name="edit_password" value="<?php echo htmlspecialchars($HTTP_GET_VARS["edit_password"]) ?>">
<strong>Benutzername</strong></span><span class="Stil19 Stil1"> (Nicht änderbar) <br />
<input class="form_readonly" readonly name="edit_username" type="text" size="12" maxsize="32" value="<?php echo $VARS["username"] ?>">
<br />
<strong>Passwort:</strong><br />
<input class="form_must" name="edit_pw1" type="password" size="20" maxsize="32" value="<?php echo $VARS["passwd"] ?>">
<br />
<strong>Password Kontrolle:</strong><br />
<input class="form_must" name="edit_pw2" type="password" size="20" maxsize="32" value="<?php echo $VARS["passwd"] ?>">
<br />
<strong>Deine eMail-Adresse:</strong><br />
<input class="form_must" name="edit_email" type="text" size="16" maxsize="64" value="<?php echo $VARS["email"] ?>">
<br />
<strong>Deine Freunde</strong><br />
<input class="form" name="edit_friends" type="text" size="50" maxsize="255" value="<?php echo list_returnfriends($HTTP_GET_VARS["edit_username"]) ?>">
<br />
<strong>Homepage:</strong><br />
<input class="form" name="edit_hp" type="text" size="26" maxsize="128" value="<?php echo $VARS["hp"] ?>">
<br />
<strong>Bild URL:</strong><br />
<input class="form" name="edit_image" type="text" size="26" maxsize="128" value="<?php echo $VARS["image"] ?>">
<br />
<strong>Info Text:</strong><br />
<textarea rows=5 cols=60 class="form" name="edit_info"><?php echo htmlspecialchars(eregi_replace("<BR>","\n",$VARS["info"])) ?></textarea>
<br />
<strong>Zeige eMail Addresse öffentlich ? </strong></span><br />
<select class="form" name="edit_email2info">
<option value="1" selected checked>Ja</option>
<option value="0">Nein</option>
</select>
<br />
<br />
<input class="buttons" name="send" type="submit" value="ok">
<input class="buttons" name="donotsend" type="reset" value="Abbrechen">
</form>
</div>
</div>