ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilPDNewsBlockGUI Class Reference

BlockGUI class for block NewsForContext. More...

+ Inheritance diagram for ilPDNewsBlockGUI:
+ Collaboration diagram for ilPDNewsBlockGUI:

Public Member Functions

 ilPDNewsBlockGUI ()
 Constructor.
 getNewsData ()
 Get news for context.
executeCommand ()
 execute command
 fillDataSection ()
 Fill data section.
 getHTML ()
 Get bloch HTML code.
 showFeedUrl ()
 Show feed URL.
 addCloseCommand ($a_content_block)
 showNews ()
 show news
 editSettings ()
 Show settings screen.
 cancelSettings ()
 Cancel settings.
 saveSettings ()
 Save settings.
 changeFeedSettings ()
 change user password
- Public Member Functions inherited from ilNewsForContextBlockGUI
 ilNewsForContextBlockGUI ()
 Constructor.
 setEnableEdit ($a_enable_edit=0)
 Set EnableEdit.
 getEnableEdit ()
 Get EnableEdit.
 handleView ()
 Handles show/hide notification view and removes notifications if hidden.
 fillRow ($news)
 get flat bookmark list for personal desktop
 getOverview ()
 Get overview.
 unsubscribeNews ()
 Unsubscribe current user from news.
 subscribeNews ()
 Subscribe current user from news.
 fillFooter ()
 block footer
 showViewFooter ()
 Show additional footer for show/hide notifications.
 showNotifications ()
 hideNotifications ()
 initSettingsForm ()
 Init setting form.
 getDynamic ()
 getDynamicReload ()
 getJSEnabler ()
 disableJS ()
 enableJS ()
