Seite 1 von 2

Fehler Advanced Topic Types

Verfasst: 04.01.2007 17:46
von PG_Strik3r
Hallo, ich hab für mein Forum die Advanced_Topic_Types installiert, schien auch alles zu funktionieren, Wichtig und Ankündigung funktioniert nach wie vor. Im Admincenter läuft das ganze auch ohne Probleme.
Dort habe ich einen neuen Topic Type erstellt namens Vermerk. Allerdings wenn ich ihn beim Posten auswähle kommt folgender Fehler:

Code: Alles auswählen

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_type = 0 WHERE topic_id = 149' at line 1

UPDATE phpbb_topics SET topic_title = 'test', topic_type = 0 topic_type = 0 WHERE topic_id = 149

Line : 242
File : functions_post.php
Das liegt wie ja da steht an der functions_post.php, das war auch meine einzige schwierigkeit beim umcoden. In der Anleitung steht folgendes:

Code: Alles auswählen

#-----[ FIND ]----------------------------------------------
#

$sql  =

#-----[ IN-LINE FIND ]----------------------------------------------
#

topic_type = $topic_type

#
#-----[ IN-LINE AFTER, ADD ]----------------------------------------------
#

 $topic_type_active    
Allerdings sieht meine orginal Datei so aus:

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) 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";
		if (!$db->sql_query($sql))
		{
Und genau da liegt mein Problem, ich weiss nicht genau was die meinen mit line after, kann mir bitte jemand den richtig geänderten code posten?

Verfasst: 04.01.2007 18:32
von QO
Hi

in line after heisst auf deutsch, in der Zeile dahinter, d.h. du suchtst in der Zeile "topic_type = $topic_type" und fügst in der zeile dahinter ", $topic_type_active" ein, also ...topic_type = $topic_type, $topic_type_active...

Ich würde dir aber von dem Mod abraten, da es bei kaum einen funktioniert. Siehe dazu auch http://www.phpbb.de/viewtopic.php?t=114307. Dort findest noch einen Fehler der einen Teilerfolg bringt...

QO

Verfasst: 04.01.2007 18:36
von PG_Strik3r
Es funktioniert ja bis auf die Fehler die gemeldet werden, und die liegen klar in der genannten Datei.

Jedenfalls weiss ich auch das es in der Zeile dahinter heisst, versteh aber trozdem nicht genau wo das sein soll, hab schon mehrere Sachen ausprobiert.
Wär nett wenn du mir den gesamten Code (meinen Ausschnitt oben) so ändern könntest wie es sein soll.

THX

Verfasst: 04.01.2007 18:40
von QO
Es steht doch da, in line find, d.h. du suchst erst in der zeile nach "topic_type = $topic_type" und dahinter fügst das ein...

Verfasst: 04.01.2007 18:47
von QO
Es müsste dann also so aussehen

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) 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_type_active " . (($post_data['edit_vote'] || !empty($poll_title)) ? ", topic_vote = " . $topic_vote : "") . " WHERE topic_id = $topic_id";
      if (!$db->sql_query($sql))
      {
Es kann sein dass ein , (Komma) in der anleitung fehlt...

Verfasst: 04.01.2007 18:47
von PG_Strik3r
Ich werde das Gefühl nich los das du es selber nicht weisst 0_o.
Wie gesagt ich hab schon mehrere Möglichkeiten druch. Wenn dus weisst poste es.

Verfasst: 04.01.2007 19:07
von QO
Hi

Also es muss doch ohne Komma sein. In meinem Damaligen Board sah die betroffene Zeile so aus:

Code: Alles auswählen

		$sql  = ($mode != "editpost") ? "INSERT INTO " . TOPICS_TABLE . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_calendar_time, topic_calendar_duration, topic_vote) VALUES ('$post_subject', " . $userdata['user_id'] . ", $current_time, $forum_id, " . TOPIC_UNLOCKED . ", $topic_type, $topic_calendar_time, $topic_calendar_duration, $topic_vote)" : "UPDATE " . TOPICS_TABLE . " SET topic_title = '$post_subject', topic_type = $topic_type $topic_type_active, topic_calendar_time = $topic_calendar_time, topic_calendar_duration = $topic_calendar_duration " . (($post_data['edit_vote'] || !empty($poll_title)) ? ", topic_vote = " . $topic_vote : "") . " WHERE topic_id = $topic_id";
Ein weiteres Bsp. dafür gibts hier: http://www.phpbb.de/viewtopic.php?t=80876

Verfasst: 04.01.2007 19:21
von PG_Strik3r
Danke erstmal, aber jetzt bekomm ich folgenden Fehler:

Error in posting

DEBUG MODE

UPDATE phpbb_topics SET topic_title = 'test', topic_type = 0 , topic_calendar_time = , topic_calendar_duration = WHERE topic_id = 149

Line : 254
File : functions_post.php

Verfasst: 04.01.2007 19:48
von QO
hast du das übernommen gehabt was ich dir geändert hatte, also mit dem falschen Komma? Wenn ja, dann nimm das Komma vor dem eingefügten noch raus...

Laut deiner Fehlermeldung sccheint die neue Fehlermeldung in einer anderen Zeile zu sein, stimmt es? Wenn ja, dann poste mal die Zeile...

Verfasst: 05.01.2007 14:58
von PG_Strik3r
Ich hab das ohne Komma genommen, also deinen letzten Post.

[ externes Bild ][/code]