[ Index ] |
|
Code source de DokuWiki 2006-11-06 |
[Code source] [Imprimer] [Statistiques]
DokuWiki template functions
Author: | Andreas Gohr <andi@splitbrain.org> |
License: | GPL 2 (http://www.gnu.org/licenses/gpl.html) |
Poids: | 981 lignes (28 kb) |
Inclus ou requis: | 3 fois |
Référencé: | 0 fois |
Nécessite: | 1 fichier inc/toolbar.php |
template($tpl) X-Ref |
Returns the path to the given template, uses default one if the custom version doesn't exist. Also enables gzip compression if configured. author: Andreas Gohr <andi@splitbrain.org> |
tpl_content() 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 |
Pas de description |
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> 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='') 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) X-Ref |
Print one of the buttons Available Buttons are edit - edit/create/show/draft button history - old revisions recent - recent changes login - login/logout button - if ACL enabled profile - user profile button (if logged in) index - The index admin - admin page - if enough rights top - a back to top button back - a back to parent button - if available backtomedia - returns to the mediafile upload dialog after references have been displayed backlink - links to the list of backlinks subscription- subscribe/unsubscribe button author: Andreas Gohr <andi@splitbrain.org> author: Matthias Grimm <matthiasgrimm@users.sourceforge.net> |
tpl_actionlink($type,$pre='',$suf='') X-Ref |
Like the action buttons but links Available links are edit - edit/create/show link history - old revisions recent - recent changes login - login/logout link - if ACL enabled profile - user profile link (if logged in) index - The index admin - admin page - if enough rights top - a back to top link back - a back to parent link - if available backlink - links to the list of backlinks subscribe/subscription - subscribe/unsubscribe link author: Andreas Gohr <andi@splitbrain.org> author: Matthias Grimm <matthiasgrimm@users.sourceforge.net> |
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() 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> |
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() 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) X-Ref |
Prints the image with a link to the full sized version Only allowed in: detail.php |
tpl_indexerWebBug() X-Ref |
This function inserts a 1x1 pixel gif which in reality is the inexer 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_mediaContent() 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> |
tpl_mediaTree() X-Ref |
prints the namespace tree in the mediamanger popup Only allowed in mediamanager.php author: Andreas Gohr <andi@splitbrain.org> |
Généré le : Tue Apr 3 20:47:31 2007 | par Balluche grâce à PHPXref 0.7 |