Quiz mod problem

Allgemeiner Support zum phpBB 2 Board und phpBB 2 Modifikationen
Forumsregeln
Auch wenn hier der Support für phpBB 2 weiterhin aufrecht erhalten bleibt, weisen wir darauf hin, dass das phpBB 2 nicht mehr offiziell unterstützt und weiterentwickelt wird!
Antworten
Benutzeravatar
Dizko
Beiträge: 38
Registriert: Di 28.Sep, 2004 19:00

Quiz mod problem

Beitrag von Dizko »

When I activate the quiz, I got this problem:

Code: Alles auswählen

Parse error: parse error, unexpected '{' in /opt/www/dedonckerb/web/forum.jhbloem.be/includes/functions_post.php on line 1414

Benutzeravatar
Dizko
Beiträge: 38
Registriert: Di 28.Sep, 2004 19:00

Beitrag von Dizko »

now I got this error

Code: Alles auswählen

Fatal error: Call to a member function on a non-object in /opt/www/dedonckerb/web/forum.jhbloem.be/includes/functions_post.php on line 2032
This is line 2032

Code: Alles auswählen

        $GLOBALS['cm_posting']->update_delete($mode, $post_data, $forum_id, $topic_id, $post_id);
Benutzeravatar
Dizko
Beiträge: 38
Registriert: Di 28.Sep, 2004 19:00

Beitrag von Dizko »

I also got this problem

Code: Alles auswählen

Error in posting

DEBUG MODE

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

INSERT INTO phpbb_posts_text (post_id, post_subject, bbcode_uid, post_text, quiz_answer) VALUES (5113, 'Quiz vraag #1 ...', '79afbed535', 'Hier is de nieuwe quiz vraag: [QUIZ] Deze vraag is voorgesteld doorBart')

Line : 2608
File : /opt/www/xxx/web/forum.jhbloem.be/includes/functions_post.php
Benutzeravatar
oxpus
Administrator
Beiträge: 28735
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

Please use the edit button, if you will post more informations untill another user hasn't answered! Thanks.

And for these errors please double check the installing of the quiz mod. There are some errors you can find on checking the files by yourself.
Karsten Ude
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
Benutzeravatar
Dizko
Beiträge: 38
Registriert: Di 28.Sep, 2004 19:00

Beitrag von Dizko »

I know, double checked them all
Benutzeravatar
oxpus
Administrator
Beiträge: 28735
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

As I know, the cash mod and the quiz mod aren't compatible together...
To fix the last error, please post the line 2608 -/+15 lines from your functions_post.php.
Karsten Ude
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
Benutzeravatar
Dizko
Beiträge: 38
Registriert: Di 28.Sep, 2004 19:00

Beitrag von Dizko »

ow, I have the cash mod installed ....
Benutzeravatar
Dizko
Beiträge: 38
Registriert: Di 28.Sep, 2004 19:00

Beitrag von Dizko »

Code: Alles auswählen

$sql = ($mode != 'editpost') ? "INSERT INTO " . POSTS_TEXT_TABLE . " (post_id, post_subject, bbcode_uid, post_text, quiz_answer) VALUES ($post_id, '$post_subject', '$bbcode_uid', '$post_message', '" . ( empty($post_data['quiz_answer']) ? '' : $post_data['quiz_answer'] ) . "')" : "UPDATE " . POSTS_TEXT_TABLE . " SET post_text = '$post_message',  bbcode_uid = '$bbcode_uid', post_subject = '$post_subject' WHERE post_id = $post_id";








        if (!$db->sql_query($sql))








        {








                message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);








        }

















        add_search_words('single', $post_id, stripslashes($post_message), stripslashes($post_subject));
Benutzeravatar
oxpus
Administrator
Beiträge: 28735
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

ow, I have the cash Mod installed ....
Yes. The following line is from this mod:
$GLOBALS['cm_posting']->update_delete($mode, $post_data, $forum_id, $topic_id, $post_id);
And for the error on functions_post.php replace your line (posted here as line 1 in the code box) with this:

Code: Alles auswählen

$quiz_answer = (empty($post_data['quiz_answer'])) ? '' : $post_data['quiz_answer'];
$sql = ($mode != 'editpost') ? "INSERT INTO " . POSTS_TEXT_TABLE . " (post_id, post_subject, bbcode_uid, post_text, quiz_answer) VALUES ($post_id, '$post_subject', '$bbcode_uid', '$post_message', '$quiz_answer')" : "UPDATE " . POSTS_TEXT_TABLE . " SET post_text = '$post_message',  bbcode_uid = '$bbcode_uid', post_subject = '$post_subject' WHERE post_id = $post_id"; 
and retry.
Karsten Ude
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
Benutzeravatar
Dizko
Beiträge: 38
Registriert: Di 28.Sep, 2004 19:00

Beitrag von Dizko »

OK, that works, ty

Now I only have one problem, my users can't answer on a question,
There is an answer box in the posting_body, but when I try to answer he sais: You have to post a title when opening a new subject
Benutzeravatar
oxpus
Administrator
Beiträge: 28735
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

Can you give me please a link for example?
Karsten Ude
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
Benutzeravatar
Dizko
Beiträge: 38
Registriert: Di 28.Sep, 2004 19:00

Beitrag von Dizko »

Benutzeravatar
oxpus
Administrator
Beiträge: 28735
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

Interresting...
Please attach your posting.php (as link or zip-file) to check the workflow on it.


BTW: Better you update your board to 2.0.11 to avoid security leaks ;)
Karsten Ude
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
Benutzeravatar
Dizko
Beiträge: 38
Registriert: Di 28.Sep, 2004 19:00

Beitrag von Dizko »

I have more than 80 hacks installed, not easy to update I think

-- File deleted by Admin --
Benutzeravatar
oxpus
Administrator
Beiträge: 28735
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

One code block was inserted at the wrong place. So here the fixed file. Retry it.
Karsten Ude
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
Benutzeravatar
Dizko
Beiträge: 38
Registriert: Di 28.Sep, 2004 19:00

Beitrag von Dizko »

he always ask on a new reply to add a tittle to the post (like in a new topic)

I mean in every forum, not only in the quiz forum
Benutzeravatar
oxpus
Administrator
Beiträge: 28735
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

Hm, I think the posting.php is corrupted now after a mod install ...
Since which installation the posting.php will display this message? After the quiz mod?
And another question: This file contains many empty rows. This is not normal.
With which editor do you've edited this file?
Karsten Ude
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
Benutzeravatar
Dizko
Beiträge: 38
Registriert: Di 28.Sep, 2004 19:00

Beitrag von Dizko »

I found problem, was error in functions_post.php

I use coffeecup software
Benutzeravatar
oxpus
Administrator
Beiträge: 28735
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

Yes, just the functions_post.php could display this error message.
But also make sure, the lines with prepare_post( and submit_post( in the files functions_post.php and quiz.php (both in the folder includes) haves the same values to avoid other errors.
Karsten Ude
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
Benutzeravatar
Dizko
Beiträge: 38
Registriert: Di 28.Sep, 2004 19:00

Beitrag von Dizko »

Ty verry much for your help ;-)
Antworten