This file is part of Garden. Garden is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Garden is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Garden. If not, see . Contact Vanilla Forums Inc. at support [at] vanillaforums [dot] com
Inheritance: extends Gdn_Module
 /**
  * Show tags after discussion body.
  */
 public function DiscussionController_AfterDiscussionBody_Handler($Sender)
 {
     // Allow disabling of inline tags.
     if (C('Plugins.Tagging.DisableInline', FALSE)) {
         return;
     }
     if (!property_exists($Sender->EventArguments['Object'], 'CommentID')) {
         $DiscussionID = property_exists($Sender, 'DiscussionID') ? $Sender->DiscussionID : 0;
         if (!$DiscussionID) {
             return;
         }
         $TagModule = new TagModule($Sender);
         echo $TagModule->InlineDisplay();
     }
 }
Beispiel #2
0
 public function get_by_id($mooc_id)
 {
     $mod = new ActivityModule();
     $mooc = $mod->get_by_id($mooc_id);
     if ($mooc == DB_ERR_NO_DATA) {
         return NULL;
     }
     $sect_list = $mod->get_sec_by_actId($mooc->id);
     $mooc->content = $sect_list;
     // 获取对应的标签
     $tagModule = new TagModule();
     $tag_list = $tagModule->get_tag_by_actId($mooc_id);
     $act->tags = $tag_list;
     return $mooc;
 }
Beispiel #3
0
 /**
  * 根据直播视频的id 查询对应的类型、 内容、 标签  并赋值给视频直播
  * @param unknown $video
  */
 public function save_foreign($video)
 {
     $categoyMod = new CategoryModule();
     $tagMod = new TagModule();
     $sectTab = new SectionTable();
     $category = $categoyMod->get_by_id($video->category->id);
     $sect_list = $sectTab->get_sec_by_videoId($video->id);
     $tag_list = $tagMod->get_video_tag_by_videoId($video->id);
     $video->category = $category;
     // 存入类型
     $video->content = $sect_list;
     // 存入内容
     $video->tags = $tag_list;
     // 存入标签
 }
Beispiel #4
0
 /**
  * 通过id查询出详细的演讲内容
  *
  */
 function get_by_id($talk_id)
 {
     $act_modules = new ActivityModule();
     $talk = $act_modules->get_by_id($talk_id);
     if ($talk === DB_ERR_NO_DATA) {
         return NULL;
     }
     $talk_section_list = $act_modules->get_sec_by_actId($talk_id);
     foreach ($talk_section_list as $section) {
         array_push($talk->content, $section);
     }
     // 获取对应的标签
     $tagModule = new TagModule();
     $tag_list = $tagModule->get_tag_by_actId($talk_id);
     $talk->tags = $tag_list;
     return $talk;
 }
Beispiel #5
0
 /**
  * 查询所有的标签对象
  * return 返回tag标签对象集合
  */
 public function get_all()
 {
     $tagModule = new TagModule();
     return $tagModule->get_all();
 }
Beispiel #6
0
 /**
  * Adds the tag module to the page.
  */
 private function _AddTagModule($Sender)
 {
     if (!C('Plugins.Tagging.Enabled')) {
         return;
     }
     $Sender->AddCSSFile('plugins/Tagging/design/tag.css');
     $DiscussionID = property_exists($Sender, 'DiscussionID') ? $Sender->DiscussionID : 0;
     include_once PATH_PLUGINS . '/Tagging/class.tagmodule.php';
     $TagModule = new TagModule($Sender);
     $TagModule->GetData($DiscussionID);
     $Sender->AddModule($TagModule);
 }
 /**
  * Adds the tag module to the page.
  */
 private function _AddTagModule($Sender)
 {
     $DiscussionID = property_exists($Sender, 'DiscussionID') ? $Sender->DiscussionID : 0;
     include_once PATH_PLUGINS . '/Tagging/class.tagmodule.php';
     $TagModule = new TagModule($Sender);
     $TagModule->GetData($DiscussionID);
     $Sender->AddModule($TagModule);
 }