submit_post

Hulp nodig bij een modificaties of op zoek naar een MOD?
Forumregels

LEES: Richtlijnen voor Support. Vul de support template in!
phpBB3.0.x
Verschaf iemand geen servertoegang tenzij het niet anders kan. Maak altijd eerst een volledige backup en verander de inloggevens na afloop. Eigen risico.
Plaats reactie
Salomon
Berichten: 3878
Lid geworden op: 14 feb 2006, 16:15

submit_post

Bericht door Salomon » 15 jun 2007, 20:29

Wie kan mij vertellen wat ik nodig heb om deze functie te gebruiken? Is voor een nieuwsBOT...

Semi_Deus
Berichten: 326
Lid geworden op: 13 jun 2007, 23:50
Locatie: Zeist
Contacteer:

Re: submit_post

Bericht door Semi_Deus » 15 jun 2007, 22:19

heb je hier misschien wat aan? :)
Afbeelding

Salomon
Berichten: 3878
Lid geworden op: 14 feb 2006, 16:15

Re: submit_post

Bericht door Salomon » 16 jun 2007, 08:28

Nee, ik heb het over de functie submit_post, hoe je die moet gebruiken. Deze haalt juist berichten op! ;)

Salomon
Berichten: 3878
Lid geworden op: 14 feb 2006, 16:15

Re: submit_post

Bericht door Salomon » 17 jun 2007, 08:57

Anybody?

BetaDevil
Berichten: 2810
Lid geworden op: 28 mei 2006, 15:27

Re: submit_post

Bericht door BetaDevil » 17 jun 2007, 09:36

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

Salomon
Berichten: 3878
Lid geworden op: 14 feb 2006, 16:15

Re: submit_post

Bericht door Salomon » 17 jun 2007, 10:12

Waar eb jij dat gevonden :( :o

Salomon
Berichten: 3878
Lid geworden op: 14 feb 2006, 16:15

Re: submit_post

Bericht door Salomon » 17 jun 2007, 15:00

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...
Laatst gewijzigd door Salomon op 10 aug 2007, 11:49, 1 keer totaal gewijzigd.

ElbertF
Berichten: 5803
Lid geworden op: 12 okt 2004, 08:34
Contacteer:

Re: submit_post

Bericht door ElbertF » 17 jun 2007, 16:16

"topic_first_post_id" => 0

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

Salomon
Berichten: 3878
Lid geworden op: 14 feb 2006, 16:15

Re: submit_post

Bericht door Salomon » 17 jun 2007, 16:24

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...

Plaats reactie