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)

quitsmoking 07-07-2007 09:44 PM

Thank you. Your advice worked :) I found one and it worked like charm.

Ranma2k 08-30-2007 11:47 AM

I have a Q

can we use the vb post class / data manager to store the posts in different table other the the default table Posts ?
If yes can you please explain ?

ragtek 08-31-2007 04:52 PM

what do you realy want?:D
you could "inherit" the class i think

Ranma2k 09-01-2007 06:36 AM

well basically i want to use the post class to process the Comments and store it in the comment table

toucan42 09-21-2007 01:48 PM

Quote:

Originally Posted by Paul M (Post 853471)
I thought the title pretty much gave it away > [How To] Create Posts

That is the code to create a post in an existing thread.

I am struggling to get my mind wrapped around the datamanager - if i want code to create a new thread is it the vB_DataManager_Thread_FirstPost I am looking for?

Any decent examples of using the DM?

rootnik 09-29-2007 05:54 PM

Quote:

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

There is no such thread anymore. I am needing to do this as well.

fly 09-29-2007 07:12 PM

Quote:

Originally Posted by rootnik (Post 1349746)
There is no such thread anymore. I am needing to do this as well.

I'll try to write one up this weekend then, if no one else does. Dunno why it got removed...

Thibaut 10-21-2007 08:23 PM

Quote:

Originally Posted by rootnik (Post 1349746)
There is no such thread anymore. I am needing to do this as well.

I would need that too, thanks.

ragtek 10-21-2007 08:42 PM

with this code:
PHP Code:

$threaddm =& datamanager_init('Thread_FirstPost'$vbulletinERRTYPE_ARRAY'threadpost');

$forumid $vbulletin->GPC['fid']; // can also be a number ;) $forumdid= 12;

$foruminfo fetch_foruminfo($forumid);
$threaddm->set_info('forum'$foruminfo);

$threaddm->set('forumid'$foruminfo['forumid']);
$threaddm->set('userid'1234);
$threaddm->set('title''Testtitle');
$threaddm->set('pagetext''a little test');
$threaddm->set('allowsmilie'1);
$threaddm->set('visible'1);
$threaddm->set('dateline'TIMENOW);
$threaddm->save(); 

if you need the threadid save it with
PHP Code:

$id $threaddm->save(); 


Thibaut 10-22-2007 08:06 AM

Thanks ;)


All times are GMT. The time now is 01:03 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.04022 seconds
  • Memory Usage 1,745KB
  • 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
  • (2)bbcode_php_printable
  • (4)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