diff options
| -rwxr-xr-x | icon_browser.php | 19 | ||||
| -rwxr-xr-x | smartyplugins/function.biticon.php | 15 |
2 files changed, 7 insertions, 27 deletions
diff --git a/icon_browser.php b/icon_browser.php index 52cbadc..f542bc7 100755 --- a/icon_browser.php +++ b/icon_browser.php @@ -55,8 +55,7 @@ $iconUsage = [ "dialog-warning" => "Warning", "dialog-error" => "Error", "dialog-information" => "Information / announcement", - "dialog-cancel" => "Cancel", - "process-stop" => "Stop / cancel / disable", + "process-stop" => "Stop / cancel / disable / unsubscribed", "emblem-important" => "Required / flagged / asterisk", // Communication "internet-mail" => "Email / envelope / inbox", @@ -76,9 +75,8 @@ $iconUsage = [ "preferences-system-network-proxy" => "Telephone / contact", // Emblems "emblem-favorite" => "Bookmark / tag / favourite", - "emblem-shared" => "Shared / unlocked", - "emblem-symbolic-link" => "Link", - "emblem-downloads" => "Download emblem", + "emblem-shared" => "Shared / unlocked (boards: moved topic)", + "emblem-symbolic-link" => "Link / moved thread", "emblem-photos" => "Photos emblem", // Media "camera-photo" => "Camera / photo", @@ -150,7 +148,7 @@ function icon_fetcher( $pStyle = DEFAULT_ICON_STYLE ) { if( strpos( $pStyle, '.' ) !== 0 && $pStyle != 'CVS' ) { $stylePath = UTIL_PKG_PATH."iconsets/".$pStyle; - // Primary: scalable SVGs give the most complete name list + // Iconsets are SVG-only: list from scalable/ if( is_dir( $stylePath."/scalable" )) { foreach( scandir( $stylePath."/scalable" ) as $icon ) { if( preg_match( "#\.svg$#", $icon )) { @@ -160,15 +158,6 @@ function icon_fetcher( $pStyle = DEFAULT_ICON_STYLE ) { } } - // Supplement with large PNGs not covered by scalable - if( is_dir( $stylePath."/large" )) { - foreach( scandir( $stylePath."/large" ) as $icon ) { - if( preg_match( "#\.png$#", $icon ) && !preg_match( "#^process-working\.#", $icon )) { - $name = substr( $icon, 0, -4 ); - $ret[$name] ??= $name; - } - } - } } ksort( $ret ); return $ret; diff --git a/smartyplugins/function.biticon.php b/smartyplugins/function.biticon.php index e219036..adc4edb 100755 --- a/smartyplugins/function.biticon.php +++ b/smartyplugins/function.biticon.php @@ -172,22 +172,13 @@ function smarty_function_biticon( $pParams, $pSmall = false ) { // violators will be poked with soft cushions by the Cardinal himself!!! $icon_style = !empty( $pParams['istyle'] ) ? $pParams['istyle'] : $gBitSystem->getConfig( 'site_icon_style', DEFAULT_ICON_STYLE ); - if( false !== ( $matchFile = biticon_first_match( UTIL_PKG_PATH."iconsets/$icon_style".$pParams['ipath'], $pParams['iname'] ))) { - return biticon_output( $pParams, UTIL_PKG_URL."iconsets/$icon_style".$pParams['ipath'].$matchFile ); - } - - if( $icon_style != DEFAULT_ICON_STYLE && false !== ( $matchFile = biticon_first_match( UTIL_PKG_PATH."iconsets/".DEFAULT_ICON_STYLE.$pParams['ipath'], $pParams['iname'] ))) { - return biticon_output( $pParams, UTIL_PKG_URL."iconsets/".DEFAULT_ICON_STYLE.$pParams['ipath'].$matchFile ); - } - - // SVG fallback: raster not found, try scalable/ directory - $isize = trim( $pParams['ipath'], '/' ); + // Iconsets are SVG-only: serve from scalable/ at ipath-derived dimensions. + // ipath (/small/, /medium/, /large/) is preserved for cache key differentiation. + $pParams['isize'] = trim( $pParams['ipath'], '/' ); if( false !== ( $matchFile = biticon_first_match( UTIL_PKG_PATH."iconsets/$icon_style/scalable/", $pParams['iname'], ['svg'] ))) { - $pParams['isize'] = $isize; return biticon_output( $pParams, UTIL_PKG_URL."iconsets/$icon_style/scalable/".$matchFile ); } if( $icon_style != DEFAULT_ICON_STYLE && false !== ( $matchFile = biticon_first_match( UTIL_PKG_PATH."iconsets/".DEFAULT_ICON_STYLE."/scalable/", $pParams['iname'], ['svg'] ))) { - $pParams['isize'] = $isize; return biticon_output( $pParams, UTIL_PKG_URL."iconsets/".DEFAULT_ICON_STYLE."/scalable/".$matchFile ); } |
