addBehavior('adminBlogPreferencesFormV2', ['adminSimplyFavicon', 'adminBlogPreferencesForm']); dcCore::app()->addBehavior('adminBeforeBlogSettingsUpdate', ['adminSimplyFavicon', 'adminBeforeBlogSettingsUpdate']); class adminSimplyFavicon { public static $extensions = ['ico', 'png', 'bmp', 'gif', 'jpg', 'mng']; public static function adminBlogPreferencesForm($blog_settings) { $exists = []; $path = path::fullFromRoot((string) $blog_settings->system->public_path, DC_ROOT); foreach (self::$extensions as $ext) { if (file_exists($path . '/favicon.' . $ext)) { $exists[] = sprintf('
' . __("You must place an image called favicon.png or .jpg or .ico into your blog's public directory.") . '
' . __('There are no favicon in blog public directory') . '
' : '' . __('Current favicons:') . '