You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While developing a theme with custom icons using 'THEME_HAS_MENU_ICONS', I've found out a small mistake in albmgr.php
The path of the icon shown after each album title for uploading images is hardcoded instead of using the cpg_fetch_icon function. Thus, any custom icon is not shown correctly.
The fix is quite easy :
In $icon_array, add a key : $icon_array['upload'] = cpg_fetch_icon('upload', 0, $lang_albmgr_php['upload_files'])
On line 220 change <a href="upload.php?album={$album['aid']}"><img src="images/icons/upload.png" title="{$lang_albmgr_php['upload_files']}" /></a>
to <a href="upload.php?album={$album['aid']}">{$icon_array['upload']}</a>
The text was updated successfully, but these errors were encountered:
And my solution does not cover at least one use-case : When user clics on "new album", it is managed from javascript. And it is still the standard icon that is shown.
Looking into to page code, if found a line stating var js_vars = {(...)"icon_dir":"images\/icons\/","(...),"icon_close_path":"images\/icons\/close.png"(...)
I guess those two values should be changed to give the actual theme path. But I've not found where to do that in albmgr.php. There are some lines starting with "set_js_var", true, but I did not found anything about icons.
While developing a theme with custom icons using 'THEME_HAS_MENU_ICONS', I've found out a small mistake in albmgr.php
The path of the icon shown after each album title for uploading images is hardcoded instead of using the cpg_fetch_icon function. Thus, any custom icon is not shown correctly.
The fix is quite easy :
$icon_array['upload'] = cpg_fetch_icon('upload', 0, $lang_albmgr_php['upload_files'])
<a href="upload.php?album={$album['aid']}"><img src="images/icons/upload.png" title="{$lang_albmgr_php['upload_files']}" /></a>
to
<a href="upload.php?album={$album['aid']}">{$icon_array['upload']}</a>
The text was updated successfully, but these errors were encountered: