當前位置: 首頁>>代碼示例>>PHP>>正文


PHP PMF_Category::getCategoryIdsFromArticle方法代碼示例

本文整理匯總了PHP中PMF_Category::getCategoryIdsFromArticle方法的典型用法代碼示例。如果您正苦於以下問題:PHP PMF_Category::getCategoryIdsFromArticle方法的具體用法?PHP PMF_Category::getCategoryIdsFromArticle怎麽用?PHP PMF_Category::getCategoryIdsFromArticle使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在PMF_Category的用法示例。


在下文中一共展示了PMF_Category::getCategoryIdsFromArticle方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: sprintf

 }
 $isTranslation = false;
 if (!is_null($faqlanguage)) {
     $isTranslation = true;
     $newLanguage = $faqlanguage;
 }
 if (PMF_String::substr($contentlink, 7) != "") {
     $answer = sprintf('%s<br /><div id="newFAQContentLink">%s<a href="http://%s" target="_blank">%s</a></div>', $answer, $PMF_LANG['msgInfo'], PMF_String::substr($contentlink, 7), $contentlink);
 }
 $autoActivate = PMF_Configuration::getInstance()->get('records.defaultActivation');
 $newData = array('lang' => $isTranslation == true ? $newLanguage : $languageCode, 'thema' => $question, 'active' => $autoActivate ? FAQ_SQL_ACTIVE_YES : FAQ_SQL_ACTIVE_NO, 'sticky' => 0, 'content' => nl2br($answer), 'keywords' => $keywords, 'author' => $name, 'email' => $email, 'comment' => FAQ_SQL_YES, 'date' => date('YmdHis'), 'dateStart' => '00000000000000', 'dateEnd' => '99991231235959', 'linkState' => '', 'linkDateCheck' => 0);
 if ($isNew) {
     $categories = $categories['rubrik'];
 } else {
     $newData['id'] = $faqid;
     $categories = $category->getCategoryIdsFromArticle($newData['id']);
 }
 $recordId = $faq->addRecord($newData, $isNew);
 $faq->addCategoryRelations($categories, $recordId, $newData['lang']);
 // Activate visits
 $visits = PMF_Visits::getInstance();
 $visits->add($recordId, $newData['lang']);
 if ($autoActivate) {
     // Add user permissions
     $faq->addPermission('user', $recordId, -1);
     $category->addPermission('user', $categories['rubrik'], array(-1));
     // Add group permission
     if ($faqconfig->get('security.permLevel') != 'basic') {
         $faq->addPermission('group', $recordId, -1);
         $category->addPermission('group', $categories['rubrik'], array(-1));
     }
開發者ID:atlcurling,項目名稱:tkt,代碼行數:31,代碼來源:ajaxservice.php


注:本文中的PMF_Category::getCategoryIdsFromArticle方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。