- Joined
- Jan 26, 2008
- Messages
- 17,835
I have a add on which I am building, which inserts threads into the database with a short (user defined) description, and I'll figure out how to display them later.
Anyway, I need a way to insert the threadid into the database into my table.
I've tried;
Note, what I know I've learnt from reading the development forums or through reading other people's code.
Anyway, that doesnt work, I get this: Fatal error: Call to undefined method Mikey_ControllerPublic_Index::get() in /var/www/sites/xenfor
library/Mikey/ControllerPublic/Index.php on line 33
Note; i've also posted this over at xenforo.com - so feel free to reply here or there
Any help will be appreciated
Anyway, I need a way to insert the threadid into the database into my table.
I've tried;
PHP:
public function actionAddYes() {
$db = XenForo_Application::get('db');
$visitor = XenForo_Visitor::getInstance();
$userid = $visitor['user_id'];
$blurb = $this->_input->cleanString($_POST['blurb']);
// $date = XenForo_Application::get('time'); <- not working - if anyone could suggest an alternate, i'd appreciate that also
$threadid = $this->get('thread_id');
$db->query("INSERT INTO `xf_Mikey` (`threadid`, `userid`, `date`, `blurb`) VALUES ('$threadid', '$userid', '$date' '$blurb');");
return $this->responseRedirect(XenForo_ControllerResponse_Redirect::SUCCESS);
}
Note, what I know I've learnt from reading the development forums or through reading other people's code.
Anyway, that doesnt work, I get this: Fatal error: Call to undefined method Mikey_ControllerPublic_Index::get() in /var/www/sites/xenfor

Note; i've also posted this over at xenforo.com - so feel free to reply here or there

Any help will be appreciated
