24 function __construct($a_type, $a_id, $a_append =
"", $a_target =
"")
40 $this->includepermanentlinktext = $a_includepermanentlinktext;
50 return $this->includepermanentlinktext;
60 $this->type = $a_type;
100 $this->append = $a_append;
110 return $this->append;
120 $this->target = $a_target;
130 return $this->target;
140 $this->title = $a_val;
160 $this->align_center = $a_val;
181 "Services/PermanentLink");
183 include_once(
'./Services/Link/classes/class.ilLink.php');
188 $tpl->setVariable(
"TXT_PERMA", $lng->txt(
"perma_link").
":");
201 $obj_id = $ilObjDataCache->lookupObjId($this->
getId());
202 $title = $ilObjDataCache->lookupTitle($obj_id);
205 # $bookmark->setTitle("untitled"); 207 $tpl->setVariable(
"TXT_BOOKMARK_DEFAULT", $title);
209 $tpl->setVariable(
"LINK", $href);
213 $tpl->setVariable(
"ALIGN",
"center");
217 $tpl->setVariable(
"ALIGN",
"left");
222 $tpl->setVariable(
"TARGET",
'target="'.$this->
getTarget().
'"');
227 $bm_html = self::_getBookmarksSelectionList($title, $href);
231 $tpl->setVariable(
'SELECTION_LIST', $bm_html);
246 require_once
'Services/PermanentLink/classes/class.ilPermanentLink.php';
252 include_once(
"./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php");
256 $current_selection_list->setId(
"socialbm_actions");
257 $current_selection_list->setUseImages(
true);
261 if (
$_SESSION[
"AccountId"] != ANONYMOUS_USER_ID && !$ilSetting->get(
'disable_bookmarks'))
263 $linktpl =
'ilias.php?cmd=redirect&baseClass=ilPersonalDesktopGUI&redirectClass=ilbookmarkadministrationgui&redirectCmd=newFormBookmark¶m_bmf_id=1¶m_return_to=true¶m_bm_title='. urlencode(urlencode($title)) .
'¶m_bm_link=' . urlencode(urlencode($href)).
"¶m_return_to_url=".urlencode(urlencode($_SERVER[
'REQUEST_URI']));
264 $current_selection_list->addItem($lng->txt(
"bm_add_to_ilias"),
'', $linktpl,
ilUtil::getImagePath(
'socialbookmarks/icon_bm_15x15.gif') , $lng->txt(
"bm_add_to_ilias"),
'_top');
268 foreach ($rset as
$row)
270 $linktpl = $row->sbm_link;
271 $linktpl = str_replace(
'{LINK}', urlencode($href), $linktpl);
272 $linktpl = str_replace(
'{TITLE}', urlencode($title), $linktpl);
273 $current_selection_list->addItem($row->sbm_title,
'', $linktpl, $row->sbm_icon, $row->title,
'_blank');
277 if ($cnt == 1 &&
$_SESSION[
"AccountId"] != ANONYMOUS_USER_ID && !$ilSetting->get(
'disable_bookmarks'))
279 $loc_tpl =
new ilTemplate(
'tpl.single_link.html',
true,
true,
'Services/PermanentLink');
280 $loc_tpl->setVariable(
"TXT_ADD_TO_ILIAS_BM", $lng->txt(
"bm_add_to_ilias"));
281 $loc_tpl->setVariable(
"URL_ADD_TO_BM",
'ilias.php?cmd=redirect&baseClass=ilPersonalDesktopGUI&redirectClass=ilbookmarkadministrationgui&redirectCmd=newFormBookmark¶m_bmf_id=1¶m_return_to=true¶m_bm_title='. urlencode(urlencode($title)) .
'¶m_bm_link=' . urlencode(urlencode($href)).
"¶m_return_to_url=".urlencode(urlencode($_SERVER[
'REQUEST_URI'])));
283 return $loc_tpl->get();
287 return $current_selection_list->getHTML();
getIncludePermanentLinkText()
Get Include permanent link text.
Class for permanent links.
setAppend($a_append)
Set Append.
static _getStaticLink($a_ref_id, $a_type='', $a_fallback_goto=true, $append="")
Get static link.
setTarget($a_target)
Set Target.
setIncludePermanentLinkText($a_includepermanentlinktext)
Set Include permanent link text.
__construct($a_type, $a_id, $a_append="", $a_target="")
Example: type = "wiki", id (ref_id) = "234", append = "_Start_Page".
setAlignCenter($a_val)
Set center alignment.
static getActiveBookmarks()
getHTML()
Get HTML for link.
getAlignCenter()
Get center alignment.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
setTitle($a_val)
Set title.
special template class to simplify handling of ITX/PEAR
setType($a_type)
Set Type.
User interface class for advanced drop-down selection lists.
static _getBookmarksSelectionList($title, $href)
returns the active bookmark links.