Fehler Advanced Topic Types

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.
PG_Strik3r
Mitglied
Beiträge: 176
Registriert: 27.10.2006 22:13
Wohnort: Neu-Isenburg

Fehler Advanced Topic Types

Beitrag 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?
Benutzeravatar
QO
Mitglied
Beiträge: 304
Registriert: 21.02.2006 12:59
Kontaktdaten:

Beitrag 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
PG_Strik3r
Mitglied
Beiträge: 176
Registriert: 27.10.2006 22:13
Wohnort: Neu-Isenburg

Beitrag 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
Benutzeravatar
QO
Mitglied
Beiträge: 304
Registriert: 21.02.2006 12:59
Kontaktdaten:

Beitrag 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...
Benutzeravatar
QO
Mitglied
Beiträge: 304
Registriert: 21.02.2006 12:59
Kontaktdaten:

Beitrag 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...
PG_Strik3r
Mitglied
Beiträge: 176
Registriert: 27.10.2006 22:13
Wohnort: Neu-Isenburg

Beitrag 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.
Benutzeravatar
QO
Mitglied
Beiträge: 304
Registriert: 21.02.2006 12:59
Kontaktdaten:

Beitrag 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
PG_Strik3r
Mitglied
Beiträge: 176
Registriert: 27.10.2006 22:13
Wohnort: Neu-Isenburg

Beitrag 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
Benutzeravatar
QO
Mitglied
Beiträge: 304
Registriert: 21.02.2006 12:59
Kontaktdaten:

Beitrag 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...
PG_Strik3r
Mitglied
Beiträge: 176
Registriert: 27.10.2006 22:13
Wohnort: Neu-Isenburg

Beitrag von PG_Strik3r »

Ich hab das ohne Komma genommen, also deinen letzten Post.

[ externes Bild ][/code]
Antworten

Zurück zu „phpBB 2.0: Mod Support“