diff options
| author | Lester Caine <lester@lsces.co.uk> | 2026-06-04 13:17:17 +0100 |
|---|---|---|
| committer | Lester Caine <lester@lsces.co.uk> | 2026-06-04 13:17:17 +0100 |
| commit | a64b642809ae64d1d6268ffc7c99d59dad57d41e (patch) | |
| tree | 2660e4334c31edf0990a3be83213460bfad1b20f | |
| parent | 256142a9f228999f42410b24aa2b4e46341a2e71 (diff) | |
| download | themes-a64b642809ae64d1d6268ffc7c99d59dad57d41e.tar.gz themes-a64b642809ae64d1d6268ffc7c99d59dad57d41e.tar.bz2 themes-a64b642809ae64d1d6268ffc7c99d59dad57d41e.zip | |
Switch iconset to SVG-only — drop small/medium/large PNG directories
All iconset icons (ipackage=icons) now served from scalable/ as SVGs.
ipath (/small/, /medium/, /large/) is preserved only for cache key
differentiation and SVG width/height calculation; no PNG directory
lookups are performed.
Four icons remapped to SVG equivalents that exist in tango/scalable/:
dialog-cancel -> process-stop (newsletters: unsubscribed)
emblem-downloads -> network-receive (fisheye: download file)
emblem-shared -> emblem-symbolic-link (boards: moved topic)
mail-mark-important -> emblem-important (messages: flagged)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
| -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 ); } |
