ILIAS  release_4-4 Revision
ilTemplate Class Reference

special template class to simplify handling of ITX/PEAR More...

+ Inheritance diagram for ilTemplate:
+ Collaboration diagram for ilTemplate:

Public Member Functions

 ilTemplate ($file, $flag1, $flag2, $in_module=false, $vars="DEFAULT", $plugin=false, $a_use_cache=false)
 constructor More...
 
 init ()
 
 setAddFooter ($value)
 
 getAddFooter ()
 
 getAsynch ()
 Use this for final get before sending asynchronous output (ajax) per echo to output. More...
 
 get ($part="DEFAULT", $add_error_mess=false, $handle_referer=false, $add_ilias_footer=false, $add_standard_elements=false, $a_main_menu=true, $a_tabs=true)
 ??? public More...
 
 setMessage ($a_type, $a_txt, $a_keep=false)
 Set message. More...
 
 fillMessage ()
 
 getMessageHTML ($a_txt, $a_type="info")
 Get HTML for a system message. More...
 
 getContentType ()
 Get the content type for the template output. More...
 
 setContentType ($a_content_type="text/html")
 Set the content type for the template output. More...
 
 setFrameFixedWidth ($a_value)
 Restrict content frame to fixed width (will be centered on screen) More...
 
 show ($part="DEFAULT", $a_fill_tabs=true, $a_skip_main_menu=false)
 public More...
 
 fillContentLanguage ()
 Add current user language to meta tags. More...
 
 fillWindowTitle ()
 
 getTabsHTML ()
 Get tabs HTML. More...
 
 fillTabs ()
 
 fillToolbar ()
 
 fillPageFormAction ()
 
 fillJavaScriptFiles ($a_force=false)
 
 fillCssFiles ($a_force=false)
 Fill in the css file tags. More...
 
 fillInlineCss ()
 Fill in the inline css. More...
 
 setContentStyleSheet ($a_style)
 Set content style (used for page content editor) More...
 
 fillContentStyle ()
 Fill Content Style. More...
 
 getMainMenu ()
 
 fillMainMenu ()
 
 initHelp ()
 Init help. More...
 
 addILIASFooter ()
 add ILIAS footer More...
 
 handleReferer ()
 TODO: this is nice, but shouldn't be done here (-> maybe at the end of ilias.php!?, alex) More...
 
 blockExists ($a_blockname)
 check if block exists in actual template private More...
 
 fillVars ()
 all template vars defined in $vars will be replaced automatically without setting and parsing them with setVariable & parseCurrentBlock private More...
 
 setCurrentBlock ($part="DEFAULT")
 Überladene Funktion, die sich hier lokal noch den aktuellen Block merkt. More...
 
 touchBlock ($block)
 overwrites ITX::touchBlock. More...
 
 parseCurrentBlock ($part="DEFAULT")
 Überladene Funktion, die auf den aktuelle Block vorher noch ein replace ausführt public. More...
 
 replaceFromDatabase (&$DB, $block, $conv, $select="default")
 ??? TODO: Adjust var names to ilias. More...
 
 prepareForFormular ($vars)
 Wird angewendet, wenn die Daten in ein Formular replaced werden sollen, Dann wird erst noch ein htmlspecialchars drumherum gemacht. More...
 
 replace ()
 ??? public More...
 
 replaceDefault ()
 ??? public More...
 
 checkTopic ($a_block, $a_topic)
 checks for a topic in the template private More...
 
 includeNavigation ()
 check if there is a NAVIGATION-topic public More...
 
 includeTree ()
 check if there is a TREE-topic public More...
 
 fileExists ($filename)
 check if a file exists public More...
 
 addBlockFile ($var, $block, $tplname, $in_module=false)
 overwrites ITX::addBlockFile public More...
 
 loadTemplatefile ( $filename, $removeUnknownVariables=true, $removeEmptyBlocks=true)
 Reads a template file from the disk. More...
 
 getTemplatePath ($a_tplname, $a_in_module=false, $a_plugin=false)
 builds a full template path with template and module name More...
 
 getTemplateIdentifier ($a_tplname, $a_in_module=false)
 get a unique template identifier More...
 
 setHeaderPageTitle ($a_title)
 
 setStyleSheetLocation ($a_stylesheet)
 
 setNewContentStyleSheetLocation ($a_stylesheet)
 
 getStandardTemplate ()
 
 setTitle ($a_title)
 sets title in standard template More...
 
 setTitleColor ($a_val)
 Set title color. More...
 
 getTitleColor ()
 Get title color. More...
 
 setAlertProperties (array $a_props)
 Set alert properties. More...
 
 setTitleIcon ($a_icon_path, $a_icon_desc="")
 set title icon More...
 
 setBodyClass ($a_class="")
 
 fillBodyClass ()
 
 setPageFormAction ($a_action)
 
 setDescription ($a_descr)
 sets title in standard template More...
 
 stopTitleFloating ()
 set stop floating (if no tabs are used) More...
 
 setHeaderActionMenu ($a_header)
 Set header action menu. More...
 
 getHeaderActionMenu ()
 Get header action menu. More...
 
 setContent ($a_html)
 sets content for standard template More...
 
 fillMainContent ()
 Fill main content. More...
 
 setRightContent ($a_html)
 sets content of right column More...
 
 setLeftContent ($a_html)
 sets content of left column More...
 
 setLeftNavContent ($a_content)
 Sets content of left navigation column. More...
 
 fillLeftNav ()
 Fill left navigation frame. More...
 
 setLocator ()
 Insert locator. More...
 
 setTabs ($a_tabs_html)
 sets tabs in standard template More...
 
 setSubTabs ($a_tabs_html)
 sets subtabs in standard template More...
 
 setUpperIcon ($a_link, $a_frame="")
 sets icon to upper level More...
 
 setLoginTargetPar ($a_val)
 Set target parameter for login (public sector). More...
 
 getLoginTargetPar ()
 Get target parameter for login. More...
 
 fillScreenReaderFocus ()
 Accessibility focus for screen readers. More...
 
 fillSideIcons ()
 Fill side icons (upper icon, tree icon, webfolder icon) More...
 
 setMountWebfolderIcon ($a_ref_id)
 shows icon for mounting a webfolder More...
 
 setTreeFlatIcon ($a_link, $a_mode)
 set tree/flat icon More...
 
 addJavaScript ($a_js_file, $a_add_version_parameter=true, $a_batch=2)
 Add a javascript file that should be included in the header. More...
 
 resetJavascript ()
 Reset javascript files. More...
 
 resetCss ()
 Reset css files. More...
 
 addOnLoadCode ($a_code, $a_batch=2)
 Add on load code. More...
 
 addCss ($a_css_file, $media="screen")
 Add a css file that should be included in the header. More...
 
 addInlineCss ($a_css, $media="screen")
 Add a css file that should be included in the header. More...
 
 addLightbox ($a_html, $a_id)
 Add lightbox html. More...
 
 fillLightbox ()
 Fill lightbox content. More...
 
 setPageActions ($a_page_actions_html)
 Show admin view button. More...
 
 setEditPageButton ($a_link, $a_txt, $a_frame)
 Show admin view button. More...
 
 addAdminPanelCommand ($a_cmd, $a_txt, $a_arrow=false)
 Add a command to the admin panel. More...
 
 addAdminPanelToolbar (ilToolbarGUI $toolb, $a_bottom_panel=true, $a_arrow=false)
 Add admin panel commands as toolbar. More...
 
 fillAdminPanel ()
 Put admin panel into template: More...
 
 setPermanentLink ($a_type, $a_id, $a_append="", $a_target="")
 
 fillPermanentLink ()
 Fill in permanent link. More...
 
 fillOnLoadCode ()
 Fill add on load code. More...
 
 getOnLoadCodeForAsynch ()
 Get js onload code for ajax calls. More...
 
 setFullscreenHeader ($a_title, $a_description=null, $a_icon=null, $a_img=null, $a_bg_color=null, $a_font_color=null, $a_width=880, $a_height=100, $a_export=false)
 Set fullscreen header data. More...
 
 setTopBar ($a_back_url=null)
 Add top toolbar. More...
 
 resetHeaderBlock ($a_reset_header_action=true)
 Set variable. More...
 
 enableDragDropFileUpload ($a_ref_id)
 Enables the file upload into this object by dropping a file. More...
 
 ilTemplate ($file, $flag1, $flag2, $in_module=false, $vars="DEFAULT")
 constructor More...
 
 getTemplatePath ($a_tplname, $a_in_module=false, $a_plugin=false)
 builds a full template path with template and module name More...
 
 addBlockFile ($var, $block, $tplname, $in_module=false)
 
 show ($part="DEFAULT")
 public More...
 
 getMessageHTML ($a_txt, $a_type="info")
 Get HTML for a system message. More...
 
 setCurrentBlock ($part="DEFAULT")
 Überladene Funktion, die sich hier lokal noch den aktuellen Block merkt. More...
 
 touchBlock ($block)
 overwrites ITX::touchBlock. More...
 
 parseCurrentBlock ($part="DEFAULT")
 Überladene Funktion, die auf den aktuelle Block vorher noch ein replace ausführt public. More...
 
 setMessage ($a_type, $a_txt, $a_keep=false)
 Set message. More...
 
 fillMessage ()
 
 blockExists ($a_blockname)
 check if block exists in actual template private More...
 
 addJavaScript ($a_js_file)
 Add a javascript file that should be included in the header. More...
 
 fillJavaScriptFiles ()
 
 get ($part="DEFAULT")
 
- Public Member Functions inherited from ilTemplateX
 callConstructor ()
 
 callConstructor ()
 
- Public Member Functions inherited from HTML_Template_ITX
 HTML_Template_ITX ($root='')
 Builds some complex regexps and calls the constructor of the parent class. More...
 
 init ()
 
 replaceBlock ($block, $template, $keep_content=false)
 Replaces an existing block with new content. More...
 
 replaceBlockfile ($block, $filename, $keep_content=false)
 Replaces an existing block with new content from a file. More...
 
 addBlock ($placeholder, $blockname, $template)
 Adds a block to the template changing a variable placeholder to a block placeholder. More...
 
 addBlockfile ($placeholder, $blockname, $filename)
 Adds a block taken from a file to the template changing a variable placeholder to a block placeholder. More...
 
 placeholderExists ($placeholder, $block='')
 Returns the name of the (first) block that contains the specified placeholder. More...
 
 performCallback ()
 Checks the list of function calls in the template and calls their callback function. More...
 
 getFunctioncalls ()
 Returns a list of all function calls in the current template. More...
 
 setFunctioncontent ($functionID, $replacement)
 Replaces a function call with the given replacement. More...
 
 setCallbackFunction ($tplfunction, $callbackfunction, $callbackobject='', $expandCallbackParameters=false)
 Sets a callback function. More...
 
 setCallbackFuntiontable ($functions)
 Sets the Callback function lookup table. More...
 
 removeBlockData ($block)
 Recursively removes all data assiciated with a block, including all inner blocks. More...
 
 getBlocklist ()
 Returns a list of blocknames in the template. More...
 
 blockExists ($blockname)
 Checks wheter a block exists. More...
 
 getBlockvariables ($block)
 Returns a list of variables of a block. More...
 
 BlockvariableExists ($block, $variable)
 Checks wheter a block variable exists. More...
 
 buildFunctionlist ()
 Builds a functionlist from the template. More...
 
 getValue ($code, $delimiter)
 Truncates the given code from the first occurence of $delimiter but ignores $delimiter enclosed by " or '. More...
 
 deleteFromBlockvariablelist ($block, $variables)
 Deletes one or many variables from the block variable list. More...
 
 updateBlockvariablelist ($block)
 Updates the variable list of a block. More...
 
 findPlaceholderBlocks ($variable)
 Returns an array of blocknames where the given variable placeholder is used. More...
 
 warning ($message, $file='', $line=0)
 Handles warnings, saves them to $warn and prints them or calls die() depending on the flags. More...
 
- Public Member Functions inherited from HTML_Template_IT
 HTML_Template_IT ($root='', $options=null)
 Builds some complex regular expressions and optinally sets the file root directory. More...
 
 setOption ($option, $value)
 Sets the option for the template class. More...
 
 setOptions ($options)
 Sets the options for the template class. More...
 
 show ($block='__global__')
 Print a certain block with all replacements done. More...
 
 get ($block='__global__')
 Returns a block with all replacements done. More...
 
 parse ($block='__global__', $flag_recursion=false)
 Parses the given block. More...
 
 parseCurrentBlock ()
 Parses the current block. More...
 
 setVariable ($variable, $value='')
 Sets a variable value. More...
 
 setCurrentBlock ($block='__global__')
 Sets the name of the current block that is the block where variables are added. More...
 
 touchBlock ($block)
 Preserves an empty block even if removeEmptyBlocks is true. More...
 
 init ()
 Clears all datafields of the object and rebuild the internal blocklist. More...
 
 free ()
 Clears all datafields of the object. More...
 
 setTemplate ( $template, $removeUnknownVariables=true, $removeEmptyBlocks=true)
 Sets the template. More...
 
 loadTemplatefile ( $filename, $removeUnknownVariables=true, $removeEmptyBlocks=true)
 Reads a template file from the disk. More...
 
 setRoot ($root)
 Sets the file root. More...
 
 buildBlockvariablelist ()
 Build a list of all variables within of a block. More...
 
 getGlobalvariables ()
 Returns a list of all global variables. More...
 
 findBlocks ($string)
 Recusively builds a list of all blocks within the template. More...
 
 getFile ($filename)
 Reads a file from disk and returns its content. More...
 
 _addPregDelimiters ($str)
 Adds delimiters to a string, so it can be used as a pattern in preg_* functions. More...
 
 _preserveOpeningDelimiter ($str)
 Replaces an opening delimiter by a special string. More...
 
 errorMessage ($value, $blockname='')
 Return a textual error message for a IT error code. More...
 

Static Public Member Functions

static buildLoginTarget ()
 Add current object (repository/workspace) as target for login url. More...
 

Data Fields

 $contenttype
 
 $vars
 
 $activeBlock
 
 $js_files = array(0 => "./Services/JavaScript/js/Basic.js")
 
 $js_files_vp = array("./Services/JavaScript/js/Basic.js" => true)
 
 $js_files_batch = array("./Services/JavaScript/js/Basic.js" => 1)
 
 $css_files = array()
 
 $inline_css = array()
 
 $admin_panel_commands = array()
 
- Data Fields inherited from HTML_Template_ITX
 $warn = array()
 
 $printWarning = false
 
 $haltOnWarning = false
 
 $checkblocknameRegExp = ''
 
 $functionPrefix = 'func_'
 
 $functionnameRegExp = '[_a-zA-Z]+[A-Za-z_0-9]*'
 
 $functionRegExp = ''
 
 $functions = array()
 
 $callback = array()
 
