Pagina 1 van 1

submit_post

Geplaatst: 15 jun 2007, 20:29
door Salomon
Wie kan mij vertellen wat ik nodig heb om deze functie te gebruiken? Is voor een nieuwsBOT...

Re: submit_post

Geplaatst: 15 jun 2007, 22:19
door Semi_Deus
heb je hier misschien wat aan? :)

Re: submit_post

Geplaatst: 16 jun 2007, 08:28
door Salomon
Nee, ik heb het over de functie submit_post, hoe je die moet gebruiken. Deze haalt juist berichten op! ;)

Re: submit_post

Geplaatst: 17 jun 2007, 08:57
door Salomon
Anybody?

Re: submit_post

Geplaatst: 17 jun 2007, 09:36
door BetaDevil
Submit Post
void submit_post ( $mode, $subject, $username, $topic_type, &$poll, &$data, [ $update_message = true])

* $mode
* $subject
* $username
* $topic_type
* &$poll
* &$data
* $update_message
$mode = delete/edit/post etc.
$subject = Onderwerp van het topic.
$username = Gebruikersnaam van poster.
$topic_type = POST_GLOBAL, POST_ANNOUNCE, POST_STICKY, POST_NORMAL
$poll = Poll
$data = Geen idee

Re: submit_post

Geplaatst: 17 jun 2007, 10:12
door Salomon
Waar eb jij dat gevonden :( :o

Re: submit_post

Geplaatst: 17 jun 2007, 15:00
door Salomon
Ik ben nu verder met m'n nieuwsbot, maar toch lukt submit_post nog niet helemaal :(

Ik krijg deze errors:
PHP Notice: in file /includes/message_parser.php on line 1049: Undefined index: TOO_FEW_CHARS
[phpBB Debug] PHP Notice: in file /includes/functions_posting.php on line 1511: Undefined index: user_id
[phpBB Debug] PHP Notice: in file /includes/functions_posting.php on line 1539: Undefined index: user_id
[phpBB Debug] PHP Notice: in file /includes/functions_posting.php on line 1548: Undefined index: is_registered
[phpBB Debug] PHP Notice: in file /includes/functions_posting.php on line 1631: Undefined index: user_id
[phpBB Debug] PHP Notice: in file /includes/functions_posting.php on line 1637: Undefined index: is_registered
[phpBB Debug] PHP Notice: in file /includes/functions_posting.php on line 1638: Undefined index: user_id
[phpBB Debug] PHP Notice: in file /includes/functions_posting.php on line 1638: Undefined index: user_colour
[phpBB Debug] PHP Notice: in file /includes/db/dbal.php on line 275: Undefined offset: 0
[phpBB Debug] PHP Notice: in file /includes/db/dbal.php on line 286: Array to string conversion
Return to index page
General Error
SQL ERROR [ mysqli ]

Unknown column 'Array' in 'field list' [1054]

SQL

INSERT INTO phpbb3RC1_topics (topic_poster, topic_time, forum_id, icon_id, topic_approved, topic_title, topic_first_poster_name, topic_first_poster_colour, topic_type, topic_time_limit, topic_attachment) VALUES (0, 1182085966, 'A', 'A', 0, 'Vertraging dreigt voor 100G ethernetstandaard', Array, NULL, 0, 0, 1)

BACKTRACE

FILE: includes/db/mysqli.php
LINE: 118
CALL: dbal_mysqli->sql_error()

FILE: includes/functions_posting.php
LINE: 1745
CALL: dbal_mysqli->sql_query()

FILE: bot.php
LINE: 116
CALL: submit_post()

Please notify the board administrator or webmaster: xxx
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group


M'n code: bot... Wie o wie weet de fout...

Re: submit_post

Geplaatst: 17 jun 2007, 16:16
door ElbertF
"topic_first_post_id" => 0

Wellicht komt het hierdoor, erg onwaarschijnlijk dat de id altijd 0 is. :?

Re: submit_post

Geplaatst: 17 jun 2007, 16:24
door Salomon
Een var_dump($data) in posting.php gaf mij, bij het plaatsen van een nieuw bericht, het volgende resultaat:
Spoiler: bekijk
array(33) {
["topic_title"]=>
string(11) "Topic titel"
["topic_first_post_id"]=>
int(0)

["topic_last_post_id"]=>
int(0)
["topic_time_limit"]=>
int(0)
["topic_attachment"]=>
int(0)
["post_id"]=>
int(0)
["topic_id"]=>
int(0)
["forum_id"]=>
int(2)
["icon_id"]=>
int(0)
["poster_id"]=>
int(2)
["enable_sig"]=>
bool(true)
["enable_bbcode"]=>
bool(true)
["enable_smilies"]=>
bool(true)
["enable_urls"]=>
bool(true)
["enable_indexing"]=>
bool(true)
["message_md5"]=>
string(32) "53a58ca825344de97194a7aaaf99f252"
["post_time"]=>
int(0)
["post_checksum"]=>
string(0) ""
["post_edit_reason"]=>
string(0) ""
["post_edit_user"]=>
int(0)
["forum_parents"]=>
string(57) "a:1:{i:1;a:2:{i:0;s:21:"Mijn eerste categorie";i:1;i:0;}}"
["forum_name"]=>
string(12) "Test Forum 1"
["notify"]=>
bool(false)
["notify_set"]=>
int(0)
["poster_ip"]=>
string(13) "86.82.112.103"
["post_edit_locked"]=>
int(0)
["bbcode_bitfield"]=>
string(0) ""
["bbcode_uid"]=>
string(5) "5534c"
["message"]=>
string(13) "Bericht tekst"
["attachment_data"]=>
array(0) {
}
["filename_data"]=>
array(1) {
["filecomment"]=>
string(0) ""
}
["topic_approved"]=>
bool(false)
["post_approved"]=>
bool(false)
}
Ik heb de meeste gegevens daarop gebaseerd, en sommige dingen weggelaten die niet werden gebruikt door submit_post.
Overigens, wat kan ik doen om die Notices weg te krijgen?

Enne: een ' wordt omgezet naar #39; (door de feed), wat kan ik doen om die terug te converteren naar ' :?
html_entity_decode en htmlspecialchars_decode werken niet...