本文整理汇总了PHP中lms_steam::user_add_rssfeed方法的典型用法代码示例。如果您正苦于以下问题:PHP lms_steam::user_add_rssfeed方法的具体用法?PHP lms_steam::user_add_rssfeed怎么用?PHP lms_steam::user_add_rssfeed使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类lms_steam
的用法示例。
在下文中一共展示了lms_steam::user_add_rssfeed方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: HTML_TEMPLATE_IT
<?php
require_once PATH_LIB . "format_handling.inc.php";
require_once PATH_LIB . "comments_handling.inc.php";
$html_entry = new HTML_TEMPLATE_IT();
$html_entry->loadTemplateFile(PATH_TEMPLATES . "weblog_entry.template.html");
$weblog_html_handler = new lms_weblog($weblog);
if (isset($_GET["action"]) && $_GET["action"] == "bookmark_rss") {
lms_steam::user_add_rssfeed($weblog->get_id(), PATH_URL . "services/feeds/weblog_public.php?id=" . $weblog->get_id(), "weblog", lms_steam::get_link_to_root($weblog));
$_SESSION["confirmation"] = str_replace("%NAME", h($weblog->get_name()), gettext("You are keeping an eye on '%NAME' from now on."));
header("Location: " . PATH_URL . "weblog/" . $date->get_id() . "/");
exit;
}
if (isset($_GET["action"]) && $_GET["action"] == "delete_bookmark") {
$user = lms_steam::get_current_user();
$id = (int) $_GET["unsubscribe"];
$feeds = $user->get_attribute("USER_RSS_FEEDS");
if (!is_array($feeds)) {
$feeds = array();
}
unset($feeds[$id]);
$user->set_attribute("USER_RSS_FEEDS", $feeds);
$_SESSION["confirmation"] = str_replace("%NAME", h($weblog->get_name()), gettext("subscription of '%NAME' canceled."));
header("Location: " . PATH_URL . "weblog/" . $date->get_id() . "/");
exit;
}
$weblog_html_handler->set_menu("entry");
$weblog_html_handler->set_widget_categories();
$weblog_html_handler->set_widget_archive(5);
$entry = $date->get_attributes(array("DATE_TITLE", "DATE_DESCRIPTION", "DATE_START_DATE", "DATE_CATEGORY", "OBJ_KEYWORDS"));
$creator = $date->get_creator();
示例2: frameResponse
public function frameResponse(\FrameResponseObject $frameResponseObject)
{
$forum_id = $this->params[0];
$portal = \lms_portal::get_instance();
$user = \lms_steam::get_current_user();
$rss_feeds = $user->get_attribute("USER_RSS_FEEDS");
$author_id = isset($this->params[1]) ? $this->params[1] : null;
if (!($messageboard = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $forum_id))) {
include "bad_link.php";
exit;
}
if ($messageboard instanceof \steam_document) {
$thread = $messageboard;
$messageboard = $thread->get_annotating();
define("OBJ_ID", $thread->get_id());
if (!$thread->check_access_read($user)) {
throw new \Exception("No rights to view this.", E_USER_RIGHTS);
}
} else {
define("OBJ_ID", $messageboard->get_id());
if (!$messageboard->check_access_read($user)) {
throw new \Exception("No rights to view this.", E_USER_RIGHTS);
}
}
if (!$messageboard instanceof \steam_messageboard) {
include "bad_link.php";
exit;
}
$is_watching = FALSE;
if (is_array($rss_feeds)) {
foreach (array_keys($rss_feeds) as $item) {
if ($item == $messageboard->get_id()) {
$is_watching = TRUE;
}
}
}
$content = \Messageboard::getInstance()->loadTemplate("forum_all_topics.template.html");
$dsc = $messageboard->get_attribute("OBJ_DESC");
if (!empty($dsc)) {
$content->setCurrentBlock("BLOCK_DESCRIPTION");
$content->setVariable("FORUM_DESCRIPTION", get_formatted_output($dsc));
$content->parse("BLOCK_DESCRIPTION");
}
$grp = $messageboard->get_environment()->get_creator();
if ($grp->get_name() == "learners" && $grp->get_attribute(OBJ_TYPE) == "course_learners") {
$grp = $grp->get_parent_group();
}
$content->setVariable("CURRENT_DISCUSSIONS_LABEL", gettext("Current Thread"));
$content->setVariable("LABEL_SEARCH", gettext("Search"));
if (isset($_GET["action"]) && $_GET["action"] == "bookmark_rss") {
\lms_steam::user_add_rssfeed($messageboard->get_id(), PATH_URL . "services/feeds/forum_public.php?id=" . $messageboard->get_id(), "discussion board", \lms_steam::get_link_to_root($messageboard));
$_SESSION["confirmation"] = str_replace("%NAME", h($messageboard->get_name()), gettext("You are keeping an eye on '%NAME' from now on."));
header("Location: " . PATH_URL . "forums/" . $messageboard->get_id() . "/");
exit;
}
if (isset($_GET["action"]) && $_GET["action"] == "delete_bookmark") {
$user = \lms_steam::get_current_user();
$id = (int) $_GET["unsubscribe"];
$feeds = $user->get_attribute("USER_RSS_FEEDS");
if (!is_array($feeds)) {
$feeds = array();
}
unset($feeds[$id]);
$user->set_attribute("USER_RSS_FEEDS", $feeds);
$_SESSION["confirmation"] = str_replace("%NAME", h($messageboard->get_name()), gettext("subscription of '%NAME' canceled."));
header("Location: " . PATH_URL . "forums/" . $messageboard->get_id() . "/");
exit;
}
if (empty($_GET["pattern"]) && !isset($author_id)) {
$cache = get_cache_function(OBJ_ID, 300);
$discussions = $cache->call("lms_forum::get_discussions", OBJ_ID);
} elseif (isset($author_id)) {
$cache = get_cache_function(\lms_steam::get_current_user()->get_name(), 300);
$discussions = $cache->call("lms_forum::search_user_posts", $messageboard->get_id(), $author_id);
} else {
$cache = get_cache_function(\lms_steam::get_current_user()->get_name(), 300);
$discussions = $cache->call("lms_forum::search_pattern", $messageboard->get_id(), $_GET["pattern"]);
}
$content->setVariable("LABEL_ALL_TOPICS", gettext("All Threads"));
if ($messageboard->check_access_annotate(\lms_steam::get_current_user())) {
$content->setCurrentBlock("BLOCK_WRITE_ACCESS");
if (isset($author_id)) {
$content->setVariable("LABEL_THREADS_POSTED_IN", gettext("All Threads"));
// TODO: Passt der link?
$content->setVariable("LINK_AUTHOR", PATH_URL . "forums/" . $messageboard->get_id() . "/");
} else {
$content->setVariable("LABEL_THREADS_POSTED_IN", gettext("Threads you've posted in"));
// TODO: Passt der link?
$content->setVariable("LINK_AUTHOR", PATH_URL . "forums/" . $messageboard->get_id() . "/?author=" . \lms_steam::get_current_user()->get_name());
}
// TODO: Passt der link?
$content->setVariable("LINK_POST_NEW", PATH_URL . "messageboard/newDiscussion/" . $messageboard->get_id());
$content->setVariable("LABEL_POST_NEW_THREAD", gettext("Post a new thread"));
$content->parse("BLOCK_WRITE_ACCESS");
}
if ($messageboard->check_access_write(\lms_steam::get_current_user())) {
$content->setCurrentBlock("BLOCK_ADMIN");
$content->setVariable("LINK_EDIT", PATH_URL . "messageboard/editMessageboard/" . $messageboard->get_id());
$content->setVariable("LABEL_EDIT", gettext("Preferences"));
$content->setVariable("LINK_DELETE", PATH_URL . "messageboard/deleteMessageboard/" . $messageboard->get_id());
//.........这里部分代码省略.........
示例3: frameResponse
public function frameResponse(\FrameResponseObject $frameResponseObject)
{
$forum_id = $this->params[0];
$portal = \lms_portal::get_instance();
$user = \lms_steam::get_current_user();
$rss_feeds = $user->get_attribute("USER_RSS_FEEDS");
if (!($messageboard = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $forum_id))) {
include "bad_link.php";
exit;
}
if ($messageboard instanceof \steam_document) {
$thread = $messageboard;
$messageboard = $thread->get_annotating();
define("OBJ_ID", $thread->get_id());
if (!$thread->check_access_read($user)) {
throw new \Exception("No rights to view this.", E_USER_RIGHTS);
}
} else {
define("OBJ_ID", $messageboard->get_id());
if (!$messageboard->check_access_read($user)) {
throw new \Exception("No rights to view this.", E_USER_RIGHTS);
}
}
if (!$messageboard instanceof \steam_messageboard) {
include "bad_link.php";
exit;
}
$is_watching = FALSE;
if (is_array($rss_feeds)) {
foreach (array_keys($rss_feeds) as $item) {
if ($item == $messageboard->get_id()) {
$is_watching = TRUE;
}
}
}
$content = \Messageboard::getInstance()->loadTemplate("forum_discussion.template.html");
$content->setVariable("REPLY_LABEL", gettext("Reply to this topic?"));
if ($_SERVER["REQUEST_METHOD"] == "POST" && $thread->check_access_annotate(\lms_steam::get_current_user())) {
$values = $_POST["values"];
if (empty($values["body"])) {
$portal->set_problem_description(gettext("Please enter your message."));
}
if (!empty($values["save"]) && !empty($values["body"])) {
$new_comment = \steam_factory::create_textdoc($GLOBALS["STEAM"]->get_id(), "Re: " . $thread->get_name(), $values["body"]);
// $all_user = steam_factory::groupname_to_object( $GLOBALS[ "STEAM" ]->get_id(), STEAM_ALL_USER );
// $new_comment->set_acquire( FALSE );
// $new_comment->set_read_access( $all_user, TRUE );
// $new_comment->set_write_access( $all_user, FALSE );
// $new_comment->set_annotate_access( $all_user, TRUE );
$thread->add_annotation($new_comment);
$new_comment->set_acquire($thread);
$mbid = $messageboard->get_id();
// Handle Related Cache-Data
require_once "Cache/Lite.php";
$cache = new \Cache_Lite(array("cacheDir" => PATH_CACHE));
$cache->clean($mbid);
// clean forumcache
$fcache = get_cache_function($forum_id, 600);
$fcache->drop("lms_forum::get_discussions", $forum_id);
// clean forumcache
$fcache = get_cache_function($mbid, 600);
$fcache->drop("lms_forum::get_discussions", $mbid);
// clean rsscache of the forum
// TODO: Passt der link?
$feedlink = PATH_URL . "services/feeds/forum_public.php?id=" . OBJ_ID;
$rcache = get_cache_function("rss", 600);
$rcache->drop("lms_rss::get_items", $feedlink);
} else {
if (empty($values["save"]) && !empty($values["body"])) {
// PREVIEW
$content->setCurrentBlock("BLOCK_PREVIEW_COMMENT");
$content->setVariable("LABEL_PREVIEW_COMMENT", gettext("Preview the edit"));
$content->setVariable("VALUE_PREVIEW_COMMENT", get_formatted_output($values["body"]));
$content->setVariable("TEXT_COMMENT", h($values["body"]));
$content->parse("BLOCK_PREVIEW_COMMENT");
$content->setVariable("REPLY_LABEL", gettext("Change it?"));
}
}
}
if (isset($_GET["action"]) && $_GET["action"] == "bookmark_rss") {
\lms_steam::user_add_rssfeed($messageboard->get_id(), PATH_URL . "services/feeds/forum_public.php?id=" . $messageboard->get_id(), "discussion board", \lms_steam::get_link_to_root($messageboard));
$_SESSION["confirmation"] = str_replace("%NAME", h($messageboard->get_name()), gettext("You are keeping an eye on '%NAME' from now on."));
header("Location: " . PATH_URL . "forums/" . $thread->get_id() . "/");
exit;
}
if (isset($_GET["action"]) && $_GET["action"] == "delete_bookmark") {
$user = \lms_steam::get_current_user();
$id = (int) $_GET["unsubscribe"];
$feeds = $user->get_attribute("USER_RSS_FEEDS");
if (!is_array($feeds)) {
$feeds = array();
}
unset($feeds[$id]);
$user->set_attribute("USER_RSS_FEEDS", $feeds);
$_SESSION["confirmation"] = str_replace("%NAME", h($messageboard->get_name()), gettext("subscription of '%NAME' canceled."));
header("Location: " . PATH_URL . "forums/" . $thread->get_id() . "/");
exit;
}
$content->setVariable("CURRENT_DISCUSSIONS_LABEL", gettext("Current Thread"));
$cache = get_cache_function($messageboard->get_id(), 600);
//.........这里部分代码省略.........
示例4: HTML_TEMPLATE_IT
$content = new HTML_TEMPLATE_IT();
$content->loadTemplateFile(PATH_TEMPLATES . "forum_all_topics.template.html");
$dsc = $messageboard->get_attribute("OBJ_DESC");
if (!empty($dsc)) {
$content->setCurrentBlock("BLOCK_DESCRIPTION");
$content->setVariable("FORUM_DESCRIPTION", get_formatted_output($dsc));
$content->parse("BLOCK_DESCRIPTION");
}
$grp = $messageboard->get_environment()->get_creator();
if ($grp->get_name() == "learners" && $grp->get_attribute(OBJ_TYPE) == "course_learners") {
$grp = $grp->get_parent_group();
}
$content->setVariable("CURRENT_DISCUSSIONS_LABEL", gettext("Current Thread"));
$content->setVariable("LABEL_SEARCH", gettext("Search"));
if (isset($_GET["action"]) && $_GET["action"] == "bookmark_rss") {
lms_steam::user_add_rssfeed($messageboard->get_id(), PATH_URL . "services/feeds/forum_public.php?id=" . $messageboard->get_id(), "discussion board", lms_steam::get_link_to_root($messageboard));
$_SESSION["confirmation"] = str_replace("%NAME", h($messageboard->get_name()), gettext("You are keeping an eye on '%NAME' from now on."));
header("Location: " . PATH_URL . "forums/" . $messageboard->get_id() . "/");
exit;
}
if (isset($_GET["action"]) && $_GET["action"] == "delete_bookmark") {
$user = lms_steam::get_current_user();
$id = (int) $_GET["unsubscribe"];
$feeds = $user->get_attribute("USER_RSS_FEEDS");
if (!is_array($feeds)) {
$feeds = array();
}
unset($feeds[$id]);
$user->set_attribute("USER_RSS_FEEDS", $feeds);
$_SESSION["confirmation"] = str_replace("%NAME", h($messageboard->get_name()), gettext("subscription of '%NAME' canceled."));
header("Location: " . PATH_URL . "forums/" . $messageboard->get_id() . "/");
示例5: execute
public function execute(\FrameResponseObject $frameResponseObject)
{
//$portal = \lms_portal::get_instance();
//$portal->initialize( GUEST_NOT_ALLOWED );
//$portal->set_confirmation();
$user = \lms_steam::get_current_user();
//$path = $request->getPath();
$STEAM = $GLOBALS["STEAM"];
$weblogId = $this->id;
$weblog = \steam_factory::get_object($STEAM->get_id(), $weblogId);
//if ( ! $weblog = steam_factory::get_object( $STEAM->get_id(), $_GET[ "id" ] ) )
//{
// include( "bad_link.php" );
// exit;
//}
defined("OBJ_ID") or define("OBJ_ID", $weblogId);
if (!$weblog instanceof \steam_calendar) {
if ($weblog instanceof \steam_container) {
$category = $weblog;
$categories = $category->get_environment();
$weblog = new \steam_weblog((string) $GLOBALS["STEAM"]->get_id(), $categories->get_environment()->get_id());
} elseif ($weblog instanceof \steam_date) {
$date = $weblog;
$weblog = new \steam_weblog((string) $GLOBALS["STEAM"]->get_id(), $date->get_environment()->get_id());
} else {
include "bad_link.php";
exit;
}
} else {
$weblog = new \steam_weblog((string) $GLOBALS["STEAM"]->get_id(), $weblogId);
//define( "OBJ_ID", $weblogId );
if (!$weblog->check_access_read($user)) {
throw new \Exception("No rights to view this.", E_USER_RIGHTS);
}
}
$html_entry = \Weblog::getInstance()->loadTemplate("weblog_entry.template.html");
//$html_entry = new HTML_TEMPLATE_IT();
//$html_entry->loadTemplateFile( PATH_TEMPLATES . "weblog_entry.template.html" );
$weblog_html_handler = new \lms_weblog($weblog);
if (isset($_GET["action"]) && $_GET["action"] == "bookmark_rss") {
\lms_steam::user_add_rssfeed($weblog->get_id(), PATH_URL . "services/feeds/weblog_public.php?id=" . $weblog->get_id(), "weblog", \lms_steam::get_link_to_root($weblog));
$_SESSION["confirmation"] = str_replace("%NAME", h($weblog->get_name()), gettext("You are keeping an eye on '%NAME' from now on."));
header("Location: " . PATH_URL . "weblog/" . $date->get_id() . "/");
exit;
}
if (isset($_GET["action"]) && $_GET["action"] == "delete_bookmark") {
$user = \lms_steam::get_current_user();
$id = (int) $_GET["unsubscribe"];
$feeds = $user->get_attribute("USER_RSS_FEEDS");
if (!is_array($feeds)) {
$feeds = array();
}
unset($feeds[$id]);
$user->set_attribute("USER_RSS_FEEDS", $feeds);
$_SESSION["confirmation"] = str_replace("%NAME", h($weblog->get_name()), gettext("subscription of '%NAME' canceled."));
header("Location: " . PATH_URL . "weblog/" . $date->get_id() . "/");
exit;
}
$weblog_html_handler->set_menu("entry");
$weblog_html_handler->set_widget_categories();
$weblog_html_handler->set_widget_archive(5);
$date = $weblog;
$entry = $date->get_attributes(array("DATE_TITLE", "DATE_DESCRIPTION", "DATE_START_DATE", "DATE_CATEGORY", "OBJ_KEYWORDS"));
$creator = $date->get_creator();
$html_entry->setVariable("VALUE_ARTICLE_TEXT", get_formatted_output(h($date->get_attribute("DATE_DESCRIPTION"))));
$html_entry->setVariable("VALUE_POSTED_BY", str_replace("%NAME", "<a href=\"" . PATH_URL . "user/" . $creator->get_name() . "/\">" . h($creator->get_attribute("USER_FIRSTNAME")) . " " . h($creator->get_attribute("USER_FULLNAME")) . "</a>", gettext("Posted by %NAME")));
$html_entry->setVariable("VALUE_DATE_TIME", strftime("%x %X", h($entry["DATE_START_DATE"])));
$category = $entry["DATE_CATEGORY"];
if (!empty($category)) {
$html_entry->setVariable("LABEL_IN", gettext("in"));
$html_entry->setVariable("VALUE_CATEGORY", "<a href=\"" . PATH_URL . "weblog/" . $category->get_id() . "/\">" . h($category->get_name()) . "</a>");
} else {
$html_entry->setVariable("VALUE_CATEGORY", gettext("no category"));
}
$html_entry->setVariable("POST_PERMALINK", PATH_URL . "weblog/" . $weblog->get_id() . "/#comment" . $date->get_id());
$html_entry->setVariable("POST_PERMALINK_LABEL", gettext("permalink"));
$weblog_html_handler->set_main_html($html_entry->get() . self::get_comment_html($date, PATH_URL . "weblog/" . $date->get_id()));
//TODO:RSS_FEED
//$portal->set_rss_feed( PATH_URL . "services/feeds/weblog_public.php?id=" . OBJ_ID , gettext( "Feed" ), str_replace( "%l", (isset($login))?$login:'', gettext( "Subscribe to this forum's Newsfeed" ) ) );
$rootlink = \lms_steam::get_link_to_root($weblog);
$headline = array($rootlink[0], $rootlink[1], array("link" => $rootlink[1]["link"] . "communication/", "name" => gettext("Communication")), array("name" => h($weblog->get_name()), "link" => PATH_URL . "weblog/" . $weblog->get_id() . "/"), array("link" => "", "name" => h($date->get_attribute("DATE_TITLE"))));
/*$portal->set_page_main(
$headline,
$weblog_html_handler->get_html()
);
$portal->show_html();*/
$frameResponseObject->setHeadline($headline);
$widget = new \Widgets\RawHtml();
$widget->setHtml($weblog_html_handler->get_html());
$frameResponseObject->addWidget($widget);
return $frameResponseObject;
}
示例6: execute
public function execute(\FrameResponseObject $frameResponseObject)
{
// $portal = \lms_portal::get_instance();
// $portal->initialize( GUEST_NOT_ALLOWED );
$user = \lms_steam::get_current_user();
// $path = $request->getPath();
$STEAM = $GLOBALS["STEAM"];
$weblogId = $this->params[0];
if (!defined("OBJ_ID")) {
define("OBJ_ID", $weblogId);
}
$weblog = \steam_factory::get_object($STEAM->get_id(), $weblogId);
//if ( ! $weblog = steam_factory::get_object( $STEAM->get_id(), $_GET[ "id" ] ) )
//{
// include( "bad_link.php" );
// exit;
//}
if (!$weblog instanceof \steam_calendar) {
if ($weblog instanceof \steam_container) {
$category = $weblog;
$categories = $category->get_environment();
$weblog = new \steam_weblog($GLOBALS["STEAM"]->get_id(), $categories->get_environment()->get_id());
} elseif ($weblog instanceof \steam_date) {
$date = $weblog;
$weblog = new \steam_weblog($GLOBALS["STEAM"]->get_id(), $date->get_environment()->get_id());
} else {
header("location: /404/");
exit;
}
} else {
$weblog = new \steam_weblog($GLOBALS["STEAM"]->get_id(), $weblogId);
//define( "OBJ_ID", $weblogId );
if (!$weblog->check_access_read($user)) {
throw new \Exception("No rights to view this.", E_USER_RIGHTS);
}
}
$weblog_html_handler = new \lms_weblog($weblog);
//var_dump($weblog_html_handler);die;
$weblog_html_handler->set_menu("entries");
$grp = $weblog->get_environment()->get_creator();
\steam_factory::load_attributes($GLOBALS["STEAM"]->get_id(), array($grp), array(OBJ_NAME, OBJ_TYPE));
if ($grp->get_name() == "learners" && $grp->get_attribute(OBJ_TYPE) == "course_learners") {
$grp = $grp->get_parent_group();
}
$weblog_html_handler->set_widget_categories();
$all_date_objects = $weblog->get_date_objects();
usort($all_date_objects, "sort_dates");
//sort_dates defined in steam_calendar.class
$weblog_html_handler->set_widget_archive(5);
$weblog_html_handler->set_widget_blogroll();
$weblog_html_handler->set_widget_access($grp);
if (isset($_GET["action"]) && $_GET["action"] == "bookmark_rss") {
\lms_steam::user_add_rssfeed($weblog->get_id(), PATH_URL . "services/feeds/weblog_public.php?id=" . $weblog->get_id(), "weblog", lms_steam::get_link_to_root($weblog));
$_SESSION["confirmation"] = str_replace("%NAME", h($weblog->get_name()), gettext("You are keeping an eye on '%NAME' from now on."));
header("Location: " . PATH_URL . "weblog/index/" . $weblog->get_id() . "/");
exit;
}
if (isset($_GET["action"]) && $_GET["action"] == "delete_bookmark") {
$user = \lms_steam::get_current_user();
$id = (int) $_GET["unsubscribe"];
$feeds = $user->get_attribute("USER_RSS_FEEDS");
if (!is_array($feeds)) {
$feeds = array();
}
unset($feeds[$id]);
$user->set_attribute("USER_RSS_FEEDS", $feeds);
$_SESSION["confirmation"] = str_replace("%NAME", h($weblog->get_name()), gettext("subscription of '%NAME' canceled."));
header("Location: " . PATH_URL . "weblog/index/" . $weblog->get_id() . "/");
exit;
}
//TODO what is the reason for this structure?
switch (TRUE) {
case isset($date) && $date:
$weblog_html_handler->print_entries(array($date), FALSE);
break;
default:
$weblog_html_handler->print_entries($all_date_objects);
break;
}
$weblog_html_handler->set_podcast_link();
//$portal->set_rss_feed( PATH_URL . "services/feeds/weblog_public.php?id=" . OBJ_ID , gettext( "Feed" ), str_replace( "%l", isset($login)?$login:'', gettext( "Subscribe to this forum's Newsfeed" ) ) );
$rootlink = \lms_steam::get_link_to_root($weblog);
//var_dump($rootlink);die;
//var_dump($rootlink);die;
$headline = array($rootlink[0], $rootlink[1], array("link" => $rootlink[1]["link"] . "communication/", "name" => gettext("Communication")), array("link" => "", "name" => h($weblog->get_name())));
//$portal->set_page_main(
//$headline,
//$weblog_html_handler->get_html()
//);
//var_dump($portal);die;
//return $portal->get_html();
$frameResponseObject->setHeadline($headline);
$widget = new \Widgets\RawHtml();
$widget->setHtml($weblog_html_handler->get_html());
$frameResponseObject->addWidget($widget);
return $frameResponseObject;
}
示例7: gettext
if ($document instanceof steam_document) {
$content->setCurrentBlock("BLOCK_DOCUMENT_OPTIONS");
$content->setVariable("LABEL_DOWNLOAD", gettext("Download"));
$content->setVariable("LINK_DOWNLOAD", PATH_URL . "get_document.php?id=" . $document->get_id());
if ($document->check_access_write($user)) {
$content->setCurrentBlock("BLOCK_WRITE_ACCESS");
$content->setVariable("LINK_EDIT", PATH_URL . "doc/" . $document->get_id() . "/edit/");
$content->setVariable("LABEL_EDIT", gettext("Edit"));
$content->setVariable("LINK_DELETE", PATH_URL . "doc/" . $document->get_id() . "/delete/");
$content->setVariable("LABEL_DELETE", gettext("Delete"));
$content->parse("BLOCK_WRITE_ACCESS");
}
$content->parse("BLOCK_DOCUMENT_OPTIONS");
}
if (isset($_GET["action"]) && $_GET["action"] == "bookmark_rss") {
lms_steam::user_add_rssfeed($document->get_id(), PATH_URL . "services/feeds/document_public.php?id=" . $document->get_id(), "document", lms_steam::get_link_to_root($document));
$portal->set_confirmation(str_replace("%NAME", h($document->get_name()), gettext("You are keeping an eye on '%NAME' from now on.")));
}
$content->setVariable("VALUE_OBJ_NAME", h($document->get_name()));
$content->setVariable("VALUE_OBJ_DSC", h($document->get_attribute("OBJ_DESC")));
$author = $document->get_creator();
$author_data = $author->get_attributes(array("USER_FIRSTNAME", "USER_FULLNAME", "OBJ_ICON"));
$author_data["OBJ_ICON"] = $author_data["OBJ_ICON"]->get_id();
$content->setVariable("LINK_AUTHOR", PATH_URL . "user/" . h($author->get_name()) . "/");
$content->setVariable("AUTHOR_ICON", PATH_URL . "get_document.php?id=" . $author_data["OBJ_ICON"] . "?type=usericon&width=30&height=40");
$content->setVariable("VALUE_CREATION_TIME", str_replace("%DATE", strftime("%x", $document->get_attribute("OBJ_CREATION_TIME")), gettext("on %DATE")));
$content->setVariable("VALUE_AUTHOR_NAME", h($author_data["USER_FIRSTNAME"]) . " " . h($author_data["USER_FULLNAME"]));
$content->setVariable("HTML_ANNOTATIONS", $comments_html);
if ($document instanceof steam_document) {
// DOCUMENT
$content->setCurrentBlock("BLOCK_DOCUMENT");