Problem mit Passwort-erstellen für Topic

Du hast Probleme beim Einbau oder bei der Benutzung eines Mods? In diesem Forum bist du richtig.
Forumsregeln
phpBB 2.0 hat das Ende seiner Lebenszeit überschritten
phpBB 2.0 wird nicht mehr aktiv unterstützt. Insbesondere werden - auch bei Sicherheitslücken - keine Patches mehr bereitgestellt. Der Einsatz von phpBB 2.0 erfolgt daher auf eigene Gefahr. Wir empfehlen einen Umstieg auf phpBB 3.0, welches aktiv weiterentwickelt wird und für welches regelmäßig Updates zur Verfügung gestellt werden.
Antworten
konstantin_br
Mitglied
Beiträge: 69
Registriert: 11.02.2007 21:22

Problem mit Passwort-erstellen für Topic

Beitrag von konstantin_br »

Hallo,

jedesmal wenn ich versuche ein Passwort für ein Topic zu erstellen, erhalte ich folgende Fehlermeldung:

Allgemeiner Fehler

Error in posting

DEBUG MODE

SQL Error : 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'topic_password = 'test', WHERE topic_id = 8' at line 1

UPDATE phpbb_topics SET topic_title = '(rAft004) Black Eye Productions -ANIMATION-', topic_type = 0 topic_password = 'test', WHERE topic_id = 8

Line : 235
File : functions_post.php


Hier das dazugehörige file:

http://www.cineline.ch/forum/probs/functions_post.txt

Bitte um Hilfe!

Lg
uwe310
Mitglied
Beiträge: 429
Registriert: 06.01.2007 02:04

Beitrag von uwe310 »

Kontrolier doch mal den einbau..
Zeile232
. " topic_password = '$topic_password', WHERE topic_id = $topic_id";

Stimmt da das Komma?
konstantin_br
Mitglied
Beiträge: 69
Registriert: 11.02.2007 21:22

Beitrag von konstantin_br »

Das ist genau der Teil des Mods, den ich nicht verstehe!

#
#-----[ FIND ]--------------------------------------------
#
function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_id, &$post_id, &$poll_id, &$topic_type, &$bbcode_on, &$html_on, &$smilies_on, &$attach_sig, &$bbcode_uid, &$post_username, &$post_subject, &$post_message, &$poll_title, &$poll_options, &$poll_length)

#
#-----[ INLINE, FIND ]------------------------------------
#
, &$poll_length

#
#-----[ AFTER, ADD ]--------------------------------------
#
, &$topic_password

#
#-----[ FIND ]--------------------------------------------
#
# 2.0.4
#
$sql = ($mode != "editpost") ? "INSERT INTO " . TOPICS_TABLE . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_vote) VALUES ('$post_subject', " . $userdata['user_id'] . ", $current_time, $forum_id, " . TOPIC_UNLOCKED . ", $topic_type, $topic_vote)" : "UPDATE " . TOPICS_TABLE . " SET topic_title = '$post_subject', topic_type = $topic_type, topic_vote = $topic_vote WHERE topic_id = $topic_id";

#
#-----[ FIND ]--------------------------------------------
#
# >= 2.0.5
#
$sql = ($mode != "editpost") ? "INSERT INTO " . TOPICS_TABLE . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_vote) VALUES ('$post_subject', " . $userdata['user_id'] . ", $current_time, $forum_id, " . TOPIC_UNLOCKED . ", $topic_type, $topic_vote)" : "UPDATE " . TOPICS_TABLE . " SET topic_title = '$post_subject', topic_type = $topic_type " . (($post_data['edit_vote'] || !empty($poll_title)) ? ", topic_vote = " . $topic_vote : "") . " WHERE topic_id = $topic_id";

#
#-----[ INLINE, FIND ]------------------------------------
#
, topic_vote

#
#-----[ AFTER, ADD ]--------------------------------------
#
, topic_password

#
#-----[ INLINE, FIND ]------------------------------------
#
, $topic_vote

#
#-----[ AFTER, ADD ]--------------------------------------
#
, '$topic_password'

