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().
'"');
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");
255 $current_selection_list->setListTitle($lng->txt(
"bm_add_to_social_bookmarks"));
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();