vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=187)
-   -   Create Posts (https://vborg.vbsupport.ru/showthread.php?t=102418)

Thibaut 10-23-2007 03:43 PM

How can I get the id of the thread ?
Thanks

zytzagoo 10-24-2007 06:23 AM

Quote:

Originally Posted by Thibaut (Post 1366801)
How can I get the id of the thread ?
Thanks

PHP Code:

$thread_id $threaddm->save(); 


Thibaut 10-24-2007 07:08 AM

Thanks ! :)

Tinh.Nhi 11-21-2007 09:01 AM

how to use the code like thank please ?

paolo.capitani 12-21-2007 02:42 PM

thanks for the thread!
how can I add a break line in the content of the just added post?

TCooper 12-24-2007 04:57 PM

I was able to make a script that posts a new thread to a user defined forum but not able to make it post a reply to a current thread. I tried using the example in the first post and it didnt work, can someone please help with a new post to current thread.

amcd 12-24-2007 05:32 PM

PHP Code:

$postdm = new vB_DataManager_Post($vbulletinERRTYPE_STANDARD); 

$timenow TIMENOW ;
$threadinfo fetch_threadinfo($threadid);
$foruminfo fetch_foruminfo($forumid);

$postdm->set_info('forum'$foruminfo);
$postdm->set_info('thread'$threadinfo);  
$postdm->set('threadid'$threadid);
$postdm->set('title'$symid);
$postdm->set('userid'$userid);
$postdm->set('pagetext'$message);
$postdm->set('allowsmilie'1);
$postdm->set('visible'1);
$postdm->set('dateline'$timenow);
$postdm->save();
unset(
$postdm); 

this works.

sonata 04-12-2008 01:43 PM

Quote:

Originally Posted by ruinernix (Post 1091515)
This works, but all messages created end up in a moderation queue even though the forum is not set to moderate posts/threads. I tried adding 'visible'=>'1' but it doesn't make a difference. Any clues? I suppose it's because I'm running this from an outside script, that isn't really logged into VB. I made a modification to functions_newpost.php
PHP Code:

Replaced:
    
// see if post has to be moderated or if poster in a mod
    
if ( 
        ((
With:
    
// see if post has to be moderated or if poster in a mod
    
if ( ($post['visible'] == 0) AND
        (( 

It does the job, but I'd like to understand why it's not working properly..

Any solution for this? I still encounter this problem when I use build_new_post function. Right now, I have to execute SQL queries to delete it from moderation table and set the visible flag to one. Any better solution?

amcd 04-12-2008 01:58 PM

build_new_post assumes that you are adding a post for the same user who is logged in. use the data manager.

silly rabbit 05-23-2008 02:53 PM

Quote:

Originally Posted by flypaper (Post 1283415)
Then you'd find the thread about HowTo Create Threads. ;)

Cute! flypaper, a somewhat related question to the topic at hand, creating posts . . .

. . . if editing an existing post I'd like to have a simple "check box" in the editor that would flag/include the updated post into the "New Posts" search engine for everyone to review, see. Ever seen such a hack before? Easily possible?

Great Thread, thx Rabbit


All times are GMT. The time now is 12:45 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02615 seconds
  • Memory Usage 1,750KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete