$postdm = new vB_DataManager_Post($vbulletin, ERRTYPE_STANDARD);
$postthreadid = '4473';
$postusername = 'admin';
// Use $postusername if posting as a guest, use $postuserid if posting as a user
//$postuserid = '1';
$postpagetext = 'Hi mom!';
$postdm->set_info('forum', $foruminfo);
$postdm->set_info('thread', $threadinfo);
$postdm->set('threadid', $postthreadid);
$postdm->set('username', $postusername);
// Use $postusername if posting as a guest, use $postuserid if posting as a user
//$postdm->set('userid', $postuserid);
$postdm->set('pagetext', $postpagetext);
$postdm->set('allowsmilie', 1);
$postdm->set('visible', 1);
$postdm->set('dateline', TIMENOW);
$postdm->save();
unset($postdm);
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
Not a good idea. To accomplish this, the time of the post would have to be edited, and that would move the post to the end of the thread.
The thread's last updated time can be updated, and that would bump the thread, but it will not solve your purpose. A 10 page thread may have a post on page 4 edited, and users will be wondering why the thread is on top of the forum when the last post is 3 months ago.
Not a good idea. To accomplish this, the time of the post would have to be edited, and that would move the post to the end of the thread.
Thanks amcd! Yer right, moving the post by adjusting the time is not what I would have had in mind but at least now I have a better understanding of the problem at hand . . .
If I come up with another amicable solution myself I'll certainly post it here.
Im trying to posing messages from FORM in my joomla based site... but nothing happens on the board
This form is in other dfrent directory, but im totaly newbie in php and i don`t know how to set a directory here.
looks good to me.. but i'll recieve this:
"Fatal error: Call to a member function query_first_slave() on a non-object in /var/www/de/shop/www/htdocs/community/includes/functions.php on line 1303"
anyone has an idea what could be wrong? using 3.7.2 currently
i wonder if its possible to vote threads with this too?!
i tried this:
PHP Code:
$postdm->set('votetotal', $voted);
but recieved the standard error:
Field votetotal is not defined in $validfields in class vB_DataManager_Post in [path]/includes/class_dm.php
anyone has a clue?
edit:
extending in class_dm.php with this variable works.. no error anymore, but the voting is not transfered. do i really have to write into the DB directly? or is there a way?