Hallo, Gast! (Registrieren)

Wir wünschen allen Besuchern frohe Ostern!

Letzte Ankündigung: MyBB 1.8.37 veröffentlicht (04.11.23)


Benutzer, die gerade dieses Thema anschauen: 1 Gast/Gäste
Editieren klappt nicht :) "Own Script"
#1
Code:
<?
require "./global.php";
require "./inc/functions_post.php";

// Load global language phrases
$lang->load("guide");
addnav($lang->nav_guide, "guide.php");

    if($mybb['uid'] == "0")
{
        nopermission();
}
    if($_GET['editguide'] !=""){
$tid = $_POST['editguide'];
             if(ismod($fid, "caneditposts") != "yes") {
        if($permissions['caneditposts'] == "no") {
            nopermission();
        }
        if($mybb['uid'] != $post['uid']) {
            nopermission();
        }
    }
if($permissions['caneditposts'] == "yes") {
        $query = $db->query("SELECT * FROM ".TABLE_PREFIX."guides WHERE tid = '$tid'");
$guide = $db->fetch_array($query);
$titel = $guide['guidetitel'];
$guidestory = $guide['guidestory'];
}
}
        $lang->load("newreply");
        if($settings['bbcodeinserter'] != "off" && $forum['allowmycode'] != "no" && $mybbuser[showcodebuttons] != 0)
{
            $codebuttons = makebbcodeinsert();
}
            if($forum['allowsmilies'] != "no")
{
                $smilieinserter = makesmilieinsert();
}
            if($forum['allowpicons'] != "no")
{
                $posticons = getposticons();
}
eval("\$editguide = \"".$templates->get("guide_edit")."\";");
outputpage($editguide);
?>

das ist der code

ich weiß, michael kann mir nich helfen xD aber ich bin zu faul bei mybboard.com nach zufragen, udn vielleicht weiß es ein anderer, das is bestimmt wieder sonen kack einfacher fehler -.-
#2
Ich hab mal für dich nachgefragt. Wink

Du sollst folgendes versuchen:
Code:
<?
require "./global.php";
require "./inc/functions_post.php";

// Load global language phrases
$lang->load("guide");
$lang->load("newreply");
addnav($lang->nav_guide, "guide.php");

if($mybb['uid'] == "0" || $mybb['uid'] != $post['uid'])
{
nopermission();
}

if($_GET['editguide'] != "")
{
$query = $db->query("SELECT * FROM ".TABLE_PREFIX."guides WHERE tid='".$_POST['editguide']."'");
$guide = $db->fetch_array($query);
$titel = $guide['guidetitel'];
$guidestory = $guide['guidestory'];
}

if($settings['bbcodeinserter'] != "off" && $forum['allowmycode'] != "no" && $mybbuser['showcodebuttons'] != 0)
{
$codebuttons = makebbcodeinsert();
}
if($forum['allowsmilies'] != "no")
{
$smilieinserter = makesmilieinsert();
}
if($forum['allowpicons'] != "no")
{
$posticons = getposticons();
}

eval("\$editguide = \"".$templates->get("guide_edit")."\";");
outputpage($editguide);
?>

Gruß,
Michael
[Bild: banner.png]
Support erfolgt NUR im Forum!
Bitte gelöste Themen als "erledigt" markieren.
Beiträge mit mangelhafter Rechtschreibung/Grammatik werden kommentarlos gelöscht.
#3
da kriege ich jedesmal die naricht :
Zugang verwehrt, rechte nich vorhanden blablabla Wink

Also Zugang haben :
Administratoren
SuperMods
Mods

so denk ich mir das zumindest :/

ich schick hier mal noch den template rein

Code:
<html>
<head>
<title>$settings[bbname]</title>
$headerinclude
</head>
<body>
$header
<table width="$theme[tablewidth]" cellspacing="0" cellpadding="$theme[tablespace]" border="0" align="center">
<tr>
<td width="*" valign="top">
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
<td class="tborder">
<table border="0" cellspacing="$theme[borderwidth]" cellpadding="$theme[tablespace]" width="100%">
<tr>
<td width="100%" class="thead"><strong>Guide bearbeiten</strong></td>
</tr>
<tr><td>
Hier kannst du vorhandene Guides bearbeiten und neu in der Datenbank speichern.</td></tr>
</table></td></tr></table>
<br />

<form action="guides.php?showguide=add" method="post" enctype="multipart/form-data" name="input" onsubmit="return checkForm();">
<table cellspacing="0" cellpadding="0" border="0" width="$theme[tablewidth]" align="center">
<tr><td class="tborder">
<table border="0" cellspacing="$theme[borderwidth]" cellpadding="$theme[tablespace]" width="100%">
<tr>
<td class="thead" colspan="2"><strong>Guide Formular</strong></td>
</tr>
$loginbox
<tr>
<td class="trow2" width="20%"><strong>Titel</strong></td>
<td class="trow2"><input type="text" name="thematik" size="40" maxlength="85" value="$titel" tabindex="1"></td>
</tr>
<tr>
<td class="trow2" valign="top"><strong>Guide Text:</strong><br /><span class="smalltext">$lang->forum_rules_note</span></td>
<td class="trow2">
<table cellspacing="0" cellpadding="0" border="0">
$codebuttons
<tr>
<td colspan="2">
<textarea name="message" rows="20" cols="80" style="width: 98%;" wrap="virtual" tabindex="3">$guidestory</textarea>
</td>
</tr>
</table>
</td>
</tr>

</table>
</td></tr></table>
<br />
<center><input type="submit" name="submit" value="Absenden" tabindex="4" accesskey="s">  
<input type="reset" name="reset" value="Zurücksetzen" tabindex="6"></center>
</form>
</td></tr>
</table></td></tr></table>

</td>
</tr>
</table>
$footer
</body>
</html>