@@ -18,6 +18,7 @@ public static function init()
18
18
add_integration_function ('integrate_load_permissions ' , __CLASS__ . '::permissions ' , false );
19
19
add_integration_function ('integrate_load_illegal_guest_permissions ' , __CLASS__ . '::illegal_guest_permissions ' , false );
20
20
add_integration_function ('integrate_load_permissions ' , __CLASS__ . '::permissions ' , false );
21
+ add_integration_function ('integrate_pre_css_output ' , __CLASS__ . '::preCSS ' , false );
21
22
}
22
23
23
24
public static function setVersion ()
@@ -130,7 +131,7 @@ public static function menu_buttons(&$buttons)
130
131
$ temp_buttons ['SMFQuiz ' ] = array (
131
132
'title ' => $ txt ['SMFQuiz ' ],
132
133
'href ' => $ scripturl . '?action=SMFQuiz ' ,
133
- 'icon ' => 'icons/ quiz.png ' ,
134
+ 'icon ' => 'quiz ' ,
134
135
'show ' => allowedTo ('quiz_view ' ) && !empty ($ modSettings ['SMFQuiz_enabled ' ]),
135
136
'sub_buttons ' => array (),
136
137
);
@@ -139,4 +140,18 @@ public static function menu_buttons(&$buttons)
139
140
}
140
141
$ buttons = $ temp_buttons ;
141
142
}
143
+
144
+ public static function preCSS ()
145
+ {
146
+ global $ settings ;
147
+
148
+ // Add the icon using inline css
149
+ addInlineCss ('
150
+ .main_icons.quiz::before {
151
+ background-position: 0;
152
+ background-image: url(" ' . $ settings ['default_images_url ' ] . '/icons/quiz.png");
153
+ background-size: contain;
154
+ }
155
+ ' );
156
+ }
142
157
}
0 commit comments