当前位置: 首页>>代码示例>>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;未经允许,请勿转载。