#
#-----[ INLINE, FIND ]------------------------------------
#
# 2.0.4
#
, topic_vote = $topic_vote

#
#-----[ INLINE, FIND ]------------------------------------
#
# >= 2.0.5
#
" . (($post_data['edit_vote'] || !empty($poll_title)) ? ", topic_vote = " . $topic_vote : "") . "

#
#-----[ AFTER, ADD ]--------------------------------------
#
, topic_password = '$topic_password'


Wie würde das korrekt eingebaut in meiner Datei aussehen? (functions_post.php=
uwe310
Mitglied
Beiträge: 429
Registriert: 06.01.2007 02:04

Beitrag von uwe310 »

Code: Alles auswählen

$sql  = ($mode != "editpost") ? "INSERT INTO " . TOPICS_TABLE . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_vote, topic_password) VALUES ('$post_subject', " . $userdata['user_id'] . ", $current_time, $forum_id, " . TOPIC_UNLOCKED . ", $topic_type, $topic_vote)" : "UPDATE " . TOPICS_TABLE . " SET topic_title = '$post_subject', topic_type = $topic_type " . (($post_data['edit_vote'] || !empty($poll_title)) ? ", topic_vote = " . $topic_vote : "") . ", topic_password = '$topic_password' WHERE topic_id = $topic_id";
Nach Anleitung so.....
MFG
Uwe
. ", topic_password = '$topic_password' WHERE topic_id = $topic_id";
Michael Zacher
Mitglied
Beiträge: 1620
Registriert: 03.01.2004 23:12
Wohnort: Aken (Elbe)

Beitrag von Michael Zacher »

Und Du hast nicht

Code: Alles auswählen

, &$topic_password
eingebaut, sondern

Code: Alles auswählen

, $topic_password 
Zeile 109 oder so.
Mit freundlichen Grüßen / Best regards / Met vriendelijke groeten

Michael Zacher
konstantin_br
Mitglied
Beiträge: 69
Registriert: 11.02.2007 21:22

Beitrag von konstantin_br »

Danke schon mal, die Fehler habe ich ausgebessert.

Trotzdem bekomme ich wenn ich als Administrator ein neues Topic aufmache und es mit oder auch ohne Passwort absende folgende Fehlermeldung:

Allgemeiner Fehler

Error in posting

DEBUG MODE

SQL Error : 1136 Column count doesn't match value count at row 1

INSERT INTO phpbb_topics (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_vote, topic_password) VALUES ('Testtopic mit Passwort (PW=654321)', 2, 1195820392, 4, 0, 0, 0)

Line : 235
File : functions_post.php



Mein neues funtions_post.php-File findet ihr hier:
http://www.cineline.ch/forum/probs/functions_post1.txt
uwe310
Mitglied
Beiträge: 429
Registriert: 06.01.2007 02:04

Beitrag von uwe310 »

Sorry nicht richtig Kontroliert
$sql = ($mode != "editpost") ? "INSERT INTO " . TOPICS_TABLE . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_vote, topic_password) VALUES ('$post_subject', " . $userdata['user_id'] . ", $current_time, $forum_id, " . TOPIC_UNLOCKED . ", $topic_type, $topic_vote, '$topic_password')" : "UPDATE " . TOPICS_TABLE . " SET topic_title = '$post_subject', topic_type = $topic_type " . (($post_data['edit_vote'] || !empty($poll_title)) ? ", topic_vote = " . $topic_vote : "") . ", topic_password = '$topic_password' WHERE topic_id = $topic_id";
Jetzt aber
konstantin_br
Mitglied
Beiträge: 69
Registriert: 11.02.2007 21:22

Beitrag von konstantin_br »

funktioniert - danke für quick support!
manuj170793
Mitglied
Beiträge: 170
Registriert: 29.06.2007 22:03
Kontaktdaten:

Beitrag von manuj170793 »

entschuldige die dumme frage, aber wo bekomm ich denn diesen mod her?
hab schon in der moddb und phpbbhacks.com gesucht
uwe310
Mitglied
Beiträge: 429
Registriert: 06.01.2007 02:04

Beitrag von uwe310 »

Antworten

Zurück zu „phpBB 2.0: Mod Support“