Example #1
0
	include 'include/storyform.inc.php';
	include XOOPS_ROOT_PATH.'/footer.php';
	break;

// --- post ---
case "post":

	$nosmiley  = isset($nosmiley) ? intval($nosmiley) : 0;

	$article->setTitle($subject);
	$article->setMainText($message);
	$article->setSummary($summary);
	$article->setCategoryid($id);
	$article->setGroupid($groupid);
	$article->setNosmiley($nosmiley);
	$article->setUrl($url);
	$article->setUrlname($urlname);

// no change
//	$article->setNotifyPub($notifypub);
//	$article->setUid($uid);
//	$article->setNohtml($nohtml_db);
//	$article->setHtmlpage("");
//	$article->setIshtml(0);
//	$article->setWeight(100);
//	$article->setPublished(0);
//	$article->setExpired(0);
//	$article->setType('user');
//	$article->setApproved($approve);

	$result = $article->store();
Example #2
0
        
        $story->setHtmlpage("");
        $story->setIshtml(0);
		$story->setWeight(100);
        //$story->setGroupid($groupid);
		$story->setGroupid($groupid);
        $story->setNosmiley($nosmiley);
        $story->setPublished(0);
        $story->setExpired(0);
        $story->setNotifyPub($notifypub);
        echo $story->articleid;

		$story->setType('user');

// bug fix : don't set url and urlname
		$story->setUrl($url);
		$story->setUrlname($urlname);

// file upload
//		$upload = new uploadfile($HTTP_POST_VARS['filename']);
//		$distfilename = $upload->doUploadToRandumFile(XOOPS_ROOT_PATH."/".$wfsConfig['filesbasepath']);
//
//		if ( $distfilename ) {
//
//			$article = new WfsArticle($story->articleid);
//          $file = new WfsFiles();
//			$file->setByUploadFile($HTTP_POST_VARS['filename']);
//          if (empty($HTTP_POST_VARS['downloadfilename'])) {
//				$file->setFileShowName($HTTP_POST_VARS['filename']);
//           } else {
//        	   $file->setFileShowName($HTTP_POST_VARS['$downloadfilename']);