summaryrefslogtreecommitdiff
path: root/inc/template.php
diff options
context:
space:
mode:
authorMichael Klier <chi@chimeric.de>2009-01-27 22:50:01 +0100
committerMichael Klier <chi@chimeric.de>2009-01-27 22:50:01 +0100
commit4cefd2161b53492fb26682c4068002040986b7e4 (patch)
treea876e2748d2401fa2900a4fab20d0f1dc444504d /inc/template.php
parentaf2408d59bbe5e59c6c6b3a8125e6b512a887663 (diff)
downloadrpg-4cefd2161b53492fb26682c4068002040986b7e4.tar.gz
rpg-4cefd2161b53492fb26682c4068002040986b7e4.tar.bz2
tpl_license() more flexible for template authors
darcs-hash:20090127215001-23886-194fb0b92b259bd915f27eeb3300dba2bc330d26.gz
Diffstat (limited to 'inc/template.php')
-rw-r--r--inc/template.php16
1 files changed, 9 insertions, 7 deletions
diff --git a/inc/template.php b/inc/template.php
index 71eec0e6a..e108a843b 100644
--- a/inc/template.php
+++ b/inc/template.php
@@ -1303,7 +1303,7 @@ function tpl_actiondropdown($empty='',$button='&gt;'){
* @param string $img - print image? (|button|badge)
* @param bool $return - when true don't print, but return HTML
*/
-function tpl_license($img='badge',$return=false){
+function tpl_license($img='badge',$imgonly=false,$return=false){
global $license;
global $conf;
global $lang;
@@ -1311,7 +1311,7 @@ function tpl_license($img='badge',$return=false){
if(!is_array($license[$conf['license']])) return '';
$lic = $license[$conf['license']];
- $out = '<p class="license">';
+ $out = '<div class="license">';
if($img){
$src = license_img($img);
if($src){
@@ -1320,11 +1320,13 @@ function tpl_license($img='badge',$return=false){
$out .= '><img src="'.DOKU_BASE.$src.'" class="medialeft lic'.$img.'" alt="'.$lic['name'].'" /></a> ';
}
}
- $out .= $lang['license'];
- $out .= '<a href="'.$lic['url'].'" rel="license" class="urlextern"';
- if($conf['target']['external']) $out .= ' target="'.$conf['target']['external'].'"';
- $out .= '>'.$lic['name'].'</a>';
- $out .= '</p>';
+ if(!$imgonly) {
+ $out .= $lang['license'];
+ $out .= '<a href="'.$lic['url'].'" rel="license" class="urlextern"';
+ if($conf['target']['external']) $out .= ' target="'.$conf['target']['external'].'"';
+ $out .= '>'.$lic['name'].'</a>';
+ $out .= '</div>';
+ }
if($return) return $out;
echo $out;