| [ Index ] |
PHP Cross Reference of DokuWiki |
[Source view] [Print] [Project Stats]
DokuWiki template functions
| Author: | Andreas Gohr |
| License: | GPL 2 (http://www.gnu.org/licenses/gpl.html) |
| File Size: | 1649 lines (49 kb) |
| Included or required: | 1 time |
| Referenced: | 0 times |
| Includes or requires: | 1 file lib/exe/mediamanager.php |
| template($tpl) X-Ref |
| Returns the path to the given template, uses default one if the custom version doesn't exist. author: Andreas Gohr <andi@splitbrain.org> |
| tpl_incdir() X-Ref |
| Convenience function to access template dir from local FS This replaces the deprecated DOKU_TPLINC constant author: Andreas Gohr <andi@splitbrain.org> |
| tpl_basedir() X-Ref |
| Convenience function to access template dir from web This replaces the deprecated DOKU_TPL constant author: Andreas Gohr <andi@splitbrain.org> |
| tpl_content($prependTOC=true) X-Ref |
| Print the content This function is used for printing all the usual content (defined by the global $ACT var) by calling the appropriate outputfunction(s) from html.php Everything that doesn't use the main template file isn't handled by this function. ACL stuff is not done here either. author: Andreas Gohr <andi@splitbrain.org> |
| tpl_content_core() X-Ref |
| No description |
| tpl_toc($return=false) X-Ref |
| Places the TOC where the function is called If you use this you most probably want to call tpl_content with a false argument author: Andreas Gohr <andi@splitbrain.org> |
| tpl_admin() X-Ref |
| Handle the admin page contents author: Andreas Gohr <andi@splitbrain.org> |
| tpl_metaheaders($alt=true) X-Ref |
| Print the correct HTML meta headers This has to go into the head section of your template. author: Andreas Gohr <andi@splitbrain.org> triggers: TPL_METAHEADER_OUTPUT param: boolean $alt Should feeds and alternative format links be added? |
| _tpl_metaheaders_action($data) X-Ref |
| prints the array build by tpl_metaheaders $data is an array of different header tags. Each tag can have multiple instances. Attributes are given as key value pairs. Values will be HTML encoded automatically so they should be provided as is in the $data array. For tags having a body attribute specify the the body data in the special attribute '_data'. This field will NOT BE ESCAPED automatically. author: Andreas Gohr <andi@splitbrain.org> |
| tpl_link($url,$name,$more='',$return=false) X-Ref |
| Print a link Just builds a link. author: Andreas Gohr <andi@splitbrain.org> |
| tpl_pagelink($id,$name=null) X-Ref |
| Prints a link to a WikiPage Wrapper around html_wikilink author: Andreas Gohr <andi@splitbrain.org> |
| tpl_getparent($id) X-Ref |
| get the parent page Tries to find out which page is parent. returns false if none is available author: Andreas Gohr <andi@splitbrain.org> |
| tpl_button($type,$return=false) X-Ref |
| Print one of the buttons author: Adrian Lang <mail@adrianlang.de> see: tpl_get_action |
| tpl_actionlink($type,$pre='',$suf='',$inner='',$return=false) X-Ref |
| Like the action buttons but links author: Adrian Lang <mail@adrianlang.de> see: tpl_get_action |
| tpl_get_action($type) X-Ref |
| Check the actions and get data for buttons and links Available actions are edit - edit/create/show/draft history - old revisions recent - recent changes login - login/logout - if ACL enabled profile - user profile (if logged in) index - The index admin - admin page - if enough rights top - back to top back - back to parent - if available backlink - links to the list of backlinks subscribe/subscription- subscribe/unsubscribe author: Andreas Gohr <andi@splitbrain.org> author: Matthias Grimm <matthiasgrimm@users.sourceforge.net> author: Adrian Lang <mail@adrianlang.de> |
| tpl_action($type,$link=0,$wrapper=false,$return=false,$pre='',$suf='',$inner='') X-Ref |
| Wrapper around tpl_button() and tpl_actionlink() author: Anika Henke <anika@selfthinker.org> |
| tpl_searchform($ajax=true,$autocomplete=true) X-Ref |
| Print the search form If the first parameter is given a div with the ID 'qsearch_out' will be added which instructs the ajax pagequicksearch to kick in and place its output into this div. The second parameter controls the propritary attribute autocomplete. If set to false this attribute will be set with an value of "off" to instruct the browser to disable it's own built in autocompletion feature (MSIE and Firefox) author: Andreas Gohr <andi@splitbrain.org> |
| tpl_breadcrumbs($sep='•') X-Ref |
| Print the breadcrumbs trace author: Andreas Gohr <andi@splitbrain.org> |
| tpl_youarehere($sep=' » ') X-Ref |
| Hierarchical breadcrumbs This code was suggested as replacement for the usual breadcrumbs. It only makes sense with a deep site structure. author: Andreas Gohr <andi@splitbrain.org> author: Nigel McNie <oracle.shinoda@gmail.com> author: Sean Coates <sean@caedmon.net> author: <fredrik@averpil.com> |
| tpl_userinfo() X-Ref |
| Print info if the user is logged in and show full name in that case Could be enhanced with a profile link in future? author: Andreas Gohr <andi@splitbrain.org> |
| tpl_pageinfo($ret=false) X-Ref |
| Print some info about the current page author: Andreas Gohr <andi@splitbrain.org> |
| tpl_pagetitle($id=null, $ret=false) X-Ref |
| Prints or returns the name of the given page (current one if none given). If useheading is enabled this will use the first headline else the given ID is used. author: Andreas Gohr <andi@splitbrain.org> |
| tpl_img_getTag($tags,$alt='',$src=null) X-Ref |
| Returns the requested EXIF/IPTC tag from the current image If $tags is an array all given tags are tried until a value is found. If no value is found $alt is returned. Which texts are known is defined in the functions _exifTagNames and _iptcTagNames() in inc/jpeg.php (You need to prepend IPTC to the names of the latter one) Only allowed in: detail.php author: Andreas Gohr <andi@splitbrain.org> |
| tpl_img($maxwidth=0,$maxheight=0,$link=true,$params=null) X-Ref |
| Prints the image with a link to the full sized version Only allowed in: detail.php param: $maxwidth int - maximal width of the image param: $maxheight int - maximal height of the image param: $link bool - link to the orginal size? param: $params array - additional image attributes |
| _tpl_img_action($data, $param=null) X-Ref |
| Default action for TPL_IMG_DISPLAY |
| tpl_indexerWebBug() X-Ref |
| This function inserts a small gif which in reality is the indexer function. Should be called somewhere at the very end of the main.php template |
| tpl_getConf($id) X-Ref |
| tpl_getConf($id) use this function to access template configuration variables |
| tpl_loadConfig() X-Ref |
| tpl_loadConfig() reads all template configuration variables this function is automatically called by tpl_getConf() |
| tpl_getLang($id) X-Ref |
| tpl_getLang($id) use this function to access template language variables |
| tpl_mediaContent($fromajax=false) X-Ref |
| prints the "main content" in the mediamanger popup Depending on the user's actions this may be a list of files in a namespace, the meta editing dialog or a message of referencing pages Only allowed in mediamanager.php author: Andreas Gohr <andi@splitbrain.org> triggers: MEDIAMANAGER_CONTENT_OUTPUT param: bool $fromajax - set true when calling this function via ajax |
| tpl_mediaFileList() X-Ref |
| Prints the central column in full-screen media manager Depending on the opened tab this may be a list of files in a namespace, upload form or search form author: Kate Arzamastseva <pshns@ukr.net> |
| tpl_mediaFileDetails($image, $rev) X-Ref |
| Prints the third column in full-screen media manager Depending on the opened tab this may be details of the selected file, the meta editing dialog or list of file revisions author: Kate Arzamastseva <pshns@ukr.net> |
| tpl_mediaTree() X-Ref |
| prints the namespace tree in the mediamanger popup Only allowed in mediamanager.php author: Andreas Gohr <andi@splitbrain.org> |
| tpl_actiondropdown($empty='',$button='>') X-Ref |
| Print a dropdown menu with all DokuWiki actions Note: this will not use any pretty URLs author: Andreas Gohr <andi@splitbrain.org> |
| tpl_license($img='badge',$imgonly=false,$return=false,$wrap=true) X-Ref |
| Print a informational line about the used license author: Andreas Gohr <andi@splitbrain.org> param: string $img - print image? (|button|badge) param: bool $return - when true don't print, but return HTML param: bool $wrap - wrap in div with class="license"? |
| tpl_include_page($pageid,$print=true) X-Ref |
| Includes the rendered XHTML of a given page This function is useful to populate sidebars or similar features in a template |
| tpl_subscribe() X-Ref |
| Display the subscribe form author: Adrian Lang <lang@cosmocode.de> |
| tpl_flush() X-Ref |
| Tries to send already created content right to the browser Wraps around ob_flush() and flush() author: Andreas Gohr <andi@splitbrain.org> |
| tpl_getMediaFile($search, $abs=false, &$imginfo=null) X-Ref |
| Tries to find a ressource file in the given locations. If a given location starts with a colon it is assumed to be a media file, otherwise it is assumed to be relative to the current template author: Andreas Gohr <andi@splitbrain.org> param: array $search locations to look at param: bool $abs if to use absolute URL param: arrayref $imginfo filled with getimagesize() |
| tpl_includeFile($file) X-Ref |
| PHP include a file either from the conf directory if it exists, otherwise use file in the template's root directory. The function honours config cascade settings and looks for the given file next to the ´main´ config files, in the order protected, local, default. Note: no escaping or sanity checking is done here. Never pass user input to this function! author: Anika Henke <anika@selfthinker.org> author: Andreas Gohr <andi@splitbrain.org> |
| tpl_getFavicon($abs=false, $fileName='favicon.ico') X-Ref |
| Returns icon from data/media root directory if it exists, otherwise the one in the template's image directory. author: Anika Henke <anika@selfthinker.org> |
| tpl_favicon($types=array('favicon') X-Ref |
| Returns <link> tag for various icon types (favicon|mobile|generic) author: Anika Henke <anika@selfthinker.org> param: array $types - list of icon types to display (favicon|mobile|generic) |
| tpl_media() X-Ref |
| Prints full-screen media manager author: Kate Arzamastseva <pshns@ukr.net> |
| Generated: Wed May 23 03:00:10 2012 | Cross-referenced by PHPXref 0.7 |