2
Alright in storyform.inc i added the following code under the title field.
$sform->addElement(new XoopsFormText(_NW_TITLE, 'title', 50, 255, $title), true);
$sform->addElement(new XoopsFormText(_NW_AUTHOR, 'author', 20, 20, $authorr), true);
$sform->addElement(new XoopsFormText(_NW_EMAIL, 'email', 20, 40, $emaill), true);
$sform->addElement(new XoopsFormText(_NW_WEB, 'web', 20, 50, $webb), false);
So i thought that i have to add in submit.php the following.
$story->setTitle($_POST['title']);
$story->setAuthor($_POST['authorr']);
$story->setEmail($_POST['emaill']);
$story->setWeb($_POST['webb']);
But this gives the following error:
Fatal error: Call to undefined method NewsStory::setAuthor() in D:\apache\htdocs\axoops\modules\news\submit.php on line 333
Why do i get this error?
I also added the tables to the mysql.