summaryrefslogtreecommitdiff
path: root/smartyplugins
diff options
context:
space:
mode:
authorLester Caine <lester@lsces.co.uk>2026-06-04 11:31:57 +0100
committerLester Caine <lester@lsces.co.uk>2026-06-04 11:31:57 +0100
commit36577d9f599a3dd8e2c7f44aa27daf49280ee435 (patch)
tree24d6676fa8d5b0d0eb3acb33dabd9f7a0adcda8f /smartyplugins
parentde955c85fc44c2f437af523b4a19c2bf4a8e3cb7 (diff)
downloadthemes-36577d9f599a3dd8e2c7f44aa27daf49280ee435.tar.gz
themes-36577d9f599a3dd8e2c7f44aa27daf49280ee435.tar.bz2
themes-36577d9f599a3dd8e2c7f44aa27daf49280ee435.zip
Convert {booticon} to {biticon} — freedesktop/tango icon names throughout
Replace all {booticon iname="icon-*"} and {booticon iname="fa-*"} calls with {biticon ipackage="icons" iname="<freedesktop-name>"} using the tango iconset. Mapping covers ~70 distinct old names to tango equivalents (edit-delete, document-properties, go-next, lock, internet-mail, etc.). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'smartyplugins')
-rwxr-xr-xsmartyplugins/function.bithelp.php4
-rwxr-xr-xsmartyplugins/function.booticon.php2
-rwxr-xr-xsmartyplugins/function.smartlink.php21
3 files changed, 13 insertions, 14 deletions
diff --git a/smartyplugins/function.bithelp.php b/smartyplugins/function.bithelp.php
index a174e77..d16d578 100755
--- a/smartyplugins/function.bithelp.php
+++ b/smartyplugins/function.bithelp.php
@@ -19,10 +19,10 @@ function smarty_function_bithelp($params, &$gBitSmarty) {
$outstr = "";
if( $gBitSystem->isFeatureActive('site_online_help') ){
if($gBitUser->hasPermission( 'p_admin' )){
- $outstr .= "<a href=\"".KERNEL_PKG_URL."admin/index.php\">".smarty_function_booticon(['ipackage'=>'icons', 'iname'=>'icon-cogs', 'iexplain'=>'Administration Menu'] )."</a> ";
+ $outstr .= "<a href=\"".KERNEL_PKG_URL."admin/index.php\">".smarty_function_biticon(['ipackage'=>'icons', 'iname'=>'icon-cogs', 'iexplain'=>'Administration Menu'] )."</a> ";
}
if( $helpInfo = $gBitSmarty->getTemplateVars('TikiHelpInfo') ) {
- $outstr .= "<a href=\"".$helpInfo["URL"]."\" >".smarty_function_booticon(['ipackage'=>'icons', 'iname'=>'icon-question-sign', 'iexplain'=>(empty($helpInfo["Desc"])?"help":$helpInfo["Desc"])] )."</a>";
+ $outstr .= "<a href=\"".$helpInfo["URL"]."\" >".smarty_function_biticon(['ipackage'=>'icons', 'iname'=>'icon-question-sign', 'iexplain'=>(empty($helpInfo["Desc"])?"help":$helpInfo["Desc"])] )."</a>";
}
}
return $outstr;
diff --git a/smartyplugins/function.booticon.php b/smartyplugins/function.booticon.php
index 78d82df..bd70e98 100755
--- a/smartyplugins/function.booticon.php
+++ b/smartyplugins/function.booticon.php
@@ -20,7 +20,7 @@ namespace Bitweaver\Plugins;
* @access public
* @return string Full <img> on success
*/
-function smarty_function_booticon( $pParams ) {
+function smarty_function_biticon( $pParams ) {
global $gBitSystem;
if( empty( $pParams['iforce'] )) {
diff --git a/smartyplugins/function.smartlink.php b/smartyplugins/function.smartlink.php
index a867ce6..94e204b 100755
--- a/smartyplugins/function.smartlink.php
+++ b/smartyplugins/function.smartlink.php
@@ -126,7 +126,7 @@ function smarty_function_smartlink( $pParams, &$pSmarty=NULL ) {
}
}
- $ignore = [ 'iatitle', 'icontrol', 'isort', 'ianchor', 'isort_mode', 'iorder', 'ititle', 'idefault', 'ifile', 'ipackage', 'itype', 'iurl', 'ionclick', 'ibiticon', 'booticon', 'iforce', 'itra' ];
+ $ignore = [ 'iatitle', 'icontrol', 'isort', 'ianchor', 'isort_mode', 'iorder', 'ititle', 'idefault', 'ifile', 'ipackage', 'itype', 'iurl', 'ionclick', 'ibiticon', 'booticon', 'biticon', 'iforce', 'itra' ];
// append any other paramters that were passed in
foreach( $hash as $key => $val ) {
if( !empty( $val ) && !in_array( $key, $ignore ) ) {
@@ -168,18 +168,17 @@ function smarty_function_smartlink( $pParams, &$pSmarty=NULL ) {
$ret = '<a class="icon" '.$atitle.' '.( !empty( $pParams['ionclick'] ) ? 'onclick="'.$pParams['ionclick'].'" ' : '' ).'href="'.$url.$url_params.( !empty( $pParams['ianchor'] ) ? '#'.$pParams['ianchor'] : '' ).'">';
// if we want to display an icon instead of text, do that
- if( isset( $hash['booticon'] ) ) {
- // if( !empty( $tmp[2] )) {
- // $tmp[1] .= "/".$tmp[2];
- // }
- $booticon = [
- 'iname' => $hash['booticon'],
- 'iexplain' => $hash['ititle'], // use untranslated ititle - booticon has a KernelTools::tra()
+ if( isset( $hash['biticon'] ) || isset( $hash['booticon'] ) ) {
+ $iname = $hash['biticon'] ?? $hash['booticon'];
+ $biticon = [
+ 'ipackage' => 'icons',
+ 'iname' => $iname,
+ 'iexplain' => $hash['ititle'],
];
if( !empty( $hash['iforce'] ) ) {
- $booticon['iforce'] = $hash['iforce'];
+ $biticon['iforce'] = $hash['iforce'];
}
- $ret .= smarty_function_booticon( $booticon );
+ $ret .= smarty_function_biticon( $biticon );
} elseif( isset( $hash['ibiticon'] ) ) {
$tmp = explode( '/', $hash['ibiticon'] );
if( !empty( $tmp[2] )) {
@@ -199,7 +198,7 @@ function smarty_function_smartlink( $pParams, &$pSmarty=NULL ) {
}
if( isset( $sorticon ) ) {
- $ret .= '&nbsp;'.smarty_function_booticon( $sorticon );
+ $ret .= '&nbsp;'.smarty_function_biticon( $sorticon );
}
$ret .= '</a>';
}