- Public Member Functions inherited from ilBlockGUI
 ilBlockGUI ()
 Constructor.
 addHeaderLink ($a_href, $a_text, $status=true)
 getHeaderLinks ()
 setData ($a_data)
 Set Data.
 getData ()
 Get Data.
 setBigMode ($a_bigmode)
 Set Big Mode.
 getBigMode ()
 Get Big Mode.
 setBlockId ($a_block_id=0)
 Set Block Id.
 getBlockId ()
 Get Block Id.
 setAvailableDetailLevels ($a_max, $a_min=0)
 Set Available Detail Levels.
 setCurrentDetailLevel ($a_currentdetaillevel)
 Set Current Detail Level.
 setGuiObject (&$a_gui_object)
 Set GuiObject.
 getGuiObject ()
 Get GuiObject.
 getCurrentDetailLevel ()
 Get Current Detail Level.
 setTitle ($a_title)
 Set Title.
 getTitle ()
 Get Title.
 setImage ($a_image)
 Set Image.
 getImage ()
 Get Image.
 setOffset ($a_offset)
 Set Offset.
 getOffset ()
 Get Offset.
 correctOffset ()
 setLimit ($a_limit)
 Set Limit.
 getLimit ()
 Get Limit.
 setRepositoryMode ($a_repositorymode)
 Set RepositoryMode.
 getRepositoryMode ()
 Get RepositoryMode.
 setFooterInfo ($a_footerinfo, $a_hide_and_icon=false)
 Set Footer Info.
 getFooterInfo ($a_hide_and_icon=false)
 Get Footer Info.
 setSubtitle ($a_subtitle)
 Set Subtitle.
 getSubtitle ()
 Get Subtitle.
 setRefId ($a_refid)
 Set Ref Id (only used if isRepositoryObject() is true).
 getRefId ()
 Get Ref Id (only used if isRepositoryObject() is true).
 setAdminCommands ($a_admincommands)
 Set Administration Commmands.
 getAdminCommands ()
 Get Administration Commmands.
 setColSpan ($a_colspan)
 Set Columns Span.
 getColSpan ()
 Get Columns Span.
 setEnableDetailRow ($a_enabledetailrow)
 Set EnableDetailRow.
 getEnableDetailRow ()
 Get EnableDetailRow.
 setEnableNumInfo ($a_enablenuminfo)
 Set Enable Item Number Info.
 getEnableNumInfo ()
 Get Enable Item Number Info.
 setProperties ($a_properties)
 This function is supposed to be used for block type specific properties, that should be inherited through ilColumnGUI->setBlockProperties.
 getProperty ($a_property)
 setProperty ($a_property, $a_value)
 setRowTemplate ($a_rowtemplatename, $a_rowtemplatedir="")
 Set Row Template Name.
 getNavParameter ()
 getDetailParameter ()
 getConfigParameter ()
 getMoveParameter ()
 getRowTemplateName ()
 Get Row Template Name.
 getRowTemplateDir ()
 Get Row Template Directory.
 addBlockCommand ($a_href, $a_text, $a_target="", $a_img="", $a_right_aligned=false)
 Add Block Command.
 getBlockCommands ()
 Get Block commands.
 addHeaderCommand ($a_href, $a_text, $a_as_close=false)
 Add Header Block Command.
 getHeaderCommands ()
 Get Header Block commands.
 addFooterLink ($a_text, $a_href="", $a_onclick="", $a_block_id="", $a_top=false, $a_omit_separator=false)
 Add a footer text/link.
 getFooterLinks ()
 Get footer links.
 clearFooterLinks ()
 Clear footer links.
 handleDetailLevel ()
 Handle read/write current detail level.
 setConfigMode ($a_configmode)
 Handle config status.
 getConfigMode ()
 Get Config Mode (move blocks).
 fillHeaderCommands ()
 Fill header commands block.
 fillHeaderTitleBlock ()
 Fill header title block (title and.
 setDataSection ($a_content)
 Call this from overwritten fillDataSection(), if standard row based data is not used.
 fillPreviousNext ()
 Fill previous/next row.
 setPreviousNextLinks ()
 Get previous/next linkbar.
 fillFooterLinks ($a_top=false, $a_numinfo="")
 Fill footer links.
 fillDetailRow ()
 Fill Detail Setting Row.
 fillMoveRow ()
 Fill row for Moving.
 getAllowMove ($a_direction)
 setAllowMove ($a_direction, $a_allow=true)
 fillMoveLink ($a_value, $a_img, $a_txt)

Static Public Member Functions

static getBlockType ()
 Get block type.
static isRepositoryObject ()
 Is block used in repository object?
static getScreenMode ()
 Get Screen Mode for current command.

Static Public Attributes

static $block_type = "pdnews"
static $st_data
- Static Public Attributes inherited from ilNewsForContextBlockGUI
static $block_type = "news"
static $st_data

Additional Inherited Members

- Protected Member Functions inherited from ilBlockGUI
 fillRowColor ($a_placeholder="CSS_ROW")
- Protected Attributes inherited from ilBlockGUI
 $data = array()
 $colspan = 1
 $enablenuminfo = true
 $detail_min = 0
 $detail_max = 0
 $bigmode = false
 $footer_links = array()
 $block_id = 0
 $header_commands = array()
 $allow_moving = true
 $move = array("left" => false, "right" => false, "up" => false, "down" => false)
 $enabledetailrow = true
 $header_links = array()

Detailed Description

BlockGUI class for block NewsForContext.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
Id:
class.ilNewsForContextBlockGUI.php 12920 2007-01-03 19:13:46Z akill

ilPDNewsBlockGUI: ilColumnGUI

Definition at line 16 of file class.ilPDNewsBlockGUI.php.

Member Function Documentation

ilPDNewsBlockGUI::addCloseCommand (   $a_content_block)

Reimplemented from ilNewsForContextBlockGUI.

Definition at line 332 of file class.ilPDNewsBlockGUI.php.

References $ilCtrl, and $lng.

{
global $lng, $ilCtrl;
$a_content_block->addHeaderCommand($ilCtrl->getParentReturn($this),
$lng->txt("selected_items_back"));
}
ilPDNewsBlockGUI::cancelSettings ( )

Cancel settings.

Reimplemented from ilNewsForContextBlockGUI.

Definition at line 467 of file class.ilPDNewsBlockGUI.php.

References $ilCtrl.

{
global $ilCtrl;
$ilCtrl->returnToParent($this);
}
ilPDNewsBlockGUI::changeFeedSettings ( )

change user password

Definition at line 498 of file class.ilPDNewsBlockGUI.php.

References $_POST, $_SESSION, $ilCtrl, $lng, ilUtil\isPassword(), ilUtil\sendFailure(), and ilUtil\sendSuccess().

{
global $ilCtrl, $lng, $ilUser;
// Deactivate private Feed - just delete the password
if (empty($_POST["enable_private_feed"]))
{
ilUtil::sendSuccess($lng->txt("priv_feed_disabled"),true);
$ilUser->_setFeedPass($_SESSION["AccountId"],"");
$ilCtrl->returnToParent($this);
}
else
{
// check old password
if ($_POST["desired_password"] != $_POST["retype_password"])
{
ilUtil::sendFailure($lng->txt("passwd_not_match"),true);
$ilCtrl->redirectByClass("ilPDNewsBlockGUI", "editSettings");
}
// validate password
else if (!ilUtil::isPassword($_POST["desired_password"]))
{
ilUtil::sendFailure($lng->txt("passwd_invalid"),true);
$ilCtrl->redirectByClass("ilPDNewsBlockGUI", "editSettings");
}
// only works for ILIAS3 passwords
else if (md5($_POST["desired_password"]) == $ilUser->getPasswd())
{
ilUtil::sendFailure($lng->txt("passwd_equals_ilpasswd"),true);
$ilCtrl->redirectByClass("ilPDNewsBlockGUI", "editSettings");
}
else if ($_POST["desired_password"] != "")
{
ilUtil::sendSuccess($lng->txt("saved_successfully"),true);
$ilUser->_setFeedPass($_SESSION["AccountId"],$_POST["desired_password"]);
$ilCtrl->returnToParent($this);
}
}
}

+ Here is the call graph for this function:

ilPDNewsBlockGUI::editSettings ( )

Show settings screen.

Reimplemented from ilNewsForContextBlockGUI.

Definition at line 358 of file class.ilPDNewsBlockGUI.php.

References $_SESSION, $ilCtrl, $ilSetting, $lng, ilObjUser\_getFeedPass(), ilNewsItem\_lookupDefaultPDPeriod(), ilNewsItem\_lookupUserPDPeriod(), ilUtil\getImagePath(), ilTextInputGUI\setInputType(), ilSelectInputGUI\setOptions(), and ilTextInputGUI\setValue().

{
global $ilUser, $lng, $ilCtrl, $ilSetting;
$news_set = new ilSetting("news");
$enable_internal_rss = $news_set->get("enable_rss_for_internal");
$allow_shorter_periods = $news_set->get("allow_shorter_periods");
$allow_longer_periods = $news_set->get("allow_longer_periods");
$enable_private_feed = $news_set->get("enable_private_feed");
include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
if ($allow_shorter_periods || $allow_longer_periods )
{
$form = new ilPropertyFormGUI();
include_once("./Services/News/classes/class.ilNewsItem.php");
$per = ilNewsItem::_lookupUserPDPeriod($ilUser->getId());
$form->setTitle($lng->txt("news_settings"));
$form->setTitleIcon(ilUtil::getImagePath("icon_news.gif"));
$form->setTableWidth("100%");
$per_opts = array(
2 => "2 ".$lng->txt("days"),
3 => "3 ".$lng->txt("days"),
5 => "5 ".$lng->txt("days"),
7 => "1 ".$lng->txt("week"),
14 => "2 ".$lng->txt("weeks"),
30 => "1 ".$lng->txt("month"),
60 => "2 ".$lng->txt("months"),
120 => "4 ".$lng->txt("months"),
180 => "6 ".$lng->txt("months"),
366 => "1 ".$lng->txt("year"));
$unset = array();
foreach($per_opts as $k => $opt)
{
if (!$allow_shorter_periods && ($k < $default_per)) $unset[$k] = $k;
if (!$allow_longer_periods && ($k > $default_per)) $unset[$k] = $k;
}
foreach($unset as $k)
{
unset($per_opts[$k]);
}
$per_sel = new ilSelectInputGUI($lng->txt("news_pd_period"),
"news_pd_period");
//$per_sel->setInfo($lng->txt("news_pd_period_info"));
$per_sel->setOptions($per_opts);
$per_sel->setValue((int) $per);
$form->addItem($per_sel);
//$form->addCheckboxProperty($lng->txt("news_public_feed"), "notifications_public_feed",
// "1", $public_feed, $lng->txt("news_public_feed_info"));
//if ($this->getProperty("public_notifications_option"))
//{
// $form->addCheckboxProperty($lng->txt("news_notifications_public"), "notifications_public",
// "1", $public, $lng->txt("news_notifications_public_info"));
//}
$form->addCommandButton("saveSettings", $lng->txt("save"));
$form->addCommandButton("cancelSettings", $lng->txt("cancel"));
$form->setFormAction($ilCtrl->getFormaction($this));
$returnForm = $form->getHTML();
}
if ($enable_private_feed)
{
$feed_form = new ilPropertyFormGUI();
$feed_form->setTitle($lng->txt("priv_feed_settings"));
$feed_form->setTitleIcon(ilUtil::getImagePath("privrss.gif"));
$feed_form->setTableWidth("100%");
$enable_private_feed = new ilCheckboxInputGUI($lng->txt("news_enable_private_feed"), "enable_private_feed");
$retype_pass = new ilTextInputGUI($lng->txt("retype_password"), "retype_password");
$desired_pass = new ilTextInputGUI($lng->txt("desired_password"), "desired_password");
// user has already valid password
if (ilObjUser::_getFeedPass($_SESSION[AccountId]) != false)
{
$enable_private_feed->setChecked(true);
$desired_pass->setValue("******");
}
$desired_pass->setInputType("password");
$retype_pass->setInputType("password");
$feed_form->addItem($enable_private_feed);
$feed_form->addItem($desired_pass);
$feed_form->addItem($retype_pass);
$feed_form->addCommandButton("changeFeedSettings", $lng->txt("save"));
$feed_form->addCommandButton("cancelSettings", $lng->txt("cancel"));
$feed_form->setFormAction($ilCtrl->getFormaction($this));
$returnForm .= ($returnForm=="")?$feed_form->getHTML():"<br>".$feed_form->getHTML();
}
return $returnForm;
}

+ Here is the call graph for this function:

& ilPDNewsBlockGUI::executeCommand ( )

execute command

Reimplemented from ilNewsForContextBlockGUI.

Definition at line 166 of file class.ilPDNewsBlockGUI.php.

References $cmd, and $ilCtrl.

{
global $ilCtrl;
$next_class = $ilCtrl->getNextClass();
$cmd = $ilCtrl->getCmd("getHTML");
switch ($next_class)
{
default:
return $this->$cmd();
}
}
ilPDNewsBlockGUI::fillDataSection ( )

Fill data section.

Reimplemented from ilNewsForContextBlockGUI.

Definition at line 183 of file class.ilPDNewsBlockGUI.php.

References $ilBench, ilBlockGUI\getCurrentDetailLevel(), ilBlockGUI\getData(), ilNewsForContextBlockGUI\getDynamicReload(), ilNewsForContextBlockGUI\getOverview(), ilBlockGUI\setDataSection(), ilBlockGUI\setEnableDetailRow(), and ilBlockGUI\setEnableNumInfo().

{
global $ilBench;
if ($this->dynamic)
{
$this->setDataSection($this->getDynamicReload());
}
else if ($this->getCurrentDetailLevel() > 1 && count($this->getData()) > 0)
{
$ilBench->start("News", "ilPDNewsBlockGUI_fillDataSection");
$ilBench->stop("News", "ilPDNewsBlockGUI_fillDataSection");
}
else
{
$this->setEnableNumInfo(false);
if (count($this->getData()) == 0)
{
$this->setEnableDetailRow(false);
}
$this->setDataSection($this->getOverview());
}
}

+ Here is the call graph for this function:

static ilPDNewsBlockGUI::getBlockType ( )
static

Get block type.

Returns
string Block type.

Reimplemented from ilNewsForContextBlockGUI.

Definition at line 127 of file class.ilPDNewsBlockGUI.php.

References $block_type.

Referenced by saveSettings().

{
}

+ Here is the caller graph for this function:

ilPDNewsBlockGUI::getHTML ( )

Get bloch HTML code.

Reimplemented from ilNewsForContextBlockGUI.

Definition at line 211 of file class.ilPDNewsBlockGUI.php.

References $ilCtrl, $lng, ilNewsItem\_lookupUserPDPeriod(), ilBlockGUI\addBlockCommand(), ilBlockGUI\getCurrentDetailLevel(), ilUtil\getImagePath(), ilNewsForContextBlockGUI\getJSEnabler(), ilBlockGUI\getTitle(), ilBlockGUI\setFooterInfo(), and ilBlockGUI\setTitle().

{
global $ilCtrl, $lng, $ilUser;
// set footer info
$this->setFooterInfo($lng->txt("news_block_information"), true);
$news_set = new ilSetting("news");
$enable_internal_rss = $news_set->get("enable_rss_for_internal");
$allow_shorter_periods = $news_set->get("allow_shorter_periods");
$allow_longer_periods = $news_set->get("allow_longer_periods");
$enable_private_feed = $news_set->get("enable_private_feed");
// subscribe/unsibscribe link
include_once("./Services/News/classes/class.ilNewsSubscription.php");
// show feed url
if ($enable_internal_rss)
{
$ilCtrl->getLinkTarget($this, "showFeedUrl"),
$lng->txt("news_get_feed_url"), "", ilUtil::getImagePath("rss.gif"), true);
}
if ($allow_shorter_periods || $allow_longer_periods || $enable_private_feed)
{
$ilCtrl->getLinkTarget($this, "editSettings"),
$lng->txt("settings"));
}
$per = ilNewsItem::_lookupUserPDPeriod($ilUser->getId());
if ($per > 0)
{
switch ($per)
{
case 2:
case 3:
case 5: $per_str = sprintf($lng->txt("news_period_x_days"), $per); break;
case 7: $per_str = $lng->txt("news_period_1_week"); break;
case 14: $per_str = sprintf($lng->txt("news_period_x_weeks"), 2); break;
case 30: $per_str = $lng->txt("news_period_1_month"); break;
case 60: $per_str = sprintf($lng->txt("news_period_x_months"), 2); break;
case 120: $per_str = sprintf($lng->txt("news_period_x_months"), 4); break;
case 180: $per_str = sprintf($lng->txt("news_period_x_months"), 6); break;
case 366: $per_str = $lng->txt("news_period_1_year"); break;
}
if ($per_str != "")
{
$this->setTitle($this->getTitle().' <span style="font-weight:normal;">- '.$per_str."</span>");
}
}
if ($this->getCurrentDetailLevel() == 0)
{
return "";
}
$en = "";
if ($ilUser->getPref("il_feed_js") == "n")
{
$en = $this->getJSEnabler();
}
return ilBlockGUI::getHTML().$en;
}