- Data Fields inherited from HTML_Template_IT
 $err = array()
 
 $clearCache = false
 
 $openingDelimiter = '{'
 
 $closingDelimiter = '}'
 
 $blocknameRegExp = '[\.0-9A-Za-z_-]+'
 
 $variablenameRegExp = '[\.0-9A-Za-z_-]+'
 
 $variablesRegExp = ''
 
 $removeVariablesRegExp = ''
 RegExp used to strip unused variable placeholder. More...
 
 $removeUnknownVariables = true
 
 $removeEmptyBlocks = true
 
 $blockRegExp = ''
 
 $currentBlock = '__global__'
 
 $template = ''
 
 $blocklist = array()
 
 $blockdata = array()
 
 $blockvariables = array()
 
 $blockinner = array()
 
 $touchedBlocks = array()
 List of blocks to preverse even if they are "empty". More...
 
 $_hiddenBlocks = array()
 List of blocks which should not be shown even if not "empty". More...
 
 $variableCache = array()
 
 $clearCacheOnParse = false
 
 $fileRoot = ''
 
 $flagBlocktrouble = false
 
 $flagGlobalParsed = false
 
 $flagCacheTemplatefile = true
 
 $lastTemplatefile = ''
 EXPERIMENTAL! FIXME! More...
 
 $_options
 $_options['preserve_data'] Whether to substitute variables and remove empty placeholders in data passed through setVariable (see also bugs #20199, #21951). More...
 

Protected Attributes

 $message = ""
 
 $title_desc = ""
 
 $upper_icon = ""
 
 $tree_flat_link = ""
 
 $mount_webfolder = ""
 
 $stop_floating = ""
 
 $page_form_action = ""
 
 $page_actions = array()
 
 $permanent_link = false
 
 $content_style_sheet = ""
 
 $frame_fixed_width = false
 
 $title_alerts = array()
 
 $header_action
 
 $lightbox = array()
 

Static Protected Attributes

static $il_cache = array()
 

Private Member Functions

 fillNewContentStyle ()
 Fill Content Style. More...
 
 variableExists ($a_variablename)
 
 fillHeader ()
 Fill header. More...
 
 fillStopFloating ()
 stop floating More...
 
 fillRightContent ()
 Fill right content. More...
 
 setCenterColumnClass ()
 
 fillLeftContent ()
 Fill left content. More...
 

Private Attributes

 $addFooter
 

Detailed Description

special template class to simplify handling of ITX/PEAR

Author
Stefan Kesseler skess.nosp@m.eler.nosp@m.@data.nosp@m.bay..nosp@m.de
Sascha Hofmann shofm.nosp@m.ann@.nosp@m.datab.nosp@m.ay.d.nosp@m.e
Version
$Id$

Definition at line 11 of file class.ilTemplate.php.

Member Function Documentation

◆ addAdminPanelCommand()

ilTemplate::addAdminPanelCommand (   $a_cmd,
  $a_txt,
  $a_arrow = false 
)

Add a command to the admin panel.

Deprecated:
use addAdminPanelToolbar

Definition at line 2225 of file class.ilTemplate.php.

2226  {
2227  $this->admin_panel_commands[] =
2228  array("cmd" => $a_cmd, "txt" => $a_txt);
2229  if ($a_arrow)
2230  {
2231  $this->admin_panel_arrow = true;
2232  }
2233  $this->admin_panel_top_only = false;
2234  }

◆ addAdminPanelToolbar()

ilTemplate::addAdminPanelToolbar ( ilToolbarGUI  $toolb,
  $a_bottom_panel = true,
  $a_arrow = false 
)

Add admin panel commands as toolbar.

Parameters
ilToolbarGUI$toolb
bool$a_top_only

Definition at line 2241 of file class.ilTemplate.php.

2242  {
2243  $this->admin_panel_commands_toolbar = $toolb;
2244  $this->admin_panel_arrow = $a_arrow;
2245  $this->admin_panel_bottom = $a_bottom_panel;
2246  }

◆ addBlockFile() [1/2]

ilTemplate::addBlockFile (   $var,
  $block,
  $tplname,
  $in_module = false 
)

Definition at line 134 of file class.ilTemplate.php.

References DEBUG, and getTemplatePath().

135  {
136  if (DEBUG)
137  {
138  echo "<br/>Template '".$this->tplPath."/".$tplname."'";
139  }
140 
141  $tplfile = $this->getTemplatePath($tplname, $in_module);
142  if (file_exists($tplfile) == false)
143  {
144  echo "<br/>Template '".$tplfile."' doesn't exist! aborting...";
145  return false;
146  }
147 
148  return parent::addBlockFile($var, $block, $tplfile);
149  }
getTemplatePath($a_tplname, $a_in_module=false, $a_plugin=false)
builds a full template path with template and module name
const DEBUG
+ Here is the call graph for this function:

◆ addBlockFile() [2/2]

ilTemplate::addBlockFile (   $var,
  $block,
  $tplname,
  $in_module = false 
)

overwrites ITX::addBlockFile public

Parameters
string
string
string$tplnametemplate name
boolean$in_moduleshould be set to true, if template file is in module subdirectory
Returns
boolean/string

Definition at line 1342 of file class.ilTemplate.php.

References HTML_Template_IT\$template, HTML_Template_ITX\addBlock(), DEBUG, HTML_Template_IT\getFile(), ilPluginAdmin\getPluginObject(), getTemplateIdentifier(), getTemplatePath(), IL_COMP_SERVICE, and ilUIHookPluginGUI\KEEP.

Referenced by getStandardTemplate().

1343  {
1344  if (DEBUG)
1345  {
1346  echo "<br/>Template '".$this->tplPath."/".$tplname."'";
1347  }
1348 
1349  $tplfile = $this->getTemplatePath($tplname, $in_module);
1350  if (file_exists($tplfile) == false)
1351  {
1352  echo "<br/>Template '".$tplfile."' doesn't exist! aborting...";
1353  return false;
1354  }
1355 
1356  $id = $this->getTemplateIdentifier($tplname, $in_module);
1357  $template = $this->getFile($tplfile);
1358 
1359  // include the template input hook
1360  global $ilPluginAdmin;
1361  $pl_names = $ilPluginAdmin->getActivePluginsForSlot(IL_COMP_SERVICE, "UIComponent", "uihk");
1362  foreach ($pl_names as $pl)
1363  {
1364  $ui_plugin = ilPluginAdmin::getPluginObject(IL_COMP_SERVICE, "UIComponent", "uihk", $pl);
1365  $gui_class = $ui_plugin->getUIClassInstance();
1366 
1367  $resp = $gui_class->getHTML("", "template_add",
1368  array("tpl_id" => $id, "tpl_obj" => $this, "html" => $template));
1369 
1370  if ($resp["mode"] != ilUIHookPluginGUI::KEEP)
1371  {
1372  $template = $gui_class->modifyHTML($template, $resp);
1373  }
1374  }
1375 
1376  return $this->addBlock($var, $block, $template);
1377  }
getTemplatePath($a_tplname, $a_in_module=false, $a_plugin=false)
builds a full template path with template and module name
addBlock($placeholder, $blockname, $template)
Adds a block to the template changing a variable placeholder to a block placeholder.
Definition: ITX.php:248
const DEBUG
getTemplateIdentifier($a_tplname, $a_in_module=false)
get a unique template identifier
static getPluginObject($a_ctype, $a_cname, $a_slot_id, $a_pname)
Get Plugin Object.
const IL_COMP_SERVICE
getFile($filename)
Reads a file from disk and returns its content.
Definition: IT.php:906
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addCss()

ilTemplate::addCss (   $a_css_file,
  $media = "screen" 
)

Add a css file that should be included in the header.

Definition at line 2163 of file class.ilTemplate.php.

2164  {
2165  if (!array_key_exists($a_css_file . $media, $this->css_files))
2166  {
2167  $this->css_files[$a_css_file . $media] = array("file" => $a_css_file, "media" => $media);
2168  }
2169  }

◆ addILIASFooter()

ilTemplate::addILIASFooter ( )

add ILIAS footer

Definition at line 825 of file class.ilTemplate.php.

References $_GET, $_REQUEST, $_SESSION, $d, $file, $GLOBALS, $ilBench, $ilCtrl, $ilSetting, $lng, $total, ilObjLanguageAccess\_checkTranslate(), ilLink\_getStaticLink(), ilObjLanguageExtGUI\_getTranslationLink(), ilUtil\appendUrlParameterString(), getAddFooter(), ilTemplate(), ilImprint\isActive(), HTML_Template_IT\setVariable(), ilUtil\sortArray(), and ilValidatorAdapter\validate().

Referenced by get(), and show().

826  {
827  global $ilAuth;
828 
829  if (!$this->getAddFooter()) return;
830  global $ilias, $ilClientIniFile, $ilCtrl, $ilDB, $ilSetting, $lng;
831 
832  $ftpl = new ilTemplate("tpl.footer.html", true, true, "Services/UICore");
833 
834  $ftpl->setVariable("ILIAS_VERSION", $ilias->getSetting("ilias_version"));
835 
836  $link_items = array();
837 
838  // imprint
839  include_once "Services/Imprint/classes/class.ilImprint.php";
840  if($_REQUEST["baseClass"] != "ilImprintGUI" && ilImprint::isActive())
841  {
842  include_once "Services/Link/classes/class.ilLink.php";
843  $link_items[ilLink::_getStaticLink(0, "impr")] = array($lng->txt("imprint"), true);
844  }
845 
846  $link_items["mailto:".$ilSetting->get("feedback_recipient")] = array($lng->txt("contact_sysadmin"), false);
847 
848  if (DEVMODE && version_compare(PHP_VERSION,'5','>='))
849  {
850  $link_items[ilUtil::appendUrlParameterString($_SERVER["REQUEST_URI"], "do_dev_validate=xhtml")] = array("Validate", true);
851  $link_items[ilUtil::appendUrlParameterString($_SERVER["REQUEST_URI"], "do_dev_validate=accessibility")] = array("Accessibility", true);
852  }
853 
854  $cnt = 0;
855  foreach($link_items as $url => $caption)
856  {
857  $cnt ++;
858  if($caption[1])
859  {
860  $ftpl->touchBlock("blank");
861  }
862  if($cnt < sizeof($link_items))
863  {
864  $ftpl->touchBlock("item_separator");
865  }
866 
867  $ftpl->setCurrentBlock("items");
868  $ftpl->setVariable("URL_ITEM", $url);
869  $ftpl->setVariable("TXT_ITEM", $caption[0]);
870  $ftpl->parseCurrentBlock();
871  }
872 
873  // output translation link
874  if ($ilSetting->get("lang_ext_maintenance") == "1")
875  {
876  include_once("Services/Language/classes/class.ilObjLanguageAccess.php");
878  {
879  include_once("Services/Language/classes/class.ilObjLanguageExtGUI.php");
880  $ftpl->setVariable("TRANSLATION_LINK",
882  }
883  }
884 
885  if (DEVMODE)
886  {
887  // execution time
888  $t1 = explode(" ", $GLOBALS['ilGlobalStartTime']);
889  $t2 = explode(" ", microtime());
890  $diff = $t2[0] - $t1[0] + $t2[1] - $t1[1];
891 
892  $mem_usage = array();
893  if(function_exists("memory_get_usage"))
894  {
895  $mem_usage[] =
896  "Memory Usage: ".memory_get_usage()." Bytes";
897  }
898  if(function_exists("xdebug_peak_memory_usage"))
899  {
900  $mem_usage[] =
901  "XDebug Peak Memory Usage: ".xdebug_peak_memory_usage()." Bytes";
902  }
903  $mem_usage[] = round($diff, 4)." Seconds";
904 
905  if (sizeof($mem_usage))
906  {
907  $ftpl->setVariable("MEMORY_USAGE", "<br>".implode(" | ", $mem_usage));
908  }
909 
910  if (is_object($ilAuth) && isset($_SESSION[$ilAuth->_sessionName]) &&
911  isset($_SESSION[$ilAuth->_sessionName]["timestamp"]))
912  {
913  $ftpl->setVariable("SESS_INFO", "<br />maxlifetime: ".
914  ini_get("session.gc_maxlifetime")." (".
915  (ini_get("session.gc_maxlifetime")/60)."), id: ".session_id()."<br />".
916  "timestamp: ".date("Y-m-d H:i:s", $_SESSION[$ilAuth->_sessionName]["timestamp"]).
917  ", idle: ".date("Y-m-d H:i:s", $_SESSION[$ilAuth->_sessionName]["idle"]).
918  "<br />expire: ".($exp = $ilClientIniFile->readVariable("session","expire")).
919  " (".($exp/60)."), session ends at: ".
920  date("Y-m-d H:i:s", $_SESSION[$ilAuth->_sessionName]["idle"] + $exp));
921  }
922 
923  if (!empty($_GET["do_dev_validate"]) && $ftpl->blockExists("xhtml_validation"))
924  {
925  require_once("Services/XHTMLValidator/classes/class.ilValidatorAdapter.php");
926  $template2 = clone($this);
927 //echo "-".ilValidatorAdapter::validate($template2->get(), $_GET["do_dev_validate"])."-";
928  $ftpl->setCurrentBlock("xhtml_validation");
929  $ftpl->setVariable("VALIDATION",
930  ilValidatorAdapter::validate($template2->get("DEFAULT",
931  false, false, false, true), $_GET["do_dev_validate"]));
932  $ftpl->parseCurrentBlock();
933  }
934 
935  // controller history
936  if (is_object($ilCtrl) && $ftpl->blockExists("c_entry") &&
937  $ftpl->blockExists("call_history"))
938  {
939  $hist = $ilCtrl->getCallHistory();
940  foreach($hist as $entry)
941  {
942  $ftpl->setCurrentBlock("c_entry");
943  $ftpl->setVariable("C_ENTRY", $entry["class"]);
944  if (is_object($ilDB))
945  {
946  $file = $ilCtrl->lookupClassPath($entry["class"]);
947  $add = $entry["mode"]." - ".$entry["cmd"];
948  if ($file != "")
949  {
950  $add.= " - ".$file;
951  }
952  $ftpl->setVariable("C_FILE", $add);
953  }
954  $ftpl->parseCurrentBlock();
955  }
956  $ftpl->setCurrentBlock("call_history");
957  $ftpl->parseCurrentBlock();
958 
959  // debug hack
960  $debug = $ilCtrl->getDebug();
961  foreach($debug as $d)
962  {
963  $ftpl->setCurrentBlock("c_entry");
964  $ftpl->setVariable("C_ENTRY", $d);
965  $ftpl->parseCurrentBlock();
966  }
967  $ftpl->setCurrentBlock("call_history");
968  $ftpl->parseCurrentBlock();
969  }
970 
971  // included files
972  if (is_object($ilCtrl) && $ftpl->blockExists("i_entry") &&
973  $ftpl->blockExists("included_files"))
974  {
975  $fs = get_included_files();
976  $ifiles = array();
977  $total = 0;
978  foreach($fs as $f)
979  {
980  $ifiles[] = array("file" => $f, "size" => filesize($f));
981  $total += filesize($f);
982  }
983  $ifiles = ilUtil::sortArray($ifiles, "size", "desc", true);
984  foreach($ifiles as $f)
985  {
986  $ftpl->setCurrentBlock("i_entry");
987  $ftpl->setVariable("I_ENTRY", $f["file"]." (".$f["size"]." Bytes, ".round(100 / $total * $f["size"], 2)."%)");
988  $ftpl->parseCurrentBlock();
989  }
990  $ftpl->setCurrentBlock("i_entry");
991  $ftpl->setVariable("I_ENTRY", "Total (".$total." Bytes, 100%)");
992  $ftpl->parseCurrentBlock();
993  $ftpl->setCurrentBlock("included_files");
994  $ftpl->parseCurrentBlock();
995  }
996 
997  }
998 
999  // BEGIN Usability: Non-Delos Skins can display the elapsed time in the footer
1000  // The corresponding $ilBench->start invocation is in inc.header.php
1001  global $ilBench;
1002  $ilBench->stop("Core", "ElapsedTimeUntilFooter");
1003  $ftpl->setVariable("ELAPSED_TIME",
1004  ", ".number_format($ilBench->getMeasuredTime("Core", "ElapsedTimeUntilFooter"),1).' seconds');
1005  // END Usability: Non-Delos Skins can display the elapsed time in the footer
1006 
1007  $this->setVariable("FOOTER", $ftpl->get());
1008  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
print $file
$_GET["client_id"]
static _getTranslationLink()
Get the HTML code for calling the page translation.
static sortArray($array, $a_array_sortby, $a_array_sortorder=0, $a_numeric=false, $a_keep_keys=false)
sortArray
global $ilCtrl
Definition: ilias.php:18
static appendUrlParameterString($a_url, $a_par, $xml_style=false)
append URL parameter string ("par1=value1&par2=value2...") to given URL string
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
$GLOBALS['ct_recipient']
_checkTranslate()
Permission check for translations.
ilTemplate($file, $flag1, $flag2, $in_module=false, $vars="DEFAULT", $plugin=false, $a_use_cache=false)
constructor
global $ilSetting
Definition: privfeed.php:40
global $lng
Definition: privfeed.php:40
global $ilBench
Definition: ilias.php:18
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
Definition: index.php:7
static isActive()
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addInlineCss()

ilTemplate::addInlineCss (   $a_css,
  $media = "screen" 
)

Add a css file that should be included in the header.

Definition at line 2174 of file class.ilTemplate.php.

2175  {
2176  $this->inline_css[] = array("css" => $a_css, "media" => $media);
2177  }

◆ addJavaScript() [1/2]

ilTemplate::addJavaScript (   $a_js_file)

Add a javascript file that should be included in the header.

Definition at line 435 of file class.ilTemplate.php.

436  {
437  if (!in_array($a_js_file, $this->js_files))
438  {
439  $this->js_files[] = $a_js_file;
440  }
441  }

◆ addJavaScript() [2/2]

ilTemplate::addJavaScript (   $a_js_file,
  $a_add_version_parameter = true,
  $a_batch = 2 
)

Add a javascript file that should be included in the header.

Definition at line 2110 of file class.ilTemplate.php.

2111  {
2112  // three batches currently
2113  if ($a_batch < 1 || $a_batch > 3)
2114  {
2115  $a_batch = 2;
2116  }
2117  if (!in_array($a_js_file, $this->js_files))
2118  {
2119  $this->js_files[] = $a_js_file;
2120  $this->js_files_vp[$a_js_file] = $a_add_version_parameter;
2121  $this->js_files_batch[$a_js_file] = $a_batch;
2122  }
2123  }

◆ addLightbox()

ilTemplate::addLightbox (   $a_html,
  $a_id 
)

Add lightbox html.

Definition at line 2182 of file class.ilTemplate.php.

2183  {
2184  $this->lightbox[$a_id] = $a_html;
2185  }

◆ addOnLoadCode()

ilTemplate::addOnLoadCode (   $a_code,
  $a_batch = 2 
)

Add on load code.

Definition at line 2150 of file class.ilTemplate.php.

2151  {
2152  // three batches currently
2153  if ($a_batch < 1 || $a_batch > 3)
2154  {
2155  $a_batch = 2;
2156  }
2157  $this->on_load_code[$a_batch][] = $a_code;
2158  }

◆ blockExists() [1/2]

ilTemplate::blockExists (   $a_blockname)

check if block exists in actual template private

Parameters
stringblockname
Returns
boolean

Definition at line 426 of file class.ilTemplate.php.

427  {
428  // added second evaluation to the return statement because the first one only works for the content block (Helmut Schottmüller, 2007-09-14)
429  return (isset($this->blockvariables["content"][$a_blockname]) ? true : false) | (isset($this->blockvariables[$a_blockname]) ? true : false);
430  }

◆ blockExists() [2/2]

ilTemplate::blockExists (   $a_blockname)

check if block exists in actual template private

Parameters
stringblockname
Returns
boolean

Definition at line 1095 of file class.ilTemplate.php.

Referenced by fillBodyClass(), fillCssFiles(), fillInlineCss(), fillJavaScriptFiles(), fillScreenReaderFocus(), fillTabs(), get(), getTabsHTML(), setCenterColumnClass(), setTabs(), and show().

1096  {
1097  // added second evaluation to the return statement because the first one only works for the content block (Helmut Schottmüller, 2007-09-14)
1098  return (isset($this->blockvariables["content"][$a_blockname]) ? true : false) | (isset($this->blockvariables[$a_blockname]) ? true : false);
1099  }
+ Here is the caller graph for this function:

◆ buildLoginTarget()

static ilTemplate::buildLoginTarget ( )
static

Add current object (repository/workspace) as target for login url.

Returns
string

Definition at line 2499 of file class.ilTemplate.php.

References $_GET, $ilUser, ilObject\_lookupObjId(), ilObject\_lookupType(), and ilWorkspaceTree\lookupObjectId().

Referenced by ilMainMenuGUI\getLanguageSelection().

2500  {
2501  global $tree, $ilUser;
2502 
2503  $target_str = "";
2504 
2505  // repository
2506  if ($_GET["ref_id"] != "")
2507  {
2508  if ($tree->isInTree($_GET["ref_id"]) && $_GET["ref_id"] != $tree->getRootId())
2509  {
2510  $obj_id = ilObject::_lookupObjId($_GET["ref_id"]);
2511  $type = ilObject::_lookupType($obj_id);
2512  $target_str = $type."_".$_GET["ref_id"];
2513  }
2514  }
2515  // personal workspace
2516  else if ($_GET["wsp_id"] != "")
2517  {
2518  include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
2519  $tree = new ilWorkspaceTree($ilUser->getId());
2520  $obj_id = $tree->lookupObjectId((int)$_GET["wsp_id"]);
2521  if($obj_id)
2522  {
2523  $type = ilObject::_lookupType($obj_id);
2524  $target_str = $type."_".(int)$_GET["wsp_id"]."_wsp";
2525  }
2526  }
2527  // portfolio
2528  else if ($_GET["prt_id"] != "")
2529  {
2530  $target_str = "prtf_".(int)$_GET["prt_id"];
2531  }
2532 
2533  return $target_str;
2534  }
$_GET["client_id"]
Tree handler for personal workspace.
static _lookupObjId($a_id)
static _lookupType($a_id, $a_reference=false)
lookup object type
global $ilUser
Definition: imgupload.php:15
lookupObjectId($a_node_id)
Get object id for node id.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkTopic()

ilTemplate::checkTopic (   $a_block,
  $a_topic 
)

checks for a topic in the template private

Parameters
string
string
Returns
boolean

Definition at line 1297 of file class.ilTemplate.php.

Referenced by includeNavigation(), and includeTree().

1298  {
1299  return array_key_exists($a_topic, $this->blockvariables[$a_block]);
1300  }
+ Here is the caller graph for this function:

◆ enableDragDropFileUpload()

ilTemplate::enableDragDropFileUpload (   $a_ref_id)

Enables the file upload into this object by dropping a file.

Definition at line 2567 of file class.ilTemplate.php.

Referenced by resetHeaderBlock().

2568  {
2569  $this->enable_fileupload = $a_ref_id;
2570  }
+ Here is the caller graph for this function:

◆ fileExists()

ilTemplate::fileExists (   $filename)

check if a file exists public

Returns
boolean

Definition at line 1327 of file class.ilTemplate.php.

References $filename.

1328  {
1329  return file_exists($this->tplPath."/".$filename);
1330  }
$filename
Definition: buildRTE.php:89

◆ fillAdminPanel()

ilTemplate::fillAdminPanel ( )

Put admin panel into template:

  • creation selector
  • admin view on/off button

Definition at line 2253 of file class.ilTemplate.php.

References $cmd, $lng, fillPageFormAction(), ilUtil\getImagePath(), HTML_Template_IT\parseCurrentBlock(), setCurrentBlock(), and HTML_Template_IT\setVariable().

Referenced by get(), and show().

2254  {
2255  global $lng, $ilHelp;
2256 
2257  $adm_view_cmp = $adm_cmds = $adm_view = false;
2258 
2259  $toolb = new ilToolbarGUI();
2260 
2261  // admin panel commands
2262  if ((count($this->admin_panel_commands) > 0))
2263  {
2264  foreach($this->admin_panel_commands as $cmd)
2265  {
2266  $toolb->addFormButton($cmd["txt"], $cmd["cmd"]);
2267  }
2268  $adm_cmds = true;
2269  }
2270  elseif($this->admin_panel_commands_toolbar instanceof ilToolbarGUI)
2271  {
2272  $toolb = $this->admin_panel_commands_toolbar;
2273  $adm_cmds = true;
2274  }
2275  // Add arrow if desired
2276  if($this->admin_panel_arrow)
2277  {
2278  $toolb->setLeadingImage(ilUtil::getImagePath("arrow_upright.png"), $lng->txt("actions"));
2279  }
2280 
2281  if ($adm_cmds)
2282  {
2283  $this->fillPageFormAction();
2284 
2285  $this->setCurrentBlock("adm_view_components");
2286  $this->setVariable("ADM_PANEL1", $toolb->getHTML());
2287  $this->parseCurrentBlock();
2288  $adm_view_cmp = true;
2289  }
2290 
2291  // admin view button
2292  if ($this->page_actions != "")
2293  {
2294  $this->setVariable("PAGE_ACTIONS", $this->page_actions);
2295  $adm_view = true;
2296  }
2297 
2298  // creation selector
2299  // see: ilObjectAddNewItemGUI
2300  // placeholder "SELECT_OBJTYPE_REPOS" still needed!
2301 
2302  if ($adm_cmds and $this->admin_panel_bottom)
2303  {
2304  $this->setCurrentBlock("adm_view_components2");
2305  if ($this->admin_panel_arrow)
2306  {
2307  $toolb->setLeadingImage(ilUtil::getImagePath("arrow_downright.png"), $lng->txt("actions"));
2308  }
2309  $this->setVariable("ADM_PANEL2", $toolb->getHTML());
2310 
2311  $this->parseCurrentBlock();
2312  }
2313  }
$cmd
Definition: sahs_server.php:35
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
setCurrentBlock($part="DEFAULT")
Überladene Funktion, die sich hier lokal noch den aktuellen Block merkt.
parseCurrentBlock()
Parses the current block.
Definition: IT.php:607
global $lng
Definition: privfeed.php:40
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillBodyClass()

ilTemplate::fillBodyClass ( )

Definition at line 1725 of file class.ilTemplate.php.

References blockExists(), HTML_Template_IT\parseCurrentBlock(), setCurrentBlock(), and HTML_Template_IT\setVariable().

Referenced by get(), and show().

1726  {
1727  if ($this->body_class != "" && $this->blockExists("body_class"))
1728  {
1729  $this->setCurrentBlock("body_class");
1730  $this->setVariable("BODY_CLASS", $this->body_class);
1731  $this->parseCurrentBlock();
1732  }
1733  }
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
setCurrentBlock($part="DEFAULT")
Überladene Funktion, die sich hier lokal noch den aktuellen Block merkt.
parseCurrentBlock()
Parses the current block.
Definition: IT.php:607
blockExists($a_blockname)
check if block exists in actual template private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillContentLanguage()

ilTemplate::fillContentLanguage ( )

Add current user language to meta tags.

public

Definition at line 568 of file class.ilTemplate.php.

References $ilUser, $lng, and HTML_Template_IT\setVariable().

Referenced by get(), and show().

569  {
570  global $ilUser,$lng;
571 
572  if(is_object($ilUser))
573  {
574  if($ilUser->getLanguage())
575  {
576  $this->setVariable('META_CONTENT_LANGUAGE',$ilUser->getLanguage());
577  return true;
578  }
579  if(is_object($lng))
580  {
581  $this->setVariable('META_CONTENT_LANGUAGE',$lng->getDefaultLanguage());
582  return true;
583  }
584  }
585  $this->setVariable('META_CONTENT_LANGUAGE','en');
586  return true;
587  }
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
global $ilUser
Definition: imgupload.php:15
global $lng
Definition: privfeed.php:40
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillContentStyle()

ilTemplate::fillContentStyle ( )

Fill Content Style.

Definition at line 767 of file class.ilTemplate.php.

References HTML_Template_IT\parseCurrentBlock(), setCurrentBlock(), and HTML_Template_IT\setVariable().

Referenced by get(), and show().

768  {
769  if ($this->content_style_sheet != "")
770  {
771  $this->setCurrentBlock("ContentStyle");
772  $this->setVariable("LOCATION_CONTENT_STYLESHEET",
773  $this->content_style_sheet);
774  $this->parseCurrentBlock();
775  }
776  }
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
setCurrentBlock($part="DEFAULT")
Überladene Funktion, die sich hier lokal noch den aktuellen Block merkt.
parseCurrentBlock()
Parses the current block.
Definition: IT.php:607
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillCssFiles()

ilTemplate::fillCssFiles (   $a_force = false)

Fill in the css file tags.

Parameters
boolean$a_force

Definition at line 716 of file class.ilTemplate.php.

References $filename, blockExists(), HTML_Template_IT\parseCurrentBlock(), setCurrentBlock(), and HTML_Template_IT\setVariable().

Referenced by get(), and show().

717  {
718  if (!$this->blockExists("css_file"))
719  {
720  return;
721  }
722  foreach($this->css_files as $css)
723  {
724  $filename = $css["file"];
725  if (strpos($filename, "?") > 0) $filename = substr($filename, 0, strpos($filename, "?"));
726  if (is_file($filename) || $a_force)
727  {
728  $this->setCurrentBlock("css_file");
729  $this->setVariable("CSS_FILE", $css["file"]);
730  $this->setVariable("CSS_MEDIA", $css["media"]);
731  $this->parseCurrentBlock();
732  }
733  }
734  }
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
$filename
Definition: buildRTE.php:89
setCurrentBlock($part="DEFAULT")
Überladene Funktion, die sich hier lokal noch den aktuellen Block merkt.
parseCurrentBlock()
Parses the current block.
Definition: IT.php:607
blockExists($a_blockname)
check if block exists in actual template private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillHeader()

ilTemplate::fillHeader ( )
private

Fill header.

Definition at line 1617 of file class.ilTemplate.php.

References $ilCtrl, $ilUser, $lng, $ref_id, getHeaderActionMenu(), getTitleColor(), HTML_Template_IT\parseCurrentBlock(), setCurrentBlock(), HTML_Template_IT\setVariable(), ilUtil\stripScriptHTML(), and touchBlock().

Referenced by get(), and show().

1618  {
1619  global $lng, $ilUser, $ilCtrl;
1620 
1621  if($this->frame_fixed_width)
1622  {
1623  $this->setVariable("FRAME_FIXED_WIDTH", " ilFrameFixedWidth");
1624  }
1625 
1626  $icon = false;
1627  if ($this->icon_path != "")
1628  {
1629  $icon = true;
1630  $this->setCurrentBlock("header_image");
1631  if ($this->icon_desc != "")
1632  {
1633  $this->setVariable("IMAGE_DESC", $lng->txt("icon")." ".$this->icon_desc);
1634  $this->setVariable("IMAGE_ALT", $lng->txt("icon")." ".$this->icon_desc);
1635  }
1636 
1637  $this->setVariable("IMG_HEADER", $this->icon_path);
1638  $this->parseCurrentBlock();
1639  $header = true;
1640  }
1641 
1642  if ($this->title != "")
1643  {
1644  $this->title = ilUtil::stripScriptHTML($this->title);
1645  $this->setVariable("HEADER", $this->title);
1646  if ($this->getTitleColor() != "")
1647  {
1648  $this->setVariable("HEADER_COLOR", " style=\"color: #".$this->getTitleColor()."\"");
1649  }
1650 
1651  if ($icon)
1652  {
1653  $this->setVariable("HICONCL", "ilHeaderHasIcon");
1654  }
1655  $header = true;
1656  }
1657 
1658  if ($header)
1659  {
1660  $this->setCurrentBlock("header_image");
1661  $this->parseCurrentBlock();
1662  }
1663 
1664  if ($this->title_desc != "")
1665  {
1666  $this->setCurrentBlock("header_desc");
1667  $this->setVariable("H_DESCRIPTION", $this->title_desc);
1668  $this->parseCurrentBlock();
1669  }
1670 
1671  $header = $this->getHeaderActionMenu();
1672  if ($header)
1673  {
1674  $this->setCurrentBlock("head_action_inner");
1675  $this->setVariable("HEAD_ACTION", $header);
1676  $this->parseCurrentBlock();
1677  $this->touchBlock("head_action");
1678  }
1679 
1680  if(count((array) $this->title_alerts))
1681  {
1682  foreach($this->title_alerts as $alert)
1683  {
1684  $this->setCurrentBlock('header_alert');
1685  if(!($alert['propertyNameVisible'] === false))
1686  {
1687  $this->setVariable('H_PROP', $alert['property'].':');
1688  }
1689  $this->setVariable('H_VALUE', $alert['value']);
1690  $this->parseCurrentBlock();
1691  }
1692  }
1693 
1694  // add file upload drop zone in header
1695  if ($this->enable_fileupload != null)
1696  {
1697  $ref_id = $this->enable_fileupload;
1698  $upload_id = "dropzone_" . $ref_id;
1699 
1700  include_once("./Services/FileUpload/classes/class.ilFileUploadGUI.php");
1701  $upload = new ilFileUploadGUI($upload_id, $ref_id, true);
1702 
1703  $this->setVariable("FILEUPLOAD_DROPZONE_ID", " id=\"$upload_id\"");
1704 
1705  $this->setCurrentBlock("header_fileupload");
1706  $this->setVariable("HEADER_FILEUPLOAD_SCRIPT", $upload->getHTML());
1707  $this->parseCurrentBlock();
1708  }
1709  }
static stripScriptHTML($a_str, $a_allow="", $a_rm_js=true)
strip only html tags (4.0) from text $allowed contains tags to be allowed, in format tags a and b ar...
global $ilCtrl
Definition: ilias.php:18
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
touchBlock($block)
overwrites ITX::touchBlock.
setCurrentBlock($part="DEFAULT")
Überladene Funktion, die sich hier lokal noch den aktuellen Block merkt.
parseCurrentBlock()
Parses the current block.
Definition: IT.php:607
global $ilUser
Definition: imgupload.php:15
$ref_id
Definition: sahs_server.php:39
global $lng
Definition: privfeed.php:40
getTitleColor()
Get title color.
getHeaderActionMenu()
Get header action menu.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillInlineCss()

ilTemplate::fillInlineCss ( )

Fill in the inline css.

Parameters
boolean$a_force

Definition at line 741 of file class.ilTemplate.php.

References blockExists(), HTML_Template_IT\parseCurrentBlock(), setCurrentBlock(), and HTML_Template_IT\setVariable().

Referenced by get(), and show().

742  {
743  if (!$this->blockExists("css_inline"))
744  {
745  return;
746  }
747  foreach($this->inline_css as $css)
748  {
749  $this->setCurrentBlock("css_file");
750  $this->setVariable("CSS_INLINE", $css["css"]);
751  //$this->setVariable("CSS_MEDIA", $css["media"]);
752  $this->parseCurrentBlock();
753  }
754  }
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
setCurrentBlock($part="DEFAULT")
Überladene Funktion, die sich hier lokal noch den aktuellen Block merkt.
parseCurrentBlock()
Parses the current block.
Definition: IT.php:607
blockExists($a_blockname)
check if block exists in actual template private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillJavaScriptFiles() [1/2]

ilTemplate::fillJavaScriptFiles ( )

Definition at line 443 of file class.ilTemplate.php.

References $file, blockExists(), HTML_Template_IT\parseCurrentBlock(), setCurrentBlock(), and HTML_Template_IT\setVariable().

Referenced by get(), and show().

444  {
445  global $ilias,$ilTabs;
446  if ($this->blockExists("js_file"))
447  {
448  foreach($this->js_files as $file)
449  {
450  if (is_file($file) || substr($file, 0, 4) == "http")
451  {
452  $this->setCurrentBlock("js_file");
453  $this->setVariable("JS_FILE", $file);
454  $this->parseCurrentBlock();
455  }
456  }
457  }
458  }
print $file
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
setCurrentBlock($part="DEFAULT")
Überladene Funktion, die sich hier lokal noch den aktuellen Block merkt.
parseCurrentBlock()
Parses the current block.
Definition: IT.php:607
blockExists($a_blockname)
check if block exists in actual template private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillJavaScriptFiles() [2/2]

ilTemplate::fillJavaScriptFiles (   $a_force = false)

Definition at line 672 of file class.ilTemplate.php.

References $file, $ilSetting, $ilUser, ilUtil\appendUrlParameterString(), blockExists(), HTML_Template_IT\parseCurrentBlock(), setCurrentBlock(), and HTML_Template_IT\setVariable().

673  {
674  global $ilias, $ilTabs, $ilSetting, $ilUser;
675 
676  if (is_object($ilSetting)) // maybe this one can be removed
677  {
678  $vers = "vers=".str_replace(array(".", " "), "-", $ilSetting->get("ilias_version"));
679  }
680  if ($this->blockExists("js_file"))
681  {
682  // three batches
683  for ($i=1; $i<=3; $i++)
684  {
685  reset($this->js_files);
686  foreach($this->js_files as $file)
687  {
688  if (is_file($file) || substr($file, 0, 4) == "http" || substr($file, 0, 2) == "//" || $a_force)
689  {
690  if ($this->js_files_batch[$file] == $i)
691  {
692  $this->setCurrentBlock("js_file");
693 
694  if ($this->js_files_vp[$file])
695  {
696  $this->setVariable("JS_FILE", ilUtil::appendUrlParameterString($file,$vers));
697  }
698  else
699  {
700  $this->setVariable("JS_FILE", $file);
701  }
702 
703  $this->parseCurrentBlock();
704  }
705  }
706  }
707  }
708  }
709  }
print $file
static appendUrlParameterString($a_url, $a_par, $xml_style=false)
append URL parameter string ("par1=value1&par2=value2...") to given URL string
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
setCurrentBlock($part="DEFAULT")
Überladene Funktion, die sich hier lokal noch den aktuellen Block merkt.
parseCurrentBlock()
Parses the current block.
Definition: IT.php:607
blockExists($a_blockname)
check if block exists in actual template private
global $ilUser
Definition: imgupload.php:15
global $ilSetting
Definition: privfeed.php:40
+ Here is the call graph for this function:

◆ fillLeftContent()

ilTemplate::fillLeftContent ( )
private

Fill left content.

Definition at line 1860 of file class.ilTemplate.php.

References HTML_Template_IT\parseCurrentBlock(), setCurrentBlock(), and HTML_Template_IT\setVariable().

Referenced by get(), and show().

1861  {
1862  if (trim($this->left_content) != "")
1863  {
1864  $this->setCurrentBlock("left_column");
1865  $this->setVariable("LEFT_CONTENT", $this->left_content);
1866  $this->parseCurrentBlock();
1867  }
1868  }
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
setCurrentBlock($part="DEFAULT")
Überladene Funktion, die sich hier lokal noch den aktuellen Block merkt.
parseCurrentBlock()
Parses the current block.
Definition: IT.php:607
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillLeftNav()

ilTemplate::fillLeftNav ( )

Fill left navigation frame.

Definition at line 1881 of file class.ilTemplate.php.

References HTML_Template_IT\parseCurrentBlock(), setCurrentBlock(), HTML_Template_IT\setVariable(), and touchBlock().

Referenced by get(), and show().

1882  {
1883  if (trim($this->left_nav_content) != "")
1884  {
1885  $this->setCurrentBlock("left_nav");
1886  $this->setVariable("LEFT_NAV_CONTENT", $this->left_nav_content);
1887  $this->parseCurrentBlock();
1888  $this->touchBlock("left_nav_space");
1889  }
1890  }
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
touchBlock($block)
overwrites ITX::touchBlock.
setCurrentBlock($part="DEFAULT")
Überladene Funktion, die sich hier lokal noch den aktuellen Block merkt.
parseCurrentBlock()
Parses the current block.
Definition: IT.php:607
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillLightbox()

ilTemplate::fillLightbox ( )

Fill lightbox content.

Parameters

Definition at line 2193 of file class.ilTemplate.php.

References HTML_Template_IT\setVariable().

Referenced by get(), and show().

2194  {
2195  $html = "";
2196 
2197  foreach ($this->lightbox as $lb)
2198  {
2199  $html.= $lb;
2200  }
2201  $this->setVariable("LIGHTBOX", $html);
2202  }
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillMainContent()

ilTemplate::fillMainContent ( )

Fill main content.

Definition at line 1802 of file class.ilTemplate.php.

References HTML_Template_IT\setVariable().

Referenced by get(), and show().

1803  {
1804  if (trim($this->main_content) != "")
1805  {
1806  $this->setVariable("ADM_CONTENT", $this->main_content);
1807  }
1808  }
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillMainMenu()

ilTemplate::fillMainMenu ( )

Definition at line 800 of file class.ilTemplate.php.

References $tpl, and variableExists().

Referenced by get(), and show().

801  {
802  global $tpl;
803  if($this->variableExists('MAINMENU'))
804  {
805  $tpl->setVariable("MAINMENU", $this->main_menu);
806  }
807  }
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl
variableExists($a_variablename)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillMessage() [1/2]

ilTemplate::fillMessage ( )

Definition at line 329 of file class.ilTemplate.php.

References $_SESSION, $lng, $out, getMessageHTML(), and HTML_Template_IT\setVariable().

Referenced by get(), and show().

330  {
331  global $lng;
332 
333  $ms = array("info", "success", "failure", "question");
334  $out = "";
335 
336  foreach ($ms as $m)
337  {
338  $txt = "";
339  if ($m == "question")
340  {
341  $m = "mess_question";
342  }
343 
344  if (isset($_SESSION[$m]) && $_SESSION[$m] != "")
345  {
346  $txt = $_SESSION[$m];
347  }
348  else if (isset($this->message[$m]))
349  {
350  $txt = $this->message[$m];
351  }
352 
353  if ($m == "mess_question")
354  {
355  $m = "question";
356  }
357 
358  if ($txt != "")
359  {
360  $out.= $this->getMessageHTML($txt, $m);
361  }
362 
363  if ($m == "question")
364  {
365  $m = "mess_question";
366  }
367 
368  if (isset($_SESSION[$m]) && $_SESSION[$m])
369  {
370  unset($_SESSION[$m]);
371  }
372  }
373 
374  if ($out != "")
375  {
376  $this->setVariable("MESSAGE", $out);
377  }
378  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
getMessageHTML($a_txt, $a_type="info")
Get HTML for a system message.
global $lng
Definition: privfeed.php:40
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillMessage() [2/2]

ilTemplate::fillMessage ( )

Definition at line 368 of file class.ilTemplate.php.

References $lng, $out, ilSession\clear(), ilSession\get(), ilUtil\getImagePath(), ilTemplate(), and HTML_Template_IT\setVariable().

369  {
370  global $lng;
371 
372  $ms = array("info", "success", "failure", "question");
373  $out = "";
374 
375  foreach ($ms as $m)
376  {
377  if ($m == "question")
378  {
379  $m = "mess_question";
380  }
381 
382  $txt = (ilSession::get($m) != "")
383  ? ilSession::get($m)
384  : $this->message[$m];
385 
386  if ($m == "mess_question")
387  {
388  $m = "question";
389  }
390 
391  if ($txt != "")
392  {
393  $mtpl = new ilTemplate("tpl.message.html", true, true, "Services/Utilities");
394  $mtpl->setCurrentBlock($m."_message");
395  $mtpl->setVariable("TEXT", $txt);
396  $mtpl->setVariable("MESSAGE_HEADING", $lng->txt($m."_message"));
397  $mtpl->setVariable("ALT_IMAGE", $lng->txt("icon")." ".$lng->txt($m."_message"));
398  $mtpl->setVariable("SRC_IMAGE", ilUtil::getImagePath("mess_".$m.".png"));
399  $mtpl->parseCurrentBlock();
400  $out.= $mtpl->get();
401  }
402 
403  if ($m == "question")
404  {
405  $m = "mess_question";
406  }
407 
408  if (ilSession::get($m))
409  {
410  ilSession::clear($m);
411  }
412  }
413 
414  if ($out != "")
415  {
416  $this->setVariable("MESSAGE", $out);
417  }
418  }
static get($a_var)
Get a value.
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static clear($a_var)
Unset a value.
ilTemplate($file, $flag1, $flag2, $in_module=false, $vars="DEFAULT", $plugin=false, $a_use_cache=false)
constructor
global $lng
Definition: privfeed.php:40
+ Here is the call graph for this function:

◆ fillNewContentStyle()

ilTemplate::fillNewContentStyle ( )
private

Fill Content Style.

Definition at line 781 of file class.ilTemplate.php.

References ilUtil\getNewContentStyleSheetLocation(), and HTML_Template_IT\setVariable().

Referenced by get(), and show().

782  {
783  $this->setVariable("LOCATION_NEWCONTENT_STYLESHEET_TAG",
784  '<link rel="stylesheet" type="text/css" href="'.
786  .'" />');
787  }
static getNewContentStyleSheetLocation($mode="output")
get full style sheet file name (path inclusive) of current user
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillOnLoadCode()

ilTemplate::fillOnLoadCode ( )

Fill add on load code.

Definition at line 2344 of file class.ilTemplate.php.

References HTML_Template_IT\parseCurrentBlock(), setCurrentBlock(), and HTML_Template_IT\setVariable().

Referenced by get(), and show().

2345  {
2346  for ($i = 1; $i <= 3; $i++)
2347  {
2348  if (is_array($this->on_load_code[$i]))
2349  {
2350  $this->setCurrentBlock("on_load_code");
2351  foreach ($this->on_load_code[$i] as $code)
2352  {
2353  $this->setCurrentBlock("on_load_code_inner");
2354  $this->setVariable("OLCODE", $code);
2355  $this->parseCurrentBlock();
2356  }
2357  $this->setCurrentBlock("on_load_code");
2358  $this->parseCurrentBlock();
2359  }
2360  }
2361  }
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
setCurrentBlock($part="DEFAULT")
Überladene Funktion, die sich hier lokal noch den aktuellen Block merkt.
parseCurrentBlock()
Parses the current block.
Definition: IT.php:607
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillPageFormAction()

ilTemplate::fillPageFormAction ( )

Definition at line 661 of file class.ilTemplate.php.

References HTML_Template_IT\parseCurrentBlock(), setCurrentBlock(), HTML_Template_IT\setVariable(), and touchBlock().

Referenced by fillAdminPanel().

662  {
663  if ($this->page_form_action != "")
664  {
665  $this->setCurrentBlock("page_form_start");
666  $this->setVariable("PAGE_FORM_ACTION", $this->page_form_action);
667  $this->parseCurrentBlock();
668  $this->touchBlock("page_form_end");
669  }
670  }
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
touchBlock($block)
overwrites ITX::touchBlock.
setCurrentBlock($part="DEFAULT")
Überladene Funktion, die sich hier lokal noch den aktuellen Block merkt.
parseCurrentBlock()
Parses the current block.
Definition: IT.php:607
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillPermanentLink()

ilTemplate::fillPermanentLink ( )

Fill in permanent link.

Definition at line 2327 of file class.ilTemplate.php.

References HTML_Template_IT\setVariable().

Referenced by get(), and show().

2328  {
2329  if (is_array($this->permanent_link))
2330  {
2331  include_once("./Services/PermanentLink/classes/class.ilPermanentLinkGUI.php");
2332  $plinkgui = new ilPermanentLinkGUI(
2333  $this->permanent_link["type"],
2334  $this->permanent_link["id"],
2335  $this->permanent_link["append"],
2336  $this->permanent_link["target"]);
2337  $this->setVariable("PRMLINK", $plinkgui->getHTML());
2338  }
2339  }
Class for permanent links.
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillRightContent()

ilTemplate::fillRightContent ( )
private

Fill right content.

Definition at line 1821 of file class.ilTemplate.php.

References HTML_Template_IT\parseCurrentBlock(), setCurrentBlock(), and HTML_Template_IT\setVariable().

Referenced by get(), and show().

1822  {
1823  if (trim($this->right_content) != "")
1824  {
1825  $this->setCurrentBlock("right_column");
1826  $this->setVariable("RIGHT_CONTENT", $this->right_content);
1827  $this->parseCurrentBlock();
1828  }
1829  }
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
setCurrentBlock($part="DEFAULT")
Überladene Funktion, die sich hier lokal noch den aktuellen Block merkt.
parseCurrentBlock()
Parses the current block.
Definition: IT.php:607
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillScreenReaderFocus()

ilTemplate::fillScreenReaderFocus ( )

Accessibility focus for screen readers.

Definition at line 1973 of file class.ilTemplate.php.

References $ilUser, blockExists(), and touchBlock().

Referenced by get(), and show().

1974  {
1975  global $ilUser;
1976 
1977  if (is_object($ilUser) && $ilUser->getPref("screen_reader_optimization") && $this->blockExists("sr_focus"))
1978  {
1979  $this->touchBlock("sr_focus");
1980  }
1981  }
touchBlock($block)
overwrites ITX::touchBlock.
blockExists($a_blockname)
check if block exists in actual template private
global $ilUser
Definition: imgupload.php:15
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillSideIcons()

ilTemplate::fillSideIcons ( )

Fill side icons (upper icon, tree icon, webfolder icon)

Definition at line 1986 of file class.ilTemplate.php.

References $ilSetting, $lng, $mount_webfolder, ilFrameTargetInfo\_getFrame(), ilAccessKeyGUI\getAttribute(), ilUtil\getImagePath(), HTML_Template_IT\parseCurrentBlock(), setCurrentBlock(), HTML_Template_IT\setVariable(), touchBlock(), ilAccessKey\TREE_OFF, and ilAccessKey\TREE_ON.

Referenced by get(), and show().

1987  {
1988  global $lng, $ilSetting;
1989 
1990  if ($this->upper_icon == "" && $this->tree_flat_link == ""
1991  && $this->mount_webfolder == "")
1992  {
1993  return;
1994  }
1995 
1996  // upper icon
1997  if ($this->upper_icon != "")
1998  {
1999  if ($this->upper_icon_frame != "")
2000  {
2001  $this->setCurrentBlock("target_top");
2002  $this->setVariable("TARGET_TOP", $this->upper_icon_frame);
2003  $this->parseCurrentBlock();
2004  }
2005 
2006  $this->setCurrentBlock("alt_top");
2007  $this->setVariable("ALT_TOP", $lng->txt("up"));
2008  $this->parseCurrentBlock();
2009 
2010  $this->setCurrentBlock("top");
2011  $this->setVariable("LINK_TOP", $this->upper_icon);
2012  $this->setVariable("IMG_TOP",ilUtil::getImagePath("ic_top.png"));
2013  $this->parseCurrentBlock();
2014  }
2015 
2016  // tree/flat icon
2017  if ($this->tree_flat_link != "")
2018  {
2019  if ($this->left_nav_content != "")
2020  {
2021  $this->touchBlock("tree_lns");
2022  }
2023 
2024  $this->setCurrentBlock("tree_mode");
2025  $this->setVariable("LINK_MODE", $this->tree_flat_link);
2026  if ($ilSetting->get("tree_frame") == "right")
2027  {
2028  if ($this->tree_flat_mode == "tree")
2029  {
2030  $this->setVariable("IMG_TREE",ilUtil::getImagePath("ic_sidebar_left.png"));
2031  $this->setVariable("RIGHT", "Right");
2032  }
2033  else
2034  {
2035  $this->setVariable("IMG_TREE",ilUtil::getImagePath("ic_sidebar_right.png"));
2036  $this->setVariable("RIGHT", "Right");
2037  }
2038  }
2039  else
2040  {
2041  if ($this->tree_flat_mode == "tree")
2042  {
2043  $this->setVariable("IMG_TREE",ilUtil::getImagePath("ic_sidebar_right.png"));
2044  }
2045  else
2046  {
2047  $this->setVariable("IMG_TREE",ilUtil::getImagePath("ic_sidebar_left.png"));
2048  }
2049  }
2050  $this->setVariable("ALT_TREE",$lng->txt($this->tree_flat_mode."view"));
2051  $this->setVariable("TARGET_TREE", ilFrameTargetInfo::_getFrame("MainContent"));
2052  include_once("./Services/Accessibility/classes/class.ilAccessKeyGUI.php");
2053  $this->setVariable("TREE_ACC_KEY",
2054  ilAccessKeyGUI::getAttribute(($this->tree_flat_mode == "tree")
2057  $this->parseCurrentBlock();
2058  }
2059 
2060  // mount webfolder
2061  if ($this->mount_webfolder != "")
2062  {
2063  require_once('Services/WebDAV/classes/class.ilDAVServer.php');
2064  $davServer = new ilDAVServer();
2065  $a_ref_id = $this->mount_webfolder;
2066  $a_link = $davServer->getMountURI($a_ref_id);
2067  $a_folder = $davServer->getFolderURI($a_ref_id);
2068 
2069  $this->setCurrentBlock("mount_webfolder");
2070  $this->setVariable("LINK_MOUNT_WEBFOLDER", $a_link);
2071  $this->setVariable("FOLDER_MOUNT_WEBFOLDER", $a_folder);
2072  $this->setVariable("IMG_MOUNT_WEBFOLDER",ilUtil::getImagePath("ic_mount_webfolder.png"));
2073  $this->setVariable("ALT_MOUNT_WEBFOLDER",$lng->txt("mount_webfolder"));
2074  $this->setVariable("TARGET_MOUNT_WEBFOLDER", '_blank');
2075  $this->parseCurrentBlock();
2076  }
2077 
2078  $this->setCurrentBlock("tree_icons");
2079  $this->parseCurrentBlock();
2080  }
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
touchBlock($block)
overwrites ITX::touchBlock.
setCurrentBlock($part="DEFAULT")
Überladene Funktion, die sich hier lokal noch den aktuellen Block merkt.
parseCurrentBlock()
Parses the current block.
Definition: IT.php:607
static _getFrame($a_class, $a_type='')
Get content frame name.
global $ilSetting
Definition: privfeed.php:40
global $lng
Definition: privfeed.php:40
static getAttribute($a_func_id)
Get accesskey HTML attribute.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillStopFloating()

ilTemplate::fillStopFloating ( )
private

stop floating

Definition at line 1760 of file class.ilTemplate.php.

References touchBlock().

Referenced by get(), and show().

1761  {
1762  if ($this->stop_floating)
1763  {
1764  $this->touchBlock("stop_floating");
1765  }
1766  }
touchBlock($block)
overwrites ITX::touchBlock.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillTabs()

ilTemplate::fillTabs ( )

Definition at line 629 of file class.ilTemplate.php.

References blockExists(), HTML_Template_IT\setVariable(), and touchBlock().

Referenced by get(), and show().

630  {
631  global $ilias,$ilTabs;
632 
633  if ($this->blockExists("tabs_outer_start"))
634  {
635  $this->touchBlock("tabs_outer_start");
636  $this->touchBlock("tabs_outer_end");
637  $this->touchBlock("tabs_inner_start");
638  $this->touchBlock("tabs_inner_end");
639 
640  if ($this->thtml != "")
641  {
642  $this->setVariable("TABS",$this->thtml);
643  }
644  $this->setVariable("SUB_TABS", $this->sthtml);
645  }
646  }
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
touchBlock($block)
overwrites ITX::touchBlock.
blockExists($a_blockname)
check if block exists in actual template private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillToolbar()

ilTemplate::fillToolbar ( )

Definition at line 648 of file class.ilTemplate.php.

References HTML_Template_IT\parseCurrentBlock(), setCurrentBlock(), and HTML_Template_IT\setVariable().

Referenced by get(), and show().

649  {
650  global $ilToolbar;
651 
652  $thtml = $ilToolbar->getHTML();
653  if ($thtml != "")
654  {
655  $this->setCurrentBlock("toolbar_buttons");
656  $this->setVariable("BUTTONS", $thtml);
657  $this->parseCurrentBlock();
658  }
659  }
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
setCurrentBlock($part="DEFAULT")
Überladene Funktion, die sich hier lokal noch den aktuellen Block merkt.
parseCurrentBlock()
Parses the current block.
Definition: IT.php:607
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillVars()

ilTemplate::fillVars ( )

all template vars defined in $vars will be replaced automatically without setting and parsing them with setVariable & parseCurrentBlock private

Returns
integer

Definition at line 1112 of file class.ilTemplate.php.

References HTML_Template_IT\setVariable().

Referenced by parseCurrentBlock(), and touchBlock().

1113  {
1114  $count = 0;
1115  reset($this->vars);
1116 
1117  while(list($key, $val) = each($this->vars))
1118  {
1119  if (is_array($this->blockvariables[$this->activeBlock]))
1120  {
1121  if (array_key_exists($key, $this->blockvariables[$this->activeBlock]))
1122  {
1123  $count++;
1124 
1125  $this->setVariable($key, $val);
1126  }
1127  }
1128  }
1129 
1130  return $count;
1131  }
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillWindowTitle()

ilTemplate::fillWindowTitle ( )

Definition at line 589 of file class.ilTemplate.php.

References $ilSetting, HTML_Template_IT\setVariable(), and ilUtil\stripScriptHTML().

Referenced by get(), and show().

590  {
591  global $ilSetting;
592 
593  if ($this->header_page_title != "")
594  {
595  $a_title = ilUtil::stripScriptHTML($this->header_page_title);
596  $this->setVariable("PAGETITLE", "- ".$a_title);
597  }
598 
599  if ($ilSetting->get('short_inst_name') != "")
600  {
601  $this->setVariable("WINDOW_TITLE",
602  $ilSetting->get('short_inst_name'));
603  }
604  else
605  {
606  $this->setVariable("WINDOW_TITLE",
607  "ILIAS");
608  }
609  }
static stripScriptHTML($a_str, $a_allow="", $a_rm_js=true)
strip only html tags (4.0) from text $allowed contains tags to be allowed, in format tags a and b ar...
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
global $ilSetting
Definition: privfeed.php:40
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get() [1/2]

ilTemplate::get (   $part = "DEFAULT",
  $add_error_mess = false,
  $handle_referer = false,
  $add_ilias_footer = false,
  $add_standard_elements = false,
  $a_main_menu = true,
  $a_tabs = true 
)

??? public

Parameters
string
Returns
string

Definition at line 196 of file class.ilTemplate.php.

References addILIASFooter(), blockExists(), fillAdminPanel(), fillBodyClass(), fillContentLanguage(), fillContentStyle(), fillCssFiles(), fillHeader(), fillInlineCss(), fillJavaScriptFiles(), fillLeftContent(), fillLeftNav(), fillLightbox(), fillMainContent(), fillMainMenu(), fillMessage(), fillNewContentStyle(), fillOnLoadCode(), fillPermanentLink(), fillRightContent(), fillScreenReaderFocus(), fillSideIcons(), fillStopFloating(), fillTabs(), fillToolbar(), fillWindowTitle(), getMainMenu(), ilPluginAdmin\getPluginObject(), getTabsHTML(), handleReferer(), IL_COMP_SERVICE, initHelp(), ilUIHookPluginGUI\KEEP, HTML_Template_IT\parseCurrentBlock(), setCenterColumnClass(), and setCurrentBlock().

199  {
200  if ($add_error_mess)
201  {
202  $this->fillMessage();
203  }
204 
205  if ($add_ilias_footer)
206  {
207  $this->addILIASFooter();
208  }
209 
210  // set standard parts (tabs and title icon)
211  if($add_standard_elements)
212  {
213  if ($this->blockExists("content") && $a_tabs)
214  {
215  // determine default screen id
216  $this->getTabsHTML();
217  }
218 
219  // to get also the js files for the main menu
220  $this->getMainMenu();
221  $this->initHelp();
222 
223  // these fill blocks in tpl.main.html
224  $this->fillCssFiles();
225  $this->fillInlineCss();
226  $this->fillContentStyle();
227  $this->fillBodyClass();
228 
229  // these fill just plain placeholder variables in tpl.main.html
230  $this->setCurrentBlock("DEFAULT");
231  $this->fillNewContentStyle();
232  $this->fillContentLanguage();
233  $this->fillWindowTitle();
234 
235  // these fill blocks in tpl.adm_content.html
236  $this->fillHeader();
237  $this->fillSideIcons();
238  $this->fillScreenReaderFocus();
239  $this->fillStopFloating();
240  $this->fillLeftContent();
241  $this->fillLeftNav();
242  $this->fillRightContent();
243  $this->fillAdminPanel();
244  $this->fillToolbar();
245  $this->fillPermanentLink();
246 
247  $this->setCenterColumnClass();
248 
249  // late loading of javascipr files, since operations above may add files
250  $this->fillJavaScriptFiles();
251  $this->fillOnLoadCode();
252 
253  // these fill just plain placeholder variables in tpl.adm_content.html
254  if ($this->blockExists("content"))
255  {
256  $this->setCurrentBlock("content");
257  if ($a_tabs)
258  {
259  $this->fillTabs();
260  }
261  $this->fillMainContent();
262  if ($a_main_menu)
263  {
264  $this->fillMainMenu();
265  }
266  $this->fillLightbox();
267  $this->parseCurrentBlock();
268  }
269  }
270 
271  if ($handle_referer)
272  {
273  $this->handleReferer();
274  }
275 
276  if ($part == "DEFAULT")
277  {
278  $html = parent::get();
279  }
280  else
281  {
282  $html = parent::get($part);
283  }
284 
285  // include the template output hook
286  global $ilPluginAdmin;
287  $pl_names = $ilPluginAdmin->getActivePluginsForSlot(IL_COMP_SERVICE, "UIComponent", "uihk");
288  foreach ($pl_names as $pl)
289  {
290  $ui_plugin = ilPluginAdmin::getPluginObject(IL_COMP_SERVICE, "UIComponent", "uihk", $pl);
291  $gui_class = $ui_plugin->getUIClassInstance();
292 
293  $resp = $gui_class->getHTML("", "template_get",
294  array("tpl_id" => $this->tplIdentifier, "tpl_obj" => $this, "html" => $html));
295 
296  if ($resp["mode"] != ilUIHookPluginGUI::KEEP)
297  {
298  $html = $gui_class->modifyHTML($html, $resp);
299  }
300  }
301 
302  return $html;
303  }
fillNewContentStyle()
Fill Content Style.
fillScreenReaderFocus()
Accessibility focus for screen readers.
getTabsHTML()
Get tabs HTML.
fillPermanentLink()
Fill in permanent link.
fillLeftContent()
Fill left content.
fillOnLoadCode()
Fill add on load code.
fillStopFloating()
stop floating
fillHeader()
Fill header.
fillAdminPanel()
Put admin panel into template:
fillSideIcons()
Fill side icons (upper icon, tree icon, webfolder icon)
fillLeftNav()
Fill left navigation frame.
initHelp()
Init help.
static getPluginObject($a_ctype, $a_cname, $a_slot_id, $a_pname)
Get Plugin Object.
fillLightbox()
Fill lightbox content.
fillRightContent()
Fill right content.
fillContentLanguage()
Add current user language to meta tags.
setCurrentBlock($part="DEFAULT")
Überladene Funktion, die sich hier lokal noch den aktuellen Block merkt.
parseCurrentBlock()
Parses the current block.
Definition: IT.php:607
handleReferer()
TODO: this is nice, but shouldn&#39;t be done here (-> maybe at the end of ilias.php!?, alex)
fillCssFiles($a_force=false)
Fill in the css file tags.
blockExists($a_blockname)
check if block exists in actual template private
fillMainContent()
Fill main content.
fillContentStyle()
Fill Content Style.
fillInlineCss()
Fill in the inline css.
addILIASFooter()
add ILIAS footer
const IL_COMP_SERVICE
+ Here is the call graph for this function:

◆ get() [2/2]

ilTemplate::get (   $part = "DEFAULT")

Definition at line 460 of file class.ilTemplate.php.

461  {
462  if ($part == "DEFAULT")
463  {
464  return parent::get();
465  }
466  else
467  {
468  return parent::get($part);
469  }
470  }

◆ getAddFooter()

ilTemplate::getAddFooter ( )

Definition at line 174 of file class.ilTemplate.php.

References $addFooter.

Referenced by addILIASFooter().

175  {
176  return $this->addFooter;
177  }
+ Here is the caller graph for this function:

◆ getAsynch()

ilTemplate::getAsynch ( )

Use this for final get before sending asynchronous output (ajax) per echo to output.

Definition at line 184 of file class.ilTemplate.php.

References getContentType().

185  {
186  header("Content-type: " . $this->getContentType() . "; charset=UTF-8");
187  return $this->get();
188  }
getContentType()
Get the content type for the template output.
+ Here is the call graph for this function:

◆ getContentType()

ilTemplate::getContentType ( )

Get the content type for the template output.

Returns
string Content type public

Definition at line 404 of file class.ilTemplate.php.

References $contenttype.

Referenced by getAsynch(), and show().

405  {
406  return $this->contenttype;
407  }
+ Here is the caller graph for this function:

◆ getHeaderActionMenu()

ilTemplate::getHeaderActionMenu ( )

Get header action menu.

Returns
int ref id

Definition at line 1783 of file class.ilTemplate.php.

References $header_action.

Referenced by fillHeader().

1784  {
1785  return $this->header_action;
1786  }
+ Here is the caller graph for this function:

◆ getLoginTargetPar()

ilTemplate::getLoginTargetPar ( )

Get target parameter for login.

Definition at line 1965 of file class.ilTemplate.php.

Referenced by getMainMenu(), and setTopBar().

1966  {
1967  return $this->login_target_par;
1968  }
+ Here is the caller graph for this function:

◆ getMainMenu()

ilTemplate::getMainMenu ( )

Definition at line 789 of file class.ilTemplate.php.

References getLoginTargetPar(), and variableExists().

Referenced by get(), and show().

790  {
791  global $ilMainMenu;
792 
793  if($this->variableExists('MAINMENU'))
794  {
795  $ilMainMenu->setLoginTargetPar($this->getLoginTargetPar());
796  $this->main_menu = $ilMainMenu->getHTML();
797  }
798  }
getLoginTargetPar()
Get target parameter for login.
variableExists($a_variablename)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getMessageHTML() [1/2]

ilTemplate::getMessageHTML (   $a_txt,
  $a_type = "info" 
)

Get HTML for a system message.

Definition at line 258 of file class.ilTemplate.php.

References $lng, ilUtil\getImagePath(), and ilTemplate().

259  {
260  global $lng;
261 
262  $mtpl = new ilTemplate("tpl.message.html", true, true, "Services/Utilities");
263  $mtpl->setCurrentBlock($a_type."_message");
264  $mtpl->setVariable("TEXT", $a_txt);
265  $mtpl->setVariable("MESSAGE_HEADING", $lng->txt($a_type."_message"));
266  $mtpl->setVariable("ALT_IMAGE", $lng->txt("icon")." ".$lng->txt($a_type."_message"));
267  $mtpl->setVariable("SRC_IMAGE", ilUtil::getImagePath("mess_".$a_type.".png"));
268  $mtpl->parseCurrentBlock();
269 
270  return $mtpl->get();
271  }
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
ilTemplate($file, $flag1, $flag2, $in_module=false, $vars="DEFAULT", $plugin=false, $a_use_cache=false)
constructor
global $lng
Definition: privfeed.php:40
+ Here is the call graph for this function:

◆ getMessageHTML() [2/2]

ilTemplate::getMessageHTML (   $a_txt,
  $a_type = "info" 
)

Get HTML for a system message.

Definition at line 383 of file class.ilTemplate.php.

References $lng, ilUtil\getImagePath(), and ilTemplate().

Referenced by fillMessage(), and show().

384  {
385  global $lng;
386 
387  $mtpl = new ilTemplate("tpl.message.html", true, true, "Services/Utilities");
388  $mtpl->setCurrentBlock($a_type."_message");
389  $mtpl->setVariable("TEXT", $a_txt);
390  $mtpl->setVariable("MESSAGE_HEADING", $lng->txt($a_type."_message"));
391  $mtpl->setVariable("ALT_IMAGE", $lng->txt("icon")." ".$lng->txt($a_type."_message"));
392  $mtpl->setVariable("SRC_IMAGE", ilUtil::getImagePath("mess_".$a_type.".png"));
393  $mtpl->parseCurrentBlock();
394 
395  return $mtpl->get();
396  }
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
ilTemplate($file, $flag1, $flag2, $in_module=false, $vars="DEFAULT", $plugin=false, $a_use_cache=false)
constructor
global $lng
Definition: privfeed.php:40
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getOnLoadCodeForAsynch()

ilTemplate::getOnLoadCodeForAsynch ( )

Get js onload code for ajax calls.

Returns
string

Definition at line 2368 of file class.ilTemplate.php.

2369  {
2370  $js = "";
2371  for ($i = 1; $i <= 3; $i++)
2372  {
2373  if (is_array($this->on_load_code[$i]))
2374  {
2375  foreach ($this->on_load_code[$i] as $code)
2376  {
2377  $js .= $code."\n";
2378  }
2379  }
2380  }
2381  if($js)
2382  {
2383  return '<script type="text/javascript">'."\n".
2384  $js.
2385  '</script>'."\n";
2386  }
2387  }

◆ getStandardTemplate()

ilTemplate::getStandardTemplate ( )

Definition at line 1561 of file class.ilTemplate.php.

References addBlockFile(), and iljQueryUtil\initjQuery().

1562  {
1563  // always load jQuery
1564  include_once("./Services/jQuery/classes/class.iljQueryUtil.php");
1566 
1567  // always load Basic js
1568 // $this->addJavaScript("./Services/JavaScript/js/Basic.js",
1569 // true, 1);
1570 
1571  $this->addBlockFile("CONTENT", "content", "tpl.adm_content.html");
1572  $this->addBlockFile("STATUSLINE", "statusline", "tpl.statusline.html");
1573  }
addBlockFile($var, $block, $tplname, $in_module=false)
overwrites ITX::addBlockFile public
static initjQuery($a_tpl=null)
Init jQuery.
+ Here is the call graph for this function:

◆ getTabsHTML()

ilTemplate::getTabsHTML ( )

Get tabs HTML.

Parameters

Definition at line 617 of file class.ilTemplate.php.

References blockExists().

Referenced by get(), and show().

618  {
619  global $ilTabs;
620 
621  if ($this->blockExists("tabs_outer_start"))
622  {
623  $this->sthtml = $ilTabs->getSubTabHTML();
624  $this->thtml = $ilTabs->getHTML((trim($sthtml) == ""));
625  }
626  }
blockExists($a_blockname)
check if block exists in actual template private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTemplateIdentifier()

ilTemplate::getTemplateIdentifier (   $a_tplname,
  $a_in_module = false 
)

get a unique template identifier

The identifier is common for default or customized skins but distincts templates of different services with the same name.

This is used by the UI plugin hook for template input/output

Parameters
string$a_tplnametemplate name
string$in_moduleComponent, e.g. "Modules/Forum" boolean $in_module or true, if component should be determined by ilCtrl
Returns
string template identifier, e.g. "Services/Calendar/tpl.minical.html", "tpl.confirm.html"

Definition at line 1508 of file class.ilTemplate.php.

References $_GET, $ilCtrl, and ILIAS_MODULE.

Referenced by addBlockFile(), and ilTemplate().

1509  {
1510  global $ilCtrl;
1511 
1512  // if baseClass functionality is used (ilias.php):
1513  // get template directory from ilCtrl
1514  if (!empty($_GET["baseClass"]) && $a_in_module === true)
1515  {
1516  $a_in_module = $ilCtrl->getModuleDir();
1517  }
1518 
1519  if (strpos($a_tplname,"/") === false)
1520  {
1521  if ($a_in_module)
1522  {
1523  if ($a_in_module === true)
1524  {
1525  $module_path = ILIAS_MODULE."/";
1526  }
1527  else
1528  {
1529  $module_path = $a_in_module."/";
1530  }
1531  }
1532  else
1533  {
1534  $module_path = "";
1535  }
1536 
1537  return $module_path.basename($a_tplname);
1538  }
1539  else
1540  {
1541  return $a_tplname;
1542  }
1543  }
const ILIAS_MODULE
Definition: payment.php:15
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
+ Here is the caller graph for this function:

◆ getTemplatePath() [1/2]

ilTemplate::getTemplatePath (   $a_tplname,
  $a_in_module = false,
  $a_plugin = false 
)

builds a full template path with template and module name

Parameters
string$a_tplnametemplate name
boolean$in_moduleshould be set to true, if template file is in module subdirectory
Returns
string full template path

Definition at line 86 of file class.ilTemplate.php.

References $_GET, $ilCtrl, and ILIAS_MODULE.

87  {
88  global $ilias, $ilCtrl;
89 
90  // if baseClass functionality is used (ilias.php):
91  // get template directory from ilCtrl
92  if (!empty($_GET["baseClass"]) && $a_in_module === true)
93  {
94  $a_in_module = $ilCtrl->getModuleDir();
95  }
96 
97  if (strpos($a_tplname,"/") === false)
98  {
99  $module_path = "";
100 
101  //$fname = $ilias->tplPath;
102  if ($a_in_module)
103  {
104  if ($a_in_module === true)
105  {
106  $module_path = ILIAS_MODULE."/";
107  }
108  else
109  {
110  $module_path = $a_in_module."/";
111  }
112  }
113 
114  if($fname == "" || !file_exists($fname))
115  {
116  if ($a_in_module == "setup")
117  {
118  $fname = "./".$module_path."templates/".basename($a_tplname);
119  }
120  else
121  {
122  $fname = "./".$module_path."templates/default/".basename($a_tplname);
123  }
124  }
125  }
126  else
127  {
128  $fname = $a_tplname;
129  }
130 
131  return $fname;
132  }
const ILIAS_MODULE
Definition: payment.php:15
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18

◆ getTemplatePath() [2/2]

ilTemplate::getTemplatePath (   $a_tplname,
  $a_in_module = false,
  $a_plugin = false 
)

builds a full template path with template and module name

Parameters
string$a_tplnametemplate name
boolean$in_moduleshould be set to true, if template file is in module subdirectory
Returns
string full template path

Definition at line 1443 of file class.ilTemplate.php.

References $_GET, $ilCtrl, ilStyleDefinition\getCurrentSkin(), and ILIAS_MODULE.

Referenced by addBlockFile(), and ilTemplate().

1444  {
1445  global $ilias, $ilCtrl;
1446 
1447  $fname = "";
1448 
1449  // if baseClass functionality is used (ilias.php):
1450  // get template directory from ilCtrl
1451  if (!empty($_GET["baseClass"]) && $a_in_module === true)
1452  {
1453  $a_in_module = $ilCtrl->getModuleDir();
1454  }
1455 
1456  if (strpos($a_tplname,"/") === false)
1457  {
1458  $module_path = "";
1459 
1460  //$fname = $ilias->tplPath;
1461  if ($a_in_module)
1462  {
1463  if ($a_in_module === true)
1464  {
1465  $module_path = ILIAS_MODULE."/";
1466  }
1467  else
1468  {
1469  $module_path = $a_in_module."/";
1470  }
1471  }
1472 
1473  // use ilStyleDefinition instead of account to get the current skin
1474  include_once "Services/Style/classes/class.ilStyleDefinition.php";
1475  if (ilStyleDefinition::getCurrentSkin() != "default")
1476  {
1477  $fname = "./Customizing/global/skin/".
1478  ilStyleDefinition::getCurrentSkin()."/".$module_path.basename($a_tplname);
1479  }
1480 
1481  if($fname == "" || !file_exists($fname))
1482  {
1483  $fname = "./".$module_path."templates/default/".basename($a_tplname);
1484  }
1485  }
1486  else
1487  {
1488  $fname = $a_tplname;
1489  }
1490 
1491  return $fname;
1492  }
const ILIAS_MODULE
Definition: payment.php:15
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
static getCurrentSkin()
get the current skin
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTitleColor()

ilTemplate::getTitleColor ( )

Get title color.

Returns
string color

Definition at line 1599 of file class.ilTemplate.php.

Referenced by fillHeader().

1600  {
1601  return $this->title_color;
1602  }
+ Here is the caller graph for this function:

◆ handleReferer()

ilTemplate::handleReferer ( )

TODO: this is nice, but shouldn't be done here (-> maybe at the end of ilias.php!?, alex)

Definition at line 1015 of file class.ilTemplate.php.

References $_GET, $_POST, $_SESSION, and $path.

Referenced by get(), and show().

1016  {
1017  if (((substr(strrchr($_SERVER["PHP_SELF"],"/"),1) != "error.php")
1018  && (substr(strrchr($_SERVER["PHP_SELF"],"/"),1) != "adm_menu.php")
1019  && (substr(strrchr($_SERVER["PHP_SELF"],"/"),1) != "chat.php")))
1020  {
1021  $_SESSION["post_vars"] = $_POST;
1022 
1023  // referer is modified if query string contains cmd=gateway and $_POST is not empty.
1024  // this is a workaround to display formular again in case of error and if the referer points to another page
1025  $url_parts = @parse_url($_SERVER["REQUEST_URI"]);
1026  if(!$url_parts)
1027  {
1028  $protocol = (isset($_SERVER['HTTPS']) ? 'https' : 'http').'://';
1029  $host = $_SERVER['HTTP_HOST'];
1030  $path = $_SERVER['REQUEST_URI'];
1031  $url_parts = @parse_url($protocol.$host.$path);
1032  }
1033 
1034  if (isset($url_parts["query"]) && preg_match("/cmd=gateway/",$url_parts["query"]) && (isset($_POST["cmd"]["create"])))
1035  {
1036  foreach ($_POST as $key => $val)
1037  {
1038  if (is_array($val))
1039  {
1040  $val = key($val);
1041  }
1042 
1043  $str .= "&".$key."=".$val;
1044  }
1045 
1046  $_SESSION["referer"] = preg_replace("/cmd=gateway/",substr($str,1),$_SERVER["REQUEST_URI"]);
1047  $_SESSION['referer_ref_id'] = (int) $_GET['ref_id'];
1048 
1049  }
1050  else if (isset($url_parts["query"]) && preg_match("/cmd=post/",$url_parts["query"]) && (isset($_POST["cmd"]["create"])))
1051  {
1052  foreach ($_POST as $key => $val)
1053  {
1054  if (is_array($val))
1055  {
1056  $val = key($val);
1057  }
1058 
1059  $str .= "&".$key."=".$val;
1060  }
1061 
1062  $_SESSION["referer"] = preg_replace("/cmd=post/",substr($str,1),$_SERVER["REQUEST_URI"]);
1063  if (isset($_GET['ref_id']))
1064  {
1065  $_SESSION['referer_ref_id'] = (int) $_GET['ref_id'];
1066  }
1067  else
1068  {
1069  $_SESSION['referer_ref_id'] = 0;
1070  }
1071  }
1072  else
1073  {
1074  $_SESSION["referer"] = $_SERVER["REQUEST_URI"];
1075  if (isset($_GET['ref_id']))
1076  {
1077  $_SESSION['referer_ref_id'] = (int) $_GET['ref_id'];
1078  }
1079  else
1080  {
1081  $_SESSION['referer_ref_id'] = 0;
1082  }
1083  }
1084 
1085  unset($_SESSION["error_post_vars"]);
1086  }
1087  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
$_POST['username']
Definition: cron.php:12
$_GET["client_id"]
$path
Definition: index.php:22
+ Here is the caller graph for this function:

◆ ilTemplate() [1/2]

ilTemplate::ilTemplate (   $file,
  $flag1,
  $flag2,
  $in_module = false,
  $vars = "DEFAULT" 
)

constructor

Parameters
string$filetemplatefile (mit oder ohne pfad)
boolean$flag1remove unknown variables
boolean$flag2remove empty blocks
boolean$in_moduleshould be set to true, if template file is in module subdirectory
array$varsvariables to replace public

Definition at line 45 of file class.ilTemplate.php.

References $file, ilTemplateX\callConstructor(), getTemplatePath(), loadTemplatefile(), and HTML_Template_IT\setOption().

46  {
47  $this->activeBlock = "__global__";
48  $this->vars = array();
49 
50  $fname = $this->getTemplatePath($file, $in_module);
51 
52  $this->tplName = basename($fname);
53  $this->tplPath = dirname($fname);
54  // set default content-type to text/html
55  $this->contenttype = "text/html";
56  if (!file_exists($fname))
57  {
58  die("template ".$fname." was not found.");
59  return false;
60  }
61 
62  //$this->IntegratedTemplateExtension(dirname($fname));
63  $this->callConstructor();
64  //$this->loadTemplatefile(basename($fname), $flag1, $flag2);
65  $this->loadTemplatefile($fname, $flag1, $flag2);
66  //add tplPath to replacevars
67  $this->vars["TPLPATH"] = $this->tplPath;
68 
69  // set Options
70  if (method_exists($this, "setOption"))
71  {
72  $this->setOption('use_preg', false);
73  }
74 
75  return true;
76  }
getTemplatePath($a_tplname, $a_in_module=false, $a_plugin=false)
builds a full template path with template and module name
print $file
loadTemplatefile( $filename, $removeUnknownVariables=true, $removeEmptyBlocks=true)
Reads a template file from the disk.
setOption($option, $value)
Sets the option for the template class.
Definition: IT.php:397
+ Here is the call graph for this function:

◆ ilTemplate() [2/2]

ilTemplate::ilTemplate (   $file,
  $flag1,
  $flag2,
  $in_module = false,
  $vars = "DEFAULT",
  $plugin = false,
  $a_use_cache = false 
)

constructor

Parameters
string$filetemplatefile (mit oder ohne pfad)
boolean$flag1remove unknown variables
boolean$flag2remove empty blocks
boolean$in_moduleshould be set to true, if template file is in module subdirectory
array$varsvariables to replace public

Definition at line 68 of file class.ilTemplate.php.

References $file, ilTemplateX\callConstructor(), getTemplateIdentifier(), getTemplatePath(), loadTemplatefile(), setBodyClass(), and HTML_Template_IT\setOption().

Referenced by addILIASFooter(), fillMessage(), and getMessageHTML().

70  {
71  global $ilias;
72 //echo "<br>-".$file."-";
73 
74  $this->activeBlock = "__global__";
75  $this->vars = array();
76  $this->addFooter = TRUE;
77 
78  $this->il_use_cache = $a_use_cache;
79  $this->il_cur_key = $file."/".$in_module;
80 
81  $fname = $this->getTemplatePath($file, $in_module, $plugin);
82 
83  $this->tplName = basename($fname);
84  $this->tplPath = dirname($fname);
85  // template identifier e.g. "Services/Calendar/tpl.minical.html"
86  $this->tplIdentifier = $this->getTemplateIdentifier($file, $in_module);
87 
88  // set default content-type to text/html
89  $this->contenttype = "text/html";
90  if (!file_exists($fname))
91  {
92  $ilias->raiseError("template ".$fname." was not found.", $ilias->error_obj->FATAL);
93  return false;
94  }
95 
96  //$this->IntegratedTemplateExtension(dirname($fname));
97  $this->callConstructor();
98  //$this->loadTemplatefile(basename($fname), $flag1, $flag2);
99  $this->loadTemplatefile($fname, $flag1, $flag2);
100  //add tplPath to replacevars
101  $this->vars["TPLPATH"] = $this->tplPath;
102 
103  // set Options
104  if (method_exists($this, "setOption"))
105  {
106  $this->setOption('use_preg', false);
107  }
108  $this->setBodyClass("std");
109 
110  return true;
111  }
getTemplatePath($a_tplname, $a_in_module=false, $a_plugin=false)
builds a full template path with template and module name
print $file
setBodyClass($a_class="")
getTemplateIdentifier($a_tplname, $a_in_module=false)
get a unique template identifier
loadTemplatefile( $filename, $removeUnknownVariables=true, $removeEmptyBlocks=true)
Reads a template file from the disk.
setOption($option, $value)
Sets the option for the template class.
Definition: IT.php:397
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ includeNavigation()

ilTemplate::includeNavigation ( )

check if there is a NAVIGATION-topic public

Returns
boolean

Definition at line 1307 of file class.ilTemplate.php.

References checkTopic().

1308  {
1309  return $this->checkTopic("__global__", "NAVIGATION");
1310  }
checkTopic($a_block, $a_topic)
checks for a topic in the template private
+ Here is the call graph for this function:

◆ includeTree()

ilTemplate::includeTree ( )

check if there is a TREE-topic public

Returns
boolean

Definition at line 1317 of file class.ilTemplate.php.

References checkTopic().

1318  {
1319  return $this->checkTopic("__global__", "TREE");
1320  }
checkTopic($a_block, $a_topic)
checks for a topic in the template private
+ Here is the call graph for this function:

◆ init()

ilTemplate::init ( )

Definition at line 114 of file class.ilTemplate.php.

References HTML_Template_IT\$blockdata, HTML_Template_IT\$blockinner, HTML_Template_IT\$blocklist, HTML_Template_IT\$blockvariables, HTML_Template_IT\$err, HTML_Template_IT\$flagBlocktrouble, HTML_Template_IT\buildBlockvariablelist(), HTML_Template_ITX\buildFunctionlist(), HTML_Template_IT\findBlocks(), and HTML_Template_IT\free().

115  {
116  $this->free();
117  $this->buildFunctionlist();
118 
119  $cache_hit = false;
120  if ($this->il_use_cache)
121  {
122  // cache hit
123  if (isset(self::$il_cache[$this->il_cur_key]) && is_array(self::$il_cache[$this->il_cur_key]))
124  {
125  $cache_hit = true;
126 //echo "cache hit";
127  $this->err = self::$il_cache[$this->il_cur_key]["err"];
128  $this->flagBlocktrouble = self::$il_cache[$this->il_cur_key]["flagBlocktrouble"];
129  $this->blocklist = self::$il_cache[$this->il_cur_key]["blocklist"];
130  $this->blockdata = self::$il_cache[$this->il_cur_key]["blockdata"];
131  $this->blockinner = self::$il_cache[$this->il_cur_key]["blockinner"];
132  $this->blockparents = self::$il_cache[$this->il_cur_key]["blockparents"];
133  $this->blockvariables = self::$il_cache[$this->il_cur_key]["blockvariables"];
134  }
135  }
136 
137  if (!$cache_hit)
138  {
139  $this->findBlocks($this->template);
140  $this->template = '';
141  $this->buildBlockvariablelist();
142  if ($this->il_use_cache)
143  {
144  self::$il_cache[$this->il_cur_key]["err"] = $this->err;
145  self::$il_cache[$this->il_cur_key]["flagBlocktrouble"] = $this->flagBlocktrouble;
146  self::$il_cache[$this->il_cur_key]["blocklist"] = $this->blocklist;
147  self::$il_cache[$this->il_cur_key]["blockdata"] = $this->blockdata;
148  self::$il_cache[$this->il_cur_key]["blockinner"] = $this->blockinner;
149  self::$il_cache[$this->il_cur_key]["blockparents"] = $this->blockparents;
150  self::$il_cache[$this->il_cur_key]["blockvariables"] = $this->blockvariables;
151  }
152  }
153 
154  // we don't need it any more
155  $this->template = '';
156 
157  } // end func init
free()
Clears all datafields of the object.
Definition: IT.php:710
buildBlockvariablelist()
Build a list of all variables within of a block.
Definition: IT.php:813
findBlocks($string)
Recusively builds a list of all blocks within the template.
Definition: IT.php:854
buildFunctionlist()
Builds a functionlist from the template.
Definition: ITX.php:623
+ Here is the call graph for this function:

◆ initHelp()

ilTemplate::initHelp ( )

Init help.

Parameters

Definition at line 815 of file class.ilTemplate.php.

References ilHelpGUI\initHelp().

Referenced by get(), and show().

816  {
817  include_once("./Services/Help/classes/class.ilHelpGUI.php");
818  ilHelpGUI::initHelp($this);
819  }
initHelp($a_tpl)
Render current help page.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ loadTemplatefile()

ilTemplate::loadTemplatefile (   $filename,
  $removeUnknownVariables = true,
  $removeEmptyBlocks = true 
)

Reads a template file from the disk.

overwrites IT:loadTemplateFile to include the template input hook

Parameters
stringname of the template file
boolhow to handle unknown variables.
boolhow to handle empty blocks. public
Returns
boolean false on failure, otherwise true
See also
$template, setTemplate(), $removeUnknownVariables, $removeEmptyBlocks

Definition at line 1393 of file class.ilTemplate.php.

References $filename, HTML_Template_IT\$removeEmptyBlocks, HTML_Template_IT\$removeUnknownVariables, HTML_Template_IT\$template, HTML_Template_IT\getFile(), ilPluginAdmin\getPluginObject(), IL_COMP_SERVICE, ilUIHookPluginGUI\KEEP, and HTML_Template_IT\setTemplate().

Referenced by ilTemplate().

1396  {
1397  // copied from IT:loadTemplateFile
1398  $template = '';
1399  if (!$this->flagCacheTemplatefile ||
1400  $this->lastTemplatefile != $filename
1401  ) {
1402  $template = $this->getFile($filename);
1403  }
1404  $this->lastTemplatefile = $filename;
1405  // copied.
1406 
1407  // new code to include the template input hook:
1408  global $ilPluginAdmin;
1409  $pl_names = $ilPluginAdmin->getActivePluginsForSlot(IL_COMP_SERVICE, "UIComponent", "uihk");
1410  foreach ($pl_names as $pl)
1411  {
1412  $ui_plugin = ilPluginAdmin::getPluginObject(IL_COMP_SERVICE, "UIComponent", "uihk", $pl);
1413  $gui_class = $ui_plugin->getUIClassInstance();
1414 
1415  $resp = $gui_class->getHTML("", "template_load",
1416  array("tpl_id" => $this->tplIdentifier, "tpl_obj" => $this, "html" => $template));
1417 
1418  if ($resp["mode"] != ilUIHookPluginGUI::KEEP)
1419  {
1420  $template = $gui_class->modifyHTML($template, $resp);
1421  }
1422  }
1423  // new.
1424 
1425  // copied from IT:loadTemplateFile
1426  return $template != '' ?
1427  $this->setTemplate(
1429  ) : false;
1430  // copied.
1431 
1432  }
$removeUnknownVariables
Definition: IT.php:195
static getPluginObject($a_ctype, $a_cname, $a_slot_id, $a_pname)
Get Plugin Object.
$filename
Definition: buildRTE.php:89
$removeEmptyBlocks
Definition: IT.php:202
setTemplate( $template, $removeUnknownVariables=true, $removeEmptyBlocks=true)
Sets the template.
Definition: IT.php:737
const IL_COMP_SERVICE
getFile($filename)
Reads a file from disk and returns its content.
Definition: IT.php:906
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ parseCurrentBlock() [1/2]

ilTemplate::parseCurrentBlock (   $part = "DEFAULT")

Überladene Funktion, die auf den aktuelle Block vorher noch ein replace ausführt public.

Parameters
string
Returns
string

Definition at line 317 of file class.ilTemplate.php.

References $activeBlock.

318  {
319  // Hier erst noch ein replace aufrufen
320  if ($part != "DEFAULT")
321  {
322  $tmp = $this->activeBlock;
323  $this->activeBlock = $part;
324  }
325 
326  if ($part != "DEFAULT")
327  {
328  $this->activeBlock = $tmp;
329  }
330 
331  //$this->fillVars();
332 
333  $this->activeBlock = "__global__";
334 
335  if ($part == "DEFAULT")
336  {
337  return parent::parseCurrentBlock();
338  }
339  else
340  {
341  return parent::parseCurrentBlock($part);
342  }
343  }

◆ parseCurrentBlock() [2/2]

ilTemplate::parseCurrentBlock (   $part = "DEFAULT")

Überladene Funktion, die auf den aktuelle Block vorher noch ein replace ausführt public.

Parameters
string
Returns
string

Definition at line 1177 of file class.ilTemplate.php.

References $activeBlock, and fillVars().

Referenced by ilChatroomViewTask\cancelJoin(), ilForumExportGUI\executeCommand(), ilEMailInputGUI\insert(), ilCaptchaInputGUI\insert(), and ilSurveyPageGUI\renderPageNode().

1178  {
1179  // Hier erst noch ein replace aufrufen
1180  if ($part != "DEFAULT")
1181  {
1182  $tmp = $this->activeBlock;
1183  $this->activeBlock = $part;
1184  }
1185 
1186  if ($part != "DEFAULT")
1187  {
1188  $this->activeBlock = $tmp;
1189  }
1190 
1191  $this->fillVars();
1192 
1193  $this->activeBlock = "__global__";
1194 
1195  if ($part == "DEFAULT")
1196  {
1197  return parent::parseCurrentBlock();
1198  }
1199  else
1200  {
1201  return parent::parseCurrentBlock($part);
1202  }
1203  }
fillVars()
all template vars defined in $vars will be replaced automatically without setting and parsing them wi...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ prepareForFormular()

ilTemplate::prepareForFormular (   $vars)

Wird angewendet, wenn die Daten in ein Formular replaced werden sollen, Dann wird erst noch ein htmlspecialchars drumherum gemacht.

public

Parameters
string

Definition at line 1249 of file class.ilTemplate.php.

1250  {
1251  if (!is_array($vars))
1252  {
1253  return;
1254  }
1255 
1256  reset($vars);
1257 
1258  while (list($i) = each($vars))
1259  {
1260  $vars[$i] = stripslashes($vars[$i]);
1261  $vars[$i] = htmlspecialchars($vars[$i]);
1262  }
1263 
1264  return($vars);
1265  }

◆ replace()

ilTemplate::replace ( )

??? public

Definition at line 1271 of file class.ilTemplate.php.

References HTML_Template_IT\setVariable().

Referenced by replaceDefault(), and replaceFromDatabase().

1272  {
1273  reset($this->vars);
1274 
1275  while(list($key, $val) = each($this->vars))
1276  {
1277  $this->setVariable($key, $val);
1278  }
1279  }
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ replaceDefault()

ilTemplate::replaceDefault ( )

??? public

Definition at line 1285 of file class.ilTemplate.php.

References replace().

1286  {
1287  $this->replace($this->vars);
1288  }
replace()
??? public
+ Here is the call graph for this function:

◆ replaceFromDatabase()

ilTemplate::replaceFromDatabase ( $DB,
  $block,
  $conv,
  $select = "default" 
)

??? TODO: Adjust var names to ilias.

This method wasn't used so far and isn't translated yet public

Parameters
string
string
string
string

Definition at line 1215 of file class.ilTemplate.php.

References $res, $result, HTML_Template_IT\parseCurrentBlock(), replace(), and setCurrentBlock().

1216  {
1217  $res = $DB->selectDbAll();
1218 
1219  while ($DB->getDbNextElement($res))
1220  {
1221  $this->setCurrentBlock($block);
1222  $result = array();
1223  reset($conv);
1224 
1225  while (list ($key,$val) = each ($conv))
1226  {
1227  $result[$val]=$DB->element->data[$key];
1228  }
1229 
1230  if (($select != "default")
1231  && ($DB->element->data[$select["id"]]==$select["value"]
1232  || (strtolower($select["text"]) == "checked"
1233  && strpos( ",,".$select["value"].",," , ",".$DB->element->data[$select["id"]]."," )!=false)))
1234  {
1235  $result[$select["field"]] = $select["text"];
1236  }
1237 
1238  $this->replace($result);
1239  $this->parseCurrentBlock($block);
1240  }
1241  }
$result
setCurrentBlock($part="DEFAULT")
Überladene Funktion, die sich hier lokal noch den aktuellen Block merkt.
parseCurrentBlock()
Parses the current block.
Definition: IT.php:607
replace()
??? public
+ Here is the call graph for this function:

◆ resetCss()

ilTemplate::resetCss ( )

Reset css files.

Parameters

Definition at line 2141 of file class.ilTemplate.php.

2142  {
2143  $this->css_files = array();
2144  }

◆ resetHeaderBlock()

ilTemplate::resetHeaderBlock (   $a_reset_header_action = true)

Set variable.

Reset all header properties: title, icon, description, alerts, action menu

Definition at line 2549 of file class.ilTemplate.php.

References enableDragDropFileUpload(), setAlertProperties(), setDescription(), setHeaderActionMenu(), setTitle(), and setTitleIcon().

Referenced by setFullscreenHeader().

2550  {
2551  $this->setTitle(null);
2552  $this->setTitleIcon(null);
2553  $this->setDescription(null);
2554  $this->setAlertProperties(array());
2555  $this->enableDragDropFileUpload(null);
2556 
2557  // see setFullscreenHeader()
2558  if($a_reset_header_action)
2559  {
2560  $this->setHeaderActionMenu(null);
2561  }
2562  }
setTitleIcon($a_icon_path, $a_icon_desc="")
set title icon
setDescription($a_descr)
sets title in standard template
setAlertProperties(array $a_props)
Set alert properties.
setTitle($a_title)
sets title in standard template
setHeaderActionMenu($a_header)
Set header action menu.
enableDragDropFileUpload($a_ref_id)
Enables the file upload into this object by dropping a file.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resetJavascript()

ilTemplate::resetJavascript ( )

Reset javascript files.

Definition at line 2128 of file class.ilTemplate.php.

2129  {
2130  $this->js_files = array();
2131  $this->js_files_vp = array();
2132  $this->js_files_batch = array();
2133  }

◆ setAddFooter()

ilTemplate::setAddFooter (   $value)

Definition at line 164 of file class.ilTemplate.php.

165  {
166  $this->addFooter = $value;
167  }

◆ setAlertProperties()

ilTemplate::setAlertProperties ( array  $a_props)

Set alert properties.

Parameters
array$a_props
Returns
void

Definition at line 1609 of file class.ilTemplate.php.

Referenced by resetHeaderBlock().

1610  {
1611  $this->title_alerts = $a_props;
1612  }
+ Here is the caller graph for this function:

◆ setBodyClass()

ilTemplate::setBodyClass (   $a_class = "")

Definition at line 1720 of file class.ilTemplate.php.

Referenced by ilTemplate().

1721  {
1722  $this->body_class = $a_class;
1723  }
+ Here is the caller graph for this function:

◆ setCenterColumnClass()

ilTemplate::setCenterColumnClass ( )
private

Definition at line 1831 of file class.ilTemplate.php.

References blockExists(), HTML_Template_IT\parseCurrentBlock(), setCurrentBlock(), and HTML_Template_IT\setVariable().

Referenced by get(), and show().

1832  {
1833  if (!$this->blockExists("center_col_width"))
1834  {
1835  return;
1836  }
1837  $center_column_class = "";
1838  if (trim($this->right_content) != "" && trim($this->left_content) != "") {
1839  $center_column_class = "two_side_col";
1840  }
1841  else if (trim($this->right_content) != "" || trim($this->left_content) != "") {
1842  $center_column_class = "one_side_col";
1843  }
1844  $this->setCurrentBlock("center_col_width");
1845  $this->setVariable("CENTER_COL", $center_column_class);
1846  $this->parseCurrentBlock();
1847  }
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
setCurrentBlock($part="DEFAULT")
Überladene Funktion, die sich hier lokal noch den aktuellen Block merkt.
parseCurrentBlock()
Parses the current block.
Definition: IT.php:607
blockExists($a_blockname)
check if block exists in actual template private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setContent()

ilTemplate::setContent (   $a_html)

sets content for standard template

Definition at line 1791 of file class.ilTemplate.php.

1792  {
1793  if ($a_html != "")
1794  {
1795  $this->main_content = $a_html;
1796  }
1797  }

◆ setContentStyleSheet()

ilTemplate::setContentStyleSheet (   $a_style)

Set content style (used for page content editor)

Definition at line 759 of file class.ilTemplate.php.

760  {
761  $this->content_style_sheet = $a_style;
762  }

◆ setContentType()

ilTemplate::setContentType (   $a_content_type = "text/html")

Set the content type for the template output.

Set the content type for the template output Usually this is text/html. For MathML output the content type should be set to text/xml

Parameters
string$a_content_typeContent type public

Definition at line 419 of file class.ilTemplate.php.

420  {
421  $this->contenttype = $a_content_type;
422  }

◆ setCurrentBlock() [1/2]

ilTemplate::setCurrentBlock (   $part = "DEFAULT")

Überladene Funktion, die sich hier lokal noch den aktuellen Block merkt.

public

Parameters
string
Returns
???

Definition at line 279 of file class.ilTemplate.php.

280  {
281  $this->activeBlock = $part;
282 
283  if ($part == "DEFAULT")
284  {
285  return parent::setCurrentBlock();
286  }
287  else
288  {
289  return parent::setCurrentBlock($part);
290  }
291  }

◆ setCurrentBlock() [2/2]

ilTemplate::setCurrentBlock (   $part = "DEFAULT")

Überladene Funktion, die sich hier lokal noch den aktuellen Block merkt.

public

Parameters
string
Returns
???

Definition at line 1139 of file class.ilTemplate.php.

Referenced by ilChatroomViewTask\cancelJoin(), ilForumExportGUI\executeCommand(), fillAdminPanel(), fillBodyClass(), fillContentStyle(), fillCssFiles(), fillHeader(), fillInlineCss(), fillJavaScriptFiles(), fillLeftContent(), fillLeftNav(), fillOnLoadCode(), fillPageFormAction(), fillRightContent(), fillSideIcons(), fillToolbar(), get(), ilEMailInputGUI\insert(), ilCaptchaInputGUI\insert(), ilSurveyPageGUI\renderPageNode(), replaceFromDatabase(), setCenterColumnClass(), setFullscreenHeader(), setTopBar(), show(), and touchBlock().

1140  {
1141  $this->activeBlock = $part;
1142 
1143  if ($part == "DEFAULT")
1144  {
1145  return parent::setCurrentBlock();
1146  }
1147  else
1148  {
1149  return parent::setCurrentBlock($part);
1150  }
1151  }
+ Here is the caller graph for this function:

◆ setDescription()

ilTemplate::setDescription (   $a_descr)

sets title in standard template

Definition at line 1743 of file class.ilTemplate.php.

Referenced by resetHeaderBlock(), and setFullscreenHeader().

1744  {
1745  $this->title_desc = $a_descr;
1746 // $this->setVariable("H_DESCRIPTION", $a_descr);
1747  }
+ Here is the caller graph for this function:

◆ setEditPageButton()

ilTemplate::setEditPageButton (   $a_link,
  $a_txt,
  $a_frame 
)

Show admin view button.

Definition at line 2215 of file class.ilTemplate.php.

2216  {
2217  $this->edit_page_button =
2218  array("link" => $a_link, "txt" => $a_txt, "frame" => $a_frame);
2219  }

◆ setFrameFixedWidth()

ilTemplate::setFrameFixedWidth (   $a_value)

Restrict content frame to fixed width (will be centered on screen)

Parameters
bool$a_value

Definition at line 429 of file class.ilTemplate.php.

430  {
431  $this->frame_fixed_width = (bool)$a_value;
432  }

◆ setFullscreenHeader()

ilTemplate::setFullscreenHeader (   $a_title,
  $a_description = null,
  $a_icon = null,
  $a_img = null,
  $a_bg_color = null,
  $a_font_color = null,
  $a_width = 880,
  $a_height = 100,
  $a_export = false 
)

Set fullscreen header data.

Parameters
string$a_title
string$a_description
string$a_iconpath
string$a_imgbanner full path (background image)
string$a_bg_colorhtml color code (page background)
string$a_font_colorhtml color code (title and description)
int$a_widthbanner width
int$a_heightbanner height
bool$a_export

Definition at line 2402 of file class.ilTemplate.php.

References HTML_Template_IT\parseCurrentBlock(), resetHeaderBlock(), setCurrentBlock(), setDescription(), setTitle(), setTitleColor(), and HTML_Template_IT\setVariable().

2403  {
2404  $this->resetHeaderBlock(false);
2405 
2406  $this->setTitle($a_title);
2407  $this->setTitleColor($a_font_color);
2408  $this->setDescription($a_description);
2409 
2410  if($a_icon)
2411  {
2412  $this->setCurrentBlock("fullscreen_iconbl");
2413  $this->setVariable("FULLSCREEN_ICON", $a_icon);
2414  $this->parseCurrentBlock();
2415  }
2416 
2417  if($a_bg_color)
2418  {
2419  //$this->setVariable("FRAME_BG_COLOR", " style=\"padding:1px; background-color: #".$a_bg_color."\"");
2420  $this->setVariable("FRAME_BG_COLOR", " style=\"background-color: #".$a_bg_color."\"");
2421  }
2422  else
2423  {
2424  //$this->setVariable("FRAME_BG_COLOR", " style=\"padding:1px;\"");
2425  }
2426 
2427  if($a_img)
2428  {
2429  if(!$a_export)
2430  {
2431  $a_img = ILIAS_HTTP_PATH."/".$a_img;
2432  }
2433 
2434  $this->setCurrentBlock("fullscreen_bannerbl");
2435  $this->setVariable("FULLSCREEN_BANNER_WIDTH", $a_width);
2436  $this->setVariable("FULLSCREEN_BANNER_HEIGHT", $a_height);
2437  $this->setVariable("FULLSCREEN_BG", " background-image: url(".$a_img.")");
2438 
2439  $this->parseCurrentBlock();
2440  }
2441  }
setDescription($a_descr)
sets title in standard template
resetHeaderBlock($a_reset_header_action=true)
Set variable.
setTitle($a_title)
sets title in standard template
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
setCurrentBlock($part="DEFAULT")
Überladene Funktion, die sich hier lokal noch den aktuellen Block merkt.
parseCurrentBlock()
Parses the current block.
Definition: IT.php:607
setTitleColor($a_val)
Set title color.
+ Here is the call graph for this function:

◆ setHeaderActionMenu()

ilTemplate::setHeaderActionMenu (   $a_header)

Set header action menu.

Parameters
string$a_gui$a_header

Definition at line 1773 of file class.ilTemplate.php.

Referenced by resetHeaderBlock().

1774  {
1775  $this->header_action = $a_header;
1776  }
+ Here is the caller graph for this function:

◆ setHeaderPageTitle()

ilTemplate::setHeaderPageTitle (   $a_title)

Definition at line 1545 of file class.ilTemplate.php.

References ilUtil\stripScriptHTML().

1546  {
1547  $a_title = ilUtil::stripScriptHTML($a_title);
1548  $this->header_page_title = $a_title;
1549  }
static stripScriptHTML($a_str, $a_allow="", $a_rm_js=true)
strip only html tags (4.0) from text $allowed contains tags to be allowed, in format tags a and b ar...
+ Here is the call graph for this function:

◆ setLeftContent()

ilTemplate::setLeftContent (   $a_html)

sets content of left column

Definition at line 1852 of file class.ilTemplate.php.

1853  {
1854  $this->left_content = $a_html;
1855  }

◆ setLeftNavContent()

ilTemplate::setLeftNavContent (   $a_content)

Sets content of left navigation column.

Definition at line 1873 of file class.ilTemplate.php.

1874  {
1875  $this->left_nav_content = $a_content;
1876  }

◆ setLocator()

ilTemplate::setLocator ( )

Insert locator.

Definition at line 1895 of file class.ilTemplate.php.

References $lng, and HTML_Template_IT\setVariable().

1896  {
1897  global $ilLocator, $lng, $ilPluginAdmin;
1898 
1899  $html = "";
1900  if (is_object($ilPluginAdmin))
1901  {
1902  include_once("./Services/UIComponent/classes/class.ilUIHookProcessor.php");
1903  $uip = new ilUIHookProcessor("Services/Locator", "main_locator",
1904  array("locator_gui" => $ilLocator));
1905  if (!$uip->replaced())
1906  {
1907  $html = $ilLocator->getHTML();
1908  }
1909  $html = $uip->getHTML($html);
1910  }
1911  else
1912  {
1913  $html = $ilLocator->getHTML();
1914  }
1915 
1916  $this->setVariable("LOCATOR", $html);
1917  }
UI interface hook processor.
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
global $lng
Definition: privfeed.php:40
+ Here is the call graph for this function:

◆ setLoginTargetPar()

ilTemplate::setLoginTargetPar (   $a_val)

Set target parameter for login (public sector).

This is used by the main menu

Definition at line 1957 of file class.ilTemplate.php.

1958  {
1959  $this->login_target_par = $a_val;
1960  }

◆ setMessage() [1/2]

ilTemplate::setMessage (   $a_type,
  $a_txt,
  $a_keep = false 
)

Set message.

Please use ilUtil::sendInfo(), ilUtil::sendSuccess() and ilUtil::sendFailure()

Definition at line 309 of file class.ilTemplate.php.

References $_SESSION.

310  {
311  if (!in_array($a_type, array("info", "success", "failure", "question")) || $a_txt == "")
312  {
313  return;
314  }
315  if ($a_type == "question")
316  {
317  $a_type = "mess_question";
318  }
319  if (!$a_keep)
320  {
321  $this->message[$a_type] = $a_txt;
322  }
323  else
324  {
325  $_SESSION[$a_type] = $a_txt;
326  }
327  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']

◆ setMessage() [2/2]

ilTemplate::setMessage (   $a_type,
  $a_txt,
  $a_keep = false 
)

Set message.

Please use ilUtil::sendInfo(), ilUtil::sendSuccess() and ilUtil::sendFailure()

Definition at line 348 of file class.ilTemplate.php.

References ilSession\set().

349  {
350  if (!in_array($a_type, array("info", "success", "failure", "question")) || $a_txt == "")
351  {
352  return;
353  }
354  if ($a_type == "question")
355  {
356  $a_type = "mess_question";
357  }
358  if (!$a_keep)
359  {
360  $this->message[$a_type] = $a_txt;
361  }
362  else
363  {
364  ilSession::set($a_type, $a_txt);
365  }
366  }
static set($a_var, $a_val)
Set a value.
+ Here is the call graph for this function:

◆ setMountWebfolderIcon()

ilTemplate::setMountWebfolderIcon (   $a_ref_id)

shows icon for mounting a webfolder

Definition at line 2086 of file class.ilTemplate.php.

References $lng.

2087  {
2088  global $lng;
2089 
2090  $this->mount_webfolder = $a_ref_id;
2091  }
global $lng
Definition: privfeed.php:40

◆ setNewContentStyleSheetLocation()

ilTemplate::setNewContentStyleSheetLocation (   $a_stylesheet)

Definition at line 1556 of file class.ilTemplate.php.

References HTML_Template_IT\setVariable().

1557  {
1558  $this->setVariable("LOCATION_NEWCONTENT_STYLESHEET", $a_stylesheet);
1559  }
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
+ Here is the call graph for this function:

◆ setPageActions()

ilTemplate::setPageActions (   $a_page_actions_html)

Show admin view button.

Definition at line 2207 of file class.ilTemplate.php.

2208  {
2209  $this->page_actions = $a_page_actions_html;
2210  }

◆ setPageFormAction()

ilTemplate::setPageFormAction (   $a_action)

Definition at line 1735 of file class.ilTemplate.php.

1736  {
1737  $this->page_form_action = $a_action;
1738  }

◆ setPermanentLink()

ilTemplate::setPermanentLink (   $a_type,
  $a_id,
  $a_append = "",
  $a_target = "" 
)

Definition at line 2315 of file class.ilTemplate.php.

2316  {
2317  $this->permanent_link = array(
2318  "type" => $a_type,
2319  "id" => $a_id,
2320  "append" => $a_append,
2321  "target" => $a_target);
2322  }

◆ setRightContent()

ilTemplate::setRightContent (   $a_html)

sets content of right column

Definition at line 1813 of file class.ilTemplate.php.

1814  {
1815  $this->right_content = $a_html;
1816  }

◆ setStyleSheetLocation()

ilTemplate::setStyleSheetLocation (   $a_stylesheet)

Definition at line 1551 of file class.ilTemplate.php.

References HTML_Template_IT\setVariable().

1552  {
1553  $this->setVariable("LOCATION_STYLESHEET", $a_stylesheet);
1554  }
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
+ Here is the call graph for this function:

◆ setSubTabs()

ilTemplate::setSubTabs (   $a_tabs_html)

sets subtabs in standard template

Definition at line 1937 of file class.ilTemplate.php.

References HTML_Template_IT\setVariable().

1938  {
1939  $this->setVariable("SUB_TABS", $a_tabs_html);
1940  }
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
+ Here is the call graph for this function:

◆ setTabs()

ilTemplate::setTabs (   $a_tabs_html)

sets tabs in standard template

Definition at line 1922 of file class.ilTemplate.php.

References blockExists(), HTML_Template_IT\setVariable(), and touchBlock().

1923  {
1924  if ($a_tabs_html != "" && $this->blockExists("tabs_outer_start"))
1925  {
1926  $this->touchBlock("tabs_outer_start");
1927  $this->touchBlock("tabs_outer_end");
1928  $this->touchBlock("tabs_inner_start");
1929  $this->touchBlock("tabs_inner_end");
1930  $this->setVariable("TABS", $a_tabs_html);
1931  }
1932  }
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
touchBlock($block)
overwrites ITX::touchBlock.
blockExists($a_blockname)
check if block exists in actual template private
+ Here is the call graph for this function:

◆ setTitle()

ilTemplate::setTitle (   $a_title)

sets title in standard template

Definition at line 1578 of file class.ilTemplate.php.

References ilUtil\stripScriptHTML().

Referenced by resetHeaderBlock(), and setFullscreenHeader().

1579  {
1580  $this->title = ilUtil::stripScriptHTML($a_title);
1581  $this->header_page_title = $a_title;
1582  }
static stripScriptHTML($a_str, $a_allow="", $a_rm_js=true)
strip only html tags (4.0) from text $allowed contains tags to be allowed, in format tags a and b ar...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setTitleColor()

ilTemplate::setTitleColor (   $a_val)

Set title color.

Parameters
string$a_valcolor

Definition at line 1589 of file class.ilTemplate.php.

Referenced by setFullscreenHeader().

1590  {
1591  $this->title_color = $a_val;
1592  }
+ Here is the caller graph for this function:

◆ setTitleIcon()

ilTemplate::setTitleIcon (   $a_icon_path,
  $a_icon_desc = "" 
)

set title icon

Definition at line 1714 of file class.ilTemplate.php.

Referenced by resetHeaderBlock().

1715  {
1716  $this->icon_desc = $a_icon_desc;
1717  $this->icon_path = $a_icon_path;
1718  }
+ Here is the caller graph for this function:

◆ setTopBar()

ilTemplate::setTopBar (   $a_back_url = null)

Add top toolbar.

Parameters
string$a_back_url

Definition at line 2448 of file class.ilTemplate.php.

References $ilUser, $lng, ilMainMenuGUI\getLanguageSelection(), getLoginTargetPar(), HTML_Template_IT\parseCurrentBlock(), setCurrentBlock(), and HTML_Template_IT\setVariable().

2449  {
2450  global $lng, $ilUser;
2451 
2452  // fallback: desktop overview
2453  if(!$a_back_url && $ilUser->getId() && $ilUser->getId() != ANONYMOUS_USER_ID)
2454  {
2455  $a_back_url = "./ilias.php?baseClass=ilPersonalDesktopGUI&cmd=jumpToSelectedItems";
2456  }
2457 
2458  if($a_back_url)
2459  {
2460  $this->setCurrentBlock("topbar_backlink");
2461  $this->setVariable("TOPBAR_BACK_URL", $a_back_url);
2462  $this->setVariable("TOPBAR_BACK", "&laquo; ".$lng->txt("back"));
2463  $this->parseCurrentBlock();
2464  }
2465 
2466  // user name
2467  if($ilUser->getId() && $ilUser->getId() != ANONYMOUS_USER_ID)
2468  {
2469  $this->setCurrentBlock("topbar_usr_reg");
2470  $this->setVariable("TOPBAR_USER", $ilUser->getFullname());
2471  $this->parseCurrentBlock();
2472  }
2473  // not logged in
2474  else
2475  {
2476  include_once "Services/MainMenu/classes/class.ilMainMenuGUI.php";
2477  $selection = ilMainMenuGUI::getLanguageSelection(true);
2478 
2479  // #13058
2480  $target_str = ($this->getLoginTargetPar() != "")
2481  ? $this->getLoginTargetPar()
2482  : self::buildLoginTarget();
2483 
2484  $this->setCurrentBlock("topbar_usr_ano");
2485  $this->setVariable("TOPBAR_LANGUAGES", $selection);
2486  $this->setVariable("TOPBAR_LOGIN_CAPTION", $lng->txt("login_to_ilias"));
2487  $this->setVariable("TOPBAR_LOGIN_URL", "./login.php?target=".$target_str."&client_id=".rawurlencode(CLIENT_ID)."&cmd=force_login");
2488  $this->parseCurrentBlock();
2489  }
2490 
2491  // $this->touchBlock("fullscreen_topbar");
2492  }
getLoginTargetPar()
Get target parameter for login.
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
static getLanguageSelection($a_in_topbar=false)
setCurrentBlock($part="DEFAULT")
Überladene Funktion, die sich hier lokal noch den aktuellen Block merkt.
parseCurrentBlock()
Parses the current block.
Definition: IT.php:607
global $ilUser
Definition: imgupload.php:15
global $lng
Definition: privfeed.php:40
+ Here is the call graph for this function:

◆ setTreeFlatIcon()

ilTemplate::setTreeFlatIcon (   $a_link,
  $a_mode 
)

set tree/flat icon

Parameters
stringlink target
strongmode ("tree" | "flat")

Definition at line 2099 of file class.ilTemplate.php.

References $lng.

2100  {
2101  global $lng;
2102 
2103  $this->tree_flat_link = $a_link;
2104  $this->tree_flat_mode = $a_mode;
2105  }
global $lng
Definition: privfeed.php:40

◆ setUpperIcon()

ilTemplate::setUpperIcon (   $a_link,
  $a_frame = "" 
)

sets icon to upper level

Definition at line 1945 of file class.ilTemplate.php.

References $lng.

1946  {
1947  global $lng;
1948 
1949  $this->upper_icon = $a_link;
1950  $this->upper_icon_frame = $a_frame;
1951  }
global $lng
Definition: privfeed.php:40

◆ show() [1/2]

ilTemplate::show (   $part = "DEFAULT")

public

Parameters
string

Definition at line 155 of file class.ilTemplate.php.

References $_GET, $_POST, $out, $path, blockExists(), ilSession\clear(), fillJavaScriptFiles(), ilSession\get(), getMessageHTML(), ilSession\set(), and HTML_Template_IT\setVariable().

156  {
157  header('Content-type: text/html; charset=UTF-8');
158 
159  $this->fillJavaScriptFiles();
160 
161  // ERROR HANDLER SETS $_GET["message"] IN CASE OF $error_obj->MESSAGE
162  $ms = array("info", "success", "failure", "question");
163  $out = "";
164 
165  foreach ($ms as $m)
166  {
167  if ($m == "question")
168  {
169  $m = "mess_question";
170  }
171 
172  $txt = (ilSession::get($m) != "")
173  ? ilSession::get($m)
174  : $this->message[$m];
175 
176  if ($m == "mess_question")
177  {
178  $m = "question";
179  }
180 
181  if ($txt != "")
182  {
183  $out.= $this->getMessageHTML($txt, $m);
184  }
185 
186  if ($m == "question")
187  {
188  $m = "mess_question";
189  }
190 
191  if (ilSession::get($m))
192  {
193  ilSession::clear($m);
194  }
195  }
196 
197  if ($this->blockExists("MESSAGE") && $out != "")
198  {
199  $this->setVariable("MESSAGE", $out);
200  }
201 
202  if ($part == "DEFAULT")
203  {
204  parent::show();
205  }
206  else
207  {
208  parent::show($part);
209  }
210 
211  if (((substr(strrchr($_SERVER["PHP_SELF"],"/"),1) != "error.php")
212  && (substr(strrchr($_SERVER["PHP_SELF"],"/"),1) != "adm_menu.php")))
213  {
214  ilSession::set("post_vars", $_POST);
215 
216  // referer is modified if query string contains cmd=gateway and $_POST is not empty.
217  // this is a workaround to display formular again in case of error and if the referer points to another page
218  $url_parts = parse_url($_SERVER["REQUEST_URI"]);
219  if(!$url_parts)
220  {
221  $protocol = (isset($_SERVER['HTTPS']) ? 'https' : 'http').'://';
222  $host = $_SERVER['HTTP_HOST'];
223  $path = $_SERVER['REQUEST_URI'];
224  $url_parts = @parse_url($protocol.$host.$path);
225  }
226 
227  if (preg_match("/cmd=gateway/",$url_parts["query"]))
228  {
229  foreach ($_POST as $key => $val)
230  {
231  if (is_array($val))
232  {
233  $val = key($val);
234  }
235 
236  $str .= "&".$key."=".$val;
237  }
238 
239  ilSession::set("referer",
240  preg_replace("/cmd=gateway/",substr($str,1),$_SERVER["REQUEST_URI"]));
241  ilSession::set("referer_ref_id",
242  (int) $_GET['ref_id']);
243  }
244  else
245  {
246  ilSession::set("referer", $_SERVER["REQUEST_URI"]);
247  ilSession::set("referer_ref_id",
248  (int) $_GET['ref_id']);
249  }
250 
251  ilSession::clear("error_post_vars");
252  }
253  }
$_POST['username']
Definition: cron.php:12
$_GET["client_id"]
static get($a_var)
Get a value.
static set($a_var, $a_val)
Set a value.
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
static clear($a_var)
Unset a value.
getMessageHTML($a_txt, $a_type="info")
Get HTML for a system message.
blockExists($a_blockname)
check if block exists in actual template private
$path
Definition: index.php:22
+ Here is the call graph for this function:

◆ show() [2/2]

ilTemplate::show (   $part = "DEFAULT",
  $a_fill_tabs = true,
  $a_skip_main_menu = false 
)

public

Parameters
string
boolfill template variable {TABS} with content of ilTabs

Definition at line 439 of file class.ilTemplate.php.

References $tpl, addILIASFooter(), blockExists(), fillAdminPanel(), fillBodyClass(), fillContentLanguage(), fillContentStyle(), fillCssFiles(), fillHeader(), fillInlineCss(), fillJavaScriptFiles(), fillLeftContent(), fillLeftNav(), fillLightbox(), fillMainContent(), fillMainMenu(), fillMessage(), fillNewContentStyle(), fillOnLoadCode(), fillPermanentLink(), fillRightContent(), fillScreenReaderFocus(), fillSideIcons(), fillStopFloating(), fillTabs(), fillToolbar(), fillWindowTitle(), getContentType(), getMainMenu(), ilPluginAdmin\getPluginObject(), getTabsHTML(), handleReferer(), IL_COMP_SERVICE, ilYuiUtil\initDom(), initHelp(), ilUIHookPluginGUI\KEEP, HTML_Template_IT\parseCurrentBlock(), setCenterColumnClass(), setCurrentBlock(), and variableExists().

440  {
441  global $ilias, $ilTabs;
442 
443  // include yahoo dom per default
444  include_once("./Services/YUI/classes/class.ilYuiUtil.php");
446 
447 //echo "-".ilUtil::getP3PLocation()."-";
448  //header('P3P: policyref="'.ilUtil::getP3PLocation().
449  // '", CP="CURa ADMa DEVa TAIa PSAa PSDa IVAa IVDa OUR BUS IND UNI COM NAV INT CNT STA PRE"');
450  header('P3P: CP="CURa ADMa DEVa TAIa PSAa PSDa IVAa IVDa OUR BUS IND UNI COM NAV INT CNT STA PRE"');
451  header("Content-type: " . $this->getContentType() . "; charset=UTF-8");
452 
453  $this->fillMessage();
454 
455  // display ILIAS footer
456  if ($part !== false)
457  {
458  $this->addILIASFooter();
459  }
460 
461  // set standard parts (tabs and title icon)
462  $this->fillBodyClass();
463  if ($a_fill_tabs)
464  {
465  if ($this->blockExists("content"))
466  {
467  // determine default screen id
468  $this->getTabsHTML();
469  }
470 
471  // to get also the js files for the main menu
472  if (!$a_skip_main_menu)
473  {
474  $this->getMainMenu();
475  $this->initHelp();
476  }
477 
478  if($this->blockExists("content") && $this->variableExists('MAINMENU'))
479  {
480  global $tpl;
481 
482  include_once 'Services/Authentication/classes/class.ilSessionReminderGUI.php';
483  $session_reminder_gui = new ilSessionReminderGUI(ilSessionReminder::createInstanceWithCurrentUserSession());
484  $tpl->setVariable('SESSION_REMINDER', $session_reminder_gui->getHtml());
485  }
486 
487  // these fill blocks in tpl.main.html
488  $this->fillCssFiles();
489  $this->fillInlineCss();
490  //$this->fillJavaScriptFiles();
491  $this->fillContentStyle();
492 
493  // these fill just plain placeholder variables in tpl.main.html
494  $this->setCurrentBlock("DEFAULT");
495  $this->fillNewContentStyle();
496  $this->fillContentLanguage();
497  $this->fillWindowTitle();
498 
499  // these fill blocks in tpl.adm_content.html
500  $this->fillHeader();
501  $this->fillSideIcons();
502  $this->fillScreenReaderFocus();
503  $this->fillStopFloating();
504  $this->fillLeftContent();
505  $this->fillLeftNav();
506  $this->fillRightContent();
507  $this->fillAdminPanel();
508  $this->fillToolbar();
509  $this->fillPermanentLink();
510 
511  $this->setCenterColumnClass();
512 
513  // late loading of javascipr files, since operations above may add files
514  $this->fillJavaScriptFiles();
515  $this->fillOnLoadCode();
516 
517  // these fill just plain placeholder variables in tpl.adm_content.html
518  // these fill just plain placeholder variables in tpl.adm_content.html
519  if ($this->blockExists("content"))
520  {
521  $this->setCurrentBlock("content");
522  $this->fillTabs();
523  $this->fillMainContent();
524  $this->fillMainMenu();
525  $this->fillLightbox();
526  $this->parseCurrentBlock();
527  }
528  }
529 
530  if ($part == "DEFAULT" or is_bool($part))
531  {
532  $html = parent::get();
533  }
534  else
535  {
536  $html = parent::get($part);
537  }
538 
539  // include the template output hook
540  global $ilPluginAdmin;
541  $pl_names = $ilPluginAdmin->getActivePluginsForSlot(IL_COMP_SERVICE, "UIComponent", "uihk");
542  foreach ($pl_names as $pl)
543  {
544  $ui_plugin = ilPluginAdmin::getPluginObject(IL_COMP_SERVICE, "UIComponent", "uihk", $pl);
545  $gui_class = $ui_plugin->getUIClassInstance();
546 
547  $resp = $gui_class->getHTML("", "template_show",
548  array("tpl_id" => $this->tplIdentifier, "tpl_obj" => $this, "html" => $html));
549 
550  if ($resp["mode"] != ilUIHookPluginGUI::KEEP)
551  {
552  $html = $gui_class->modifyHTML($html, $resp);
553  }
554  }
555 
556  print $html;
557 
558  $this->handleReferer();
559  }
fillNewContentStyle()
Fill Content Style.
fillScreenReaderFocus()
Accessibility focus for screen readers.
getTabsHTML()
Get tabs HTML.
fillPermanentLink()
Fill in permanent link.
fillLeftContent()
Fill left content.
fillOnLoadCode()
Fill add on load code.
fillStopFloating()
stop floating
fillHeader()
Fill header.
fillAdminPanel()
Put admin panel into template:
fillSideIcons()
Fill side icons (upper icon, tree icon, webfolder icon)
static initDom()
Init YUI Dom.
fillLeftNav()
Fill left navigation frame.
initHelp()
Init help.
static getPluginObject($a_ctype, $a_cname, $a_slot_id, $a_pname)
Get Plugin Object.
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl
fillLightbox()
Fill lightbox content.
fillRightContent()
Fill right content.
fillContentLanguage()
Add current user language to meta tags.
setCurrentBlock($part="DEFAULT")
Überladene Funktion, die sich hier lokal noch den aktuellen Block merkt.
parseCurrentBlock()
Parses the current block.
Definition: IT.php:607
handleReferer()
TODO: this is nice, but shouldn&#39;t be done here (-> maybe at the end of ilias.php!?, alex)
getContentType()
Get the content type for the template output.
fillCssFiles($a_force=false)
Fill in the css file tags.
blockExists($a_blockname)
check if block exists in actual template private
fillMainContent()
Fill main content.
fillContentStyle()
Fill Content Style.
fillInlineCss()
Fill in the inline css.
variableExists($a_variablename)
addILIASFooter()
add ILIAS footer
const IL_COMP_SERVICE
+ Here is the call graph for this function:

◆ stopTitleFloating()

ilTemplate::stopTitleFloating ( )

set stop floating (if no tabs are used)

Definition at line 1752 of file class.ilTemplate.php.

1753  {
1754  $this->stop_floating = true;
1755  }

◆ touchBlock() [1/2]

ilTemplate::touchBlock (   $block)

overwrites ITX::touchBlock.

public

Parameters
string
Returns
???

Definition at line 299 of file class.ilTemplate.php.

References HTML_Template_IT\parseCurrentBlock(), and setCurrentBlock().

300  {
301  $this->setCurrentBlock($block);
302  //$count = $this->fillVars();
303  $this->parseCurrentBlock();
304 
305  if ($count == 0)
306  {
307  parent::touchBlock($block);
308  }
309  }
setCurrentBlock($part="DEFAULT")
Überladene Funktion, die sich hier lokal noch den aktuellen Block merkt.
parseCurrentBlock()
Parses the current block.
Definition: IT.php:607
+ Here is the call graph for this function:

◆ touchBlock() [2/2]

ilTemplate::touchBlock (   $block)

overwrites ITX::touchBlock.

public

Parameters
string
Returns
???

Definition at line 1159 of file class.ilTemplate.php.

References fillVars(), HTML_Template_IT\parseCurrentBlock(), and setCurrentBlock().

Referenced by fillHeader(), fillLeftNav(), fillPageFormAction(), fillScreenReaderFocus(), fillSideIcons(), fillStopFloating(), fillTabs(), and setTabs().

1160  {
1161  $this->setCurrentBlock($block);
1162  $count = $this->fillVars();
1163  $this->parseCurrentBlock();
1164 
1165  if ($count == 0)
1166  {
1167  parent::touchBlock($block);
1168  }
1169  }
setCurrentBlock($part="DEFAULT")
Überladene Funktion, die sich hier lokal noch den aktuellen Block merkt.
parseCurrentBlock()
Parses the current block.
Definition: IT.php:607
fillVars()
all template vars defined in $vars will be replaced automatically without setting and parsing them wi...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ variableExists()

ilTemplate::variableExists (   $a_variablename)
private

Definition at line 1101 of file class.ilTemplate.php.

Referenced by fillMainMenu(), getMainMenu(), and show().

1102  {
1103  return (isset($this->blockvariables["content"][$a_variablename]) ? true : false);
1104  }
+ Here is the caller graph for this function:

Field Documentation

◆ $activeBlock

ilTemplate::$activeBlock

Definition at line 30 of file class.ilTemplate.php.

Referenced by parseCurrentBlock().

◆ $addFooter

ilTemplate::$addFooter
private

Definition at line 39 of file class.ilTemplate.php.

Referenced by getAddFooter().

◆ $admin_panel_commands

ilTemplate::$admin_panel_commands = array()

Definition at line 37 of file class.ilTemplate.php.

◆ $content_style_sheet

ilTemplate::$content_style_sheet = ""
protected

Definition at line 52 of file class.ilTemplate.php.

◆ $contenttype

ilTemplate::$contenttype

Definition at line 17 of file class.ilTemplate.php.

Referenced by getContentType().

◆ $css_files

ilTemplate::$css_files = array()

Definition at line 35 of file class.ilTemplate.php.

◆ $frame_fixed_width

ilTemplate::$frame_fixed_width = false
protected

Definition at line 53 of file class.ilTemplate.php.

◆ $header_action

ilTemplate::$header_action
protected

Definition at line 56 of file class.ilTemplate.php.

Referenced by getHeaderActionMenu().

◆ $il_cache

ilTemplate::$il_cache = array()
staticprotected

Definition at line 41 of file class.ilTemplate.php.

◆ $inline_css

ilTemplate::$inline_css = array()

Definition at line 36 of file class.ilTemplate.php.

◆ $js_files

ilTemplate::$js_files = array(0 => "./Services/JavaScript/js/Basic.js")

Definition at line 32 of file class.ilTemplate.php.

◆ $js_files_batch

ilTemplate::$js_files_batch = array("./Services/JavaScript/js/Basic.js" => 1)

Definition at line 34 of file class.ilTemplate.php.

◆ $js_files_vp

ilTemplate::$js_files_vp = array("./Services/JavaScript/js/Basic.js" => true)

Definition at line 33 of file class.ilTemplate.php.

◆ $lightbox

ilTemplate::$lightbox = array()
protected

Definition at line 57 of file class.ilTemplate.php.

◆ $message

ilTemplate::$message = ""
protected

Definition at line 42 of file class.ilTemplate.php.

◆ $mount_webfolder

ilTemplate::$mount_webfolder = ""
protected

Definition at line 47 of file class.ilTemplate.php.

Referenced by fillSideIcons().

◆ $page_actions

ilTemplate::$page_actions = array()
protected

Definition at line 50 of file class.ilTemplate.php.

◆ $page_form_action

ilTemplate::$page_form_action = ""
protected

Definition at line 49 of file class.ilTemplate.php.

◆ $permanent_link

ilTemplate::$permanent_link = false
protected

Definition at line 51 of file class.ilTemplate.php.

◆ $stop_floating

ilTemplate::$stop_floating = ""
protected

Definition at line 48 of file class.ilTemplate.php.

◆ $title_alerts

ilTemplate::$title_alerts = array()
protected

Definition at line 55 of file class.ilTemplate.php.

◆ $title_desc

ilTemplate::$title_desc = ""
protected

Definition at line 44 of file class.ilTemplate.php.

◆ $tree_flat_link

ilTemplate::$tree_flat_link = ""
protected

Definition at line 46 of file class.ilTemplate.php.

◆ $upper_icon

ilTemplate::$upper_icon = ""
protected

Definition at line 45 of file class.ilTemplate.php.

◆ $vars

ilTemplate::$vars

Definition at line 22 of file class.ilTemplate.php.


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