MyBB.de Forum
Editieren klappt nicht :) "Own Script" - Druckversion

+- MyBB.de Forum (https://www.mybb.de/forum)
+-- Forum: Archiv (https://www.mybb.de/forum/forum-57.html)
+--- Forum: MyBB 1.2.x und älter (https://www.mybb.de/forum/forum-27.html)
+---- Forum: Allgemeiner Support (https://www.mybb.de/forum/forum-36.html)
+---- Thema: Editieren klappt nicht :) "Own Script" (/thread-197.html)



Editieren klappt nicht :) "Own Script" - Samu - 12.08.2005

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 -.-


RE: Editieren klappt nicht :) "Own Script" - Michael - 12.08.2005

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);
?>



RE: Editieren klappt nicht :) "Own Script" - Samu - 12.08.2005

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>