+ Here is the call graph for this function:

ilPDNewsBlockGUI::getNewsData ( )

Get news for context.

Reimplemented from ilNewsForContextBlockGUI.

Definition at line 101 of file class.ilPDNewsBlockGUI.php.

References ilBlockGUI\$data, ilNewsItem\_getNewsItemsOfUser(), and ilNewsItem\_lookupUserPDPeriod().

Referenced by ilPDNewsBlockGUI().

{
global $ilUser, $ilAccess;
include_once("./Services/News/classes/class.ilNewsCache.php");
$this->acache = new ilNewsCache();
$per = ilNewsItem::_lookupUserPDPeriod($ilUser->getId());
$data = ilNewsItem::_getNewsItemsOfUser($ilUser->getId(), false,
false, $per);
// if (!$this->acc_cache_hit)
// {
// $ilAccess->storeCache();
// }
$this->acache->storeEntry($ilUser->getId().":0",
serialize($data));
return $data;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ilPDNewsBlockGUI::getScreenMode ( )
static

Get Screen Mode for current command.

Reimplemented from ilNewsForContextBlockGUI.

Definition at line 145 of file class.ilPDNewsBlockGUI.php.

References $_GET, $ilCtrl, IL_SCREEN_CENTER, and IL_SCREEN_SIDE.

{
global $ilCtrl;
switch($_GET["cmd"])
{
case "showNews":
case "showFeedUrl":
case "editSettings":
break;
default:
break;
}
}
ilPDNewsBlockGUI::ilPDNewsBlockGUI ( )

Constructor.

Definition at line 24 of file class.ilPDNewsBlockGUI.php.

References ilBlockGUI\$data, $ilBench, $ilCtrl, $lng, $st_data, ilBlockGUI\getCurrentDetailLevel(), ilNewsForContextBlockGUI\getDynamic(), ilUtil\getImagePath(), getNewsData(), ilNewsForContextBlockGUI\handleView(), ilBlockGUI\ilBlockGUI(), ilBlockGUI\setAvailableDetailLevels(), ilBlockGUI\setData(), ilBlockGUI\setImage(), ilBlockGUI\setLimit(), ilBlockGUI\setRowTemplate(), and ilBlockGUI\setTitle().

{
global $ilCtrl, $lng, $ilUser, $ilBench, $ilAccess, $ilCtrl;
$ilBench->start("News", "ilPDNewsBlockGUI_Constructor");
$news_set = new ilSetting("news");
$this->setImage(ilUtil::getImagePath("icon_news_s.gif"));
$lng->loadLanguageModule("news");
include_once("./Services/News/classes/class.ilNewsItem.php");
$this->setLimit(5);
$this->dynamic = false;
// store current access check results
// $this->acc_results = $ilAccess->getResults();
// read access cache
// $this->acc_cache_hit = $ilAccess->readCache(
// ((int) $news_set->get("acc_cache_mins")) * 60);
include_once("./Services/News/classes/class.ilNewsCache.php");
$this->acache = new ilNewsCache();
$cres = $this->acache->getEntry($ilUser->getId().":0");
$this->cache_hit = false;
if ($this->acache->getLastAccessStatus() == "hit")
{
self::$st_data = unserialize($cres);
$this->cache_hit = true;
}
if ($this->getDynamic() && !$this->cache_hit)
{
$this->dynamic = true;
$data = array();
}
else if ($this->getCurrentDetailLevel() > 0)
{
// do not ask two times for the data (e.g. if user displays a
// single item on the personal desktop and the news block is
// displayed at the same time)
if (empty(self::$st_data))
{
self::$st_data = $this->getNewsData();
}
else
{
}
}
else
{
$data = array();
}
$this->setTitle($lng->txt("news_internal_news"));
$this->setRowTemplate("tpl.block_row_news_for_context.html", "Services/News");
$this->setData($data);
$this->handleView();
// reset access check results
$ilAccess->setResults($this->acc_results);
$ilBench->stop("News", "ilPDNewsBlockGUI_Constructor");
}

+ Here is the call graph for this function:

static ilPDNewsBlockGUI::isRepositoryObject ( )
static

Is block used in repository object?

Returns
string Block type.

Reimplemented from ilNewsForContextBlockGUI.

Definition at line 137 of file class.ilPDNewsBlockGUI.php.

{
return false;
}
ilPDNewsBlockGUI::saveSettings ( )

Save settings.

Reimplemented from ilNewsForContextBlockGUI.

Definition at line 477 of file class.ilPDNewsBlockGUI.php.

References $_POST, ilBlockGUI\$block_id, $cache, $ilCtrl, ilBlockSetting\_write(), and getBlockType().

{
global $ilCtrl, $ilUser;
$news_set = new ilSetting("news");
$enable_internal_rss = $news_set->get("enable_rss_for_internal");
ilBlockSetting::_write($this->getBlockType(), "news_pd_period",
$_POST["news_pd_period"],
$ilUser->getId(), $this->block_id);
include_once("./Services/News/classes/class.ilNewsCache.php");
$cache->deleteEntry($ilUser->getId().":0");
$ilCtrl->returnToParent($this);
}

+ Here is the call graph for this function:

ilPDNewsBlockGUI::showFeedUrl ( )

Show feed URL.

Reimplemented from ilNewsForContextBlockGUI.

Definition at line 283 of file class.ilPDNewsBlockGUI.php.

References $_SESSION, $ilCtrl, $ilSetting, $lng, $tpl, and ilUtil\getImagePath().

{
global $lng, $ilCtrl, $ilUser, $ilSetting;
$news_set = new ilSetting("news");
include_once("./Services/News/classes/class.ilNewsItem.php");
if ($news_set->get("enable_private_feed") && $ilUser->_getFeedPass($_SESSION["AccountId"]))
{
$tpl = new ilTemplate("tpl.show_priv_feed_url.html", true, true, "Services/News");
$tpl->setVariable("IMG_PRIV_RSS", ilUtil::getImagePath("privrss.gif"));
$tpl->setVariable("TXT_PRIV_TITLE", $lng->txt("news_get_priv_feed_title"));
$tpl->setVariable("TXT_PRIV_INFO", $lng->txt("news_get_priv_feed_info"));
$tpl->setVariable("TXT_PRIV_FEED_URL", $lng->txt("news_feed_url"));
$tpl->setVariable("VAL_PRIV_FEED_URL",
str_replace("://", "://" . $ilUser->getLogin() . ":-password-@", ILIAS_HTTP_PATH)."/privfeed.php?client_id=".rawurlencode(CLIENT_ID)."&user_id=".$ilUser->getId().
"&hash=".ilObjUser::_lookupFeedHash($ilUser->getId(), true));
$tpl->setVariable("VAL_PRIV_FEED_URL_TXT",
str_replace("://", "://" . $ilUser->getLogin() . ":-password-@", ILIAS_HTTP_PATH)."/privfeed.php?client_id=".rawurlencode(CLIENT_ID)."&<br />user_id=".$ilUser->getId().
"&hash=".ilObjUser::_lookupFeedHash($ilUser->getId(), true));
}
else
{
$tpl = new ilTemplate("tpl.show_feed_url.html", true, true, "Services/News");
}
$tpl->setVariable("TXT_TITLE", $lng->txt("news_get_feed_title"));
$tpl->setVariable("TXT_INFO", $lng->txt("news_get_feed_info"));
$tpl->setVariable("TXT_FEED_URL", $lng->txt("news_feed_url"));
$tpl->setVariable("VAL_FEED_URL",
ILIAS_HTTP_PATH."/feed.php?client_id=".rawurlencode(CLIENT_ID)."&user_id=".$ilUser->getId().
"&hash=".ilObjUser::_lookupFeedHash($ilUser->getId(), true));
$tpl->setVariable("VAL_FEED_URL_TXT",
ILIAS_HTTP_PATH."/feed.php?client_id=".rawurlencode(CLIENT_ID)."&<br />user_id=".$ilUser->getId().
"&hash=".ilObjUser::_lookupFeedHash($ilUser->getId(), true));
include_once("./Services/PersonalDesktop/classes/class.ilPDContentBlockGUI.php");
$content_block = new ilPDContentBlockGUI();
$content_block->setContent($tpl->get());
$content_block->setTitle($lng->txt("news_internal_news"));
$content_block->setImage(ilUtil::getImagePath("icon_news.gif"));
$content_block->addHeaderCommand($ilCtrl->getParentReturn($this),
$lng->txt("selected_items_back"));
return $content_block->getHTML();
}

+ Here is the call graph for this function:

ilPDNewsBlockGUI::showNews ( )

show news

Reimplemented from ilNewsForContextBlockGUI.

Definition at line 344 of file class.ilPDNewsBlockGUI.php.

{
// workaround for dynamic mode (if cache is disabled, showNews has no data)
// if (empty(self::$st_data))
// {
// $this->setData($this->getNewsData());
// }
return parent::showNews();
}

Field Documentation

ilPDNewsBlockGUI::$block_type = "pdnews"
static

Definition at line 18 of file class.ilPDNewsBlockGUI.php.

Referenced by getBlockType().

ilPDNewsBlockGUI::$st_data
static

Definition at line 19 of file class.ilPDNewsBlockGUI.php.

Referenced by ilPDNewsBlockGUI().


The documentation for this class was generated from the following file: