View Single Post
  #4  
Old 01-31-2012, 07:10 PM
PleaseHelp PleaseHelp is offline
 
Join Date: Jan 2012
Posts: 27
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Paul M View Post
I think you are missing 'loggedinuser' - Set it to the ID of current logged-in user. Set to 0 if a guest is posting.
Thanks for your reply, but it's still not working.

To be clear, here's what we're doing:

First, we're calling newthread_newthread ("returns new thread form related data") as follows:

Code:
array('api_m' => 'newthread_newthread','forumid' => 1, 'loggedinuser' => 1);
Then, we're calling newthread_postthread ("posts new thread") using the posthash and poststarttime provided by newthread_newthread, as follows:

Code:
array('api_m' => 'newthread_postthread', 'forumid' => 1, 'subject' => 'Test SUBJECT from the Mobile API', 'message' => 'Test MESSAGE from the Mobile API', 'posthash' => $postHash, 'poststarttime' => $postStartTime, 'loggedinuser' => 1);
However, instead of posting the thread, we're getting the following return data (notice the "invalid posthash" under [newpost] and the 'nosubject' under the [postpreview] errorlist):

Code:
Array
(
    [response] => Array
        (
            [attachmentoption] => Array
                (
                    [posthash] => d78ce48039f1bcbb9f8a5a11e38607fc
                    [contentid] => 0
                    [poststarttime] => 1328039824
                    [attachuserid] => 1
                    [contenttypeid] => 1
                )

            [disablesmiliesoption] => Array
                (
                    [checked] => Array
                        (
                            [parseurl] => 
                            [disablesmilies] => 
                            [signature] => 
                            [postpoll] => 
                            [receipt] => 
                            [savecopy] => 
                            [stickunstick] => 
                            [openclose] => 
                            [sendanyway] => 
                            [rate] => 
                            [subscribe] => 
                        )

                )

            [emailchecked] => Array
                (
                    [0] => 1
                )

            [explicitchecked] => 
            [foruminfo] => Array
                (
                    [forumid] => 1
                    [title] => Test Forum
                    [description] => 
                    [title_clean] => Test Forum
                    [description_clean] => 
                )

            [forumrules] => Array
                (
                    [bbcodeon] => 
                    [can] => Array
                        (
                            [postnew] => 1
                            [replyown] => 1
                            [replyothers] => 1
                            [reply] => 1
                            [editpost] => 128
                            [postattachment] => 1
                            [attachment] => 1
                        )

                    [htmlcodeon] => 
                    [imgcodeon] => 
                    [smilieson] => 
                )

            [human_verify] => 
            [newpost] => Array
                (
                    [message] => 
                    [title] => 
                    [iconid] => 0
                    [prefixid] => 
                    [taglist] => 
                    [parseurl] => 0
                    [signature] => 0
                    [preview] => 
                    [disablesmilies] => 0
                    [rating] => 0
                    [username] => 
                    [postpoll] => 0
                    [polloptions] => 0
                    [folderid] => 0
                    [humanverify] => Array
                        (
                        )

                    [poststarttime] => 0
                    [posthash] => invalid posthash
                    [stickunstick] => 0
                    [openclose] => 0
                    [podcasturl] => 
                    [podcastsize] => 0
                    [podcastexplicit] => 0
                    [podcastkeywords] => 
                    [podcastsubtitle] => 
                    [podcastauthor] => 
                    [subscribe] => 0
                    [htmlstate] => on_nl2br
                    [emailupdate] => 9999
                    [enablesmilies] => 1
                    [visible] => 1
                )

            [podcastauthor] => 
            [podcastkeywords] => 
            [podcastsize] => 
            [podcastsubtitle] => 
            [podcasturl] => 
            [polloptions] => 0
            [posthash] => d78ce48039f1bcbb9f8a5a11e38607fc
            [posticons] => Array
                (
                    [iconchecked] => 1
                    [posticonbits] => Array
                        (
                            [0] => Array
                                (
                                    [alttext] => Post
                                    [iconchecked] => 
                                    [iconid] => 1
                                    [iconpath] => images/icons/icon1.png
                                )

                            [1] => Array
                                (
                                    [alttext] => Thumbs down
                                    [iconchecked] => 
                                    [iconid] => 13
                                    [iconpath] => images/icons/icon13.png
                                )

                            [2] => Array
                                (
                                    [alttext] => Wink
                                    [iconchecked] => 
                                    [iconid] => 12
                                    [iconpath] => images/icons/icon12.png
                                )

                            [3] => Array
                                (
                                    [alttext] => Red face
                                    [iconchecked] => 
                                    [iconid] => 11
                                    [iconpath] => images/icons/icon11.png
                                )

                            [4] => Array
                                (
                                    [alttext] => Talking
                                    [iconchecked] => 
                                    [iconid] => 10
                                    [iconpath] => images/icons/icon10.png
                                )

                            [5] => Array
                                (
                                    [alttext] => Unhappy
                                    [iconchecked] => 
                                    [iconid] => 9
                                    [iconpath] => images/icons/icon9.png
                                )

                            [6] => Array
                                (
                                    [alttext] => Angry
                                    [iconchecked] => 
                                    [iconid] => 8
                                    [iconpath] => images/icons/icon8.png
                                )

                            [7] => Array
                                (
                                    [alttext] => Smile
                                    [iconchecked] => 
                                    [iconid] => 7
                                    [iconpath] => images/icons/icon7.png
                                )

                            [8] => Array
                                (
                                    [alttext] => Cool
                                    [iconchecked] => 
                                    [iconid] => 6
                                    [iconpath] => images/icons/icon6.png
                                )

                            [9] => Array
                                (
                                    [alttext] => Question
                                    [iconchecked] => 
                                    [iconid] => 5
                                    [iconpath] => images/icons/icon5.png
                                )

                            [10] => Array
                                (
                                    [alttext] => Exclamation
                                    [iconchecked] => 
                                    [iconid] => 4
                                    [iconpath] => images/icons/icon4.png
                                )

                            [11] => Array
                                (
                                    [alttext] => Lightbulb
                                    [iconchecked] => 
                                    [iconid] => 3
                                    [iconpath] => images/icons/icon3.png
                                )

                            [12] => Array
                                (
                                    [alttext] => Arrow
                                    [iconchecked] => 
                                    [iconid] => 2
                                    [iconpath] => images/icons/icon2.png
                                )

                            [13] => Array
                                (
                                    [alttext] => Thumbs up
                                    [iconchecked] => 
                                    [iconid] => 14
                                    [iconpath] => images/icons/icon14.png
                                )

                        )

                    [remainingspan] => 0
                )

            [postpreview] => Array
                (
                    [errorlist] => Array
                        (
                            [0] => Array
                                (
                                    [errormessage] => Array
                                        (
                                            [0] => nosubject
                                        )

                                )

                            [1] => Array
                                (
                                    [errormessage] => Array
                                        (
                                            [0] => tooshort
                                            [1] => 1
                                        )

                                )

                        )

                    [newpost] => 
                    [post] => 
                    [previewmessage] => 
                )

            [poststarttime] => 1328039824
            [prefix_options] => 
            [selectedicon] => Array
                (
                    [src] => clear.gif
                    [alt] => 
                )

            [subject] => 
            [tags_remain] => 25
            [tag_delimiters] => 
        )

    [vboptions] => Array
        (
            [postminchars] => 1
            [titlemaxchars] => 100
            [maxpolloptions] => 0
        )

    [show] => Array
        (
            [tag_option] => 1
            [posticons] => 1
            [smiliebox] => 1
            [attach] => 1
            [openclose] => 1
            [stickunstick] => 1
            [closethread] => 1
            [unstickthread] => 0
            [subscribefolders] => 0
            [parseurl] => 1
            [misc_options] => 1
            [additional_options] => 1
            [poll] => 1
            [podcasturl] => 0
            [tags_remain] => 1
        )

)

Any ideas what we're doing wrong and how to fix it?

Thanks.
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01245 seconds
  • Memory Usage 1,840KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete