ILIAS  Release_5_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 (ilPropertyFormGUI $a_private_form=null)
 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.
 makeClickable ($a_str)
 Make clickable.
 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 ()
 editSettings ()
 Show settings screen.
 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, $a_checked=false, $a_html="")
 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, $a_checked=false)
 Add a footer text/link.
 getFooterLinks ()
 Get footer links.
 clearFooterLinks ()
 Clear footer links.
 handleDetailLevel ()
 Handle read/write current detail level.
 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.

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

Protected Member Functions

 initPrivateSettingsForm ()

Protected Attributes

 $acc_results = false

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 346 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 481 of file class.ilPDNewsBlockGUI.php.

References $ilCtrl.

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

change user password

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

References $ilCtrl, $ilUser, $lng, ilNewsForContextBlockGUI\editSettings(), initPrivateSettingsForm(), ilUtil\sendFailure(), and ilUtil\sendSuccess().

{
global $ilCtrl, $lng, $ilUser;
$form = $this->initPrivateSettingsForm();
if($form->checkInput())
{
// Deactivate private Feed - just delete the password
if (!$form->getInput("enable_private_feed"))
{
$ilUser->_setFeedPass($ilUser->getId(), "");
ilUtil::sendSuccess($lng->txt("priv_feed_disabled"),true);
// $ilCtrl->returnToParent($this);
$ilCtrl->redirect($this, "showFeedUrl");
}
else
{
$passwd = $form->getInput("desired_password");
require_once 'Services/User/classes/class.ilUserPasswordManager.php';
if(ilUserPasswordManager::getInstance()->verifyPassword($ilUser, $passwd))
{
$form->getItemByPostVar("desired_password")->setAlert($lng->txt("passwd_equals_ilpasswd"));
ilUtil::sendFailure($lng->txt("form_input_not_valid"));
}
else
{
$ilUser->_setFeedPass($ilUser->getId(), $passwd);
ilUtil::sendSuccess($lng->txt("saved_successfully"),true);
// $ilCtrl->returnToParent($this);
$ilCtrl->redirect($this, "showFeedUrl");
}
}
}
$form->setValuesByPost();
return $this->editSettings($form);
}

+ Here is the call graph for this function:

ilPDNewsBlockGUI::editSettings ( ilPropertyFormGUI  $a_private_form = null)

Show settings screen.

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

References $ilCtrl, $ilSetting, $ilUser, $lng, ilNewsItem\_lookupDefaultPDPeriod(), ilNewsItem\_lookupUserPDPeriod(), initPrivateSettingsForm(), and ilSelectInputGUI\setOptions().

{
$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");
if (!$a_private_form && ($allow_shorter_periods || $allow_longer_periods))
{
include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
$form = new ilPropertyFormGUI();
$form->setFormAction($ilCtrl->getFormaction($this));
$form->setTitle($lng->txt("news_settings"));
include_once("./Services/News/classes/class.ilNewsItem.php");
$per = ilNewsItem::_lookupUserPDPeriod($ilUser->getId());
$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"));
$returnForm = $form->getHTML();
}
if ($enable_private_feed)
{
if(!$a_private_form)
{
$a_private_form = $this->initPrivateSettingsForm();
}
$returnForm .= ($returnForm=="")
? $a_private_form->getHTML()
: "<br>".$a_private_form->getHTML();
}
return $returnForm;
}

+ Here is the call graph for this function:

& ilPDNewsBlockGUI::executeCommand ( )

execute command

Reimplemented from ilNewsForContextBlockGUI.

Definition at line 170 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 187 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 126 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 215 of file class.ilPDNewsBlockGUI.php.

References $ilCtrl, $ilUser, $lng, ilNewsItem\_lookupUserPDPeriod(), ilBlockGUI\addBlockCommand(), ilRSSButtonGUI\get(), ilBlockGUI\getCurrentDetailLevel(), ilNewsForContextBlockGUI\getJSEnabler(), ilBlockGUI\getTitle(), ilRSSButtonGUI\ICON_RSS, 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)
{
include_once("./Services/News/classes/class.ilRSSButtonGUI.php");
$ilCtrl->getLinkTarget($this, "showFeedUrl"),
$lng->txt("news_get_feed_url"), "", "", true, false, ilRSSButtonGUI::get(ilRSSButtonGUI::ICON_RSS));
}
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 100 of file class.ilPDNewsBlockGUI.php.

References ilBlockGUI\$data, $ilUser, 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 144 of file class.ilPDNewsBlockGUI.php.

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

{
global $ilCtrl;
$cmd = $_GET["cmd"];
if($cmd == "post" && is_array($_POST["cmd"]))
{
$cmd = array_pop(array_keys($_POST["cmd"]));
}
switch($cmd)
{
case "showNews":
case "showFeedUrl":
case "editSettings":
case "changeFeedSettings":
default:
}
}
ilPDNewsBlockGUI::ilPDNewsBlockGUI ( )

Constructor.

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

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

{
global $ilCtrl, $lng, $ilUser, $ilBench, $ilAccess, $ilCtrl;
$ilBench->start("News", "ilPDNewsBlockGUI_Constructor");
$news_set = new ilSetting("news");
$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:

ilPDNewsBlockGUI::initPrivateSettingsForm ( )
protected

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

References $ilCtrl, $ilUser, $lng, ilUtil\getPasswordRequirementsInfo(), ilCheckboxInputGUI\setChecked(), and ilFormPropertyGUI\setRequired().

Referenced by changeFeedSettings(), and editSettings().

{
global $ilCtrl, $lng, $ilUser;
include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
$feed_form = new ilPropertyFormGUI();
$feed_form->setFormAction($ilCtrl->getFormaction($this));
$feed_form->setTitle($lng->txt("priv_feed_settings"));
$feed_form->setTableWidth("100%");
$enable_private_feed = new ilCheckboxInputGUI($lng->txt("news_enable_private_feed"), "enable_private_feed");
$enable_private_feed->setChecked($ilUser->_getFeedPass($ilUser->getId()));
$feed_form->addItem($enable_private_feed);
$passwd = new ilPasswordInputGUI($lng->txt("password"), "desired_password");
$passwd->setRequired(true);
$enable_private_feed->addSubItem($passwd);
$feed_form->addCommandButton("changeFeedSettings", $lng->txt("save"));
$feed_form->addCommandButton("cancelSettings", $lng->txt("cancel"));
return $feed_form;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ilPDNewsBlockGUI::isRepositoryObject ( )
static

Is block used in repository object?

Returns
string Block type.

Reimplemented from ilNewsForContextBlockGUI.

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

{
return false;
}
ilPDNewsBlockGUI::saveSettings ( )

Save settings.

Reimplemented from ilNewsForContextBlockGUI.

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

References $_POST, ilBlockGUI\$block_id, $ilCtrl, $ilUser, 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 = new ilNewsCache();
$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 288 of file class.ilPDNewsBlockGUI.php.

References $_SESSION, $ilCtrl, $ilSetting, $ilUser, $lng, and $tpl.

{
$news_set = new ilSetting("news");
include_once("./Services/News/classes/class.ilNewsItem.php");
if ($news_set->get("enable_private_feed"))
{
$tpl = new ilTemplate("tpl.show_priv_feed_url.html", true, true, "Services/News");
$tpl->setVariable("TXT_PRIV_TITLE", $lng->txt("news_get_priv_feed_title"));
// #14365
if($ilUser->_getFeedPass($_SESSION["AccountId"]))
{
$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->setVariable("TXT_PRIV_INFO", $lng->txt("news_inactive_private_feed_info"));
$tpl->setVariable("EDIT_SETTINGS_URL", $ilCtrl->getLinkTarget($this, "editSettings"));
$tpl->setVariable("EDIT_SETTINGS_TXT", $lng->txt("news_edit_news_settings"));
}
}
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->addHeaderCommand($ilCtrl->getParentReturn($this),
$lng->txt("selected_items_back"));
return $content_block->getHTML();
}
ilPDNewsBlockGUI::showNews ( )

show news

Reimplemented from ilNewsForContextBlockGUI.

Definition at line 358 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::$acc_results = false
protected

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

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: