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


PHP EfrontLesson::getEvents方法代碼示例

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


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

示例1: basename

             $form = new HTML_QuickForm("timeline_form", "post", basename($_SERVER['PHP_SELF']) . "?ctg=social&op=timeline&lessons_ID=" . $_GET['lessons_ID'] . "&all=1", "", null, true);
             $result = eF_getTableData("lessons_timeline_topics", "id, title", "lessons_ID = " . $currentLesson->lesson['id']);
             $topics = array("0" => _ANYTOPIC);
             foreach ($result as $topic) {
                 $id = $topic['id'];
                 $topics[$id] = $topic['title'];
             }
             $form->addElement('select', 'topic', _SELECTTIMELINETOPIC, $topics, 'class = "inputText"  id="timeline_topic" onchange="javascript:change_topic(\'timeline_topic\')"');
             if (isset($_GET['topics_ID'])) {
                 $form->setDefaults(array('topic' => $_GET['topics_ID']));
                 $smarty->assign("T_TOPIC_TITLE", $topics[$_GET['topics_ID']]);
             }
             $renderer = new HTML_QuickForm_Renderer_ArraySmarty($smarty);
             $form->accept($renderer);
             $smarty->assign('T_TIMELINE_FORM', $renderer->toArray());
             $related_events = $currentLesson->getEvents(false, true, 0, 20);
             $timeline_options = array(array('text' => _GOTOLESSONSTIMELINE, 'image' => "16x16/go_into.png", 'href' => basename($_SERVER['PHP_SELF']) . "?ctg=social&op=timeline&lessons_ID=" . $currentLesson->lesson['id'] . "&all=1"));
             $allModules = eF_loadAllModules(true);
             $events = array();
             foreach ($related_events as $key => $event) {
                 if ($related_events[$key]->createMessage($allModules)) {
                     $events[$key] = array("avatar" => $related_events[$key]->event['avatar'], "avatar_width" => $related_events[$key]->event['avatar_width'], "avatar_height" => $related_events[$key]->event['avatar_height'], "time" => $related_events[$key]->event['time'], "message" => $related_events[$key]->event['message']);
                 }
             }
             $smarty->assign("T_TIMELINE_OPTIONS", $timeline_options);
             $smarty->assign("T_TIMELINE_LINK", basename($_SERVER['PHP_SELF']) . "?ctg=social&op=timeline&lessons_ID=" . $currentLesson->lesson['id'] . "&all=1");
             $smarty->assign("T_TIMELINE_EVENTS", $events);
         }
     }
     #cpp#endif
 }
開發者ID:jiangjunt,項目名稱:efront_open_source,代碼行數:31,代碼來源:control_panel.php


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