0, 'name' => 'name', 'theme_dir' => 'theme_dir', 'theme_url' => 'theme_url', 'images_url' => 'images_url', 'known_themes' => explode(',', $modSettings['knownThemes']), ) ); $context['cls_themes'] = array(); while ($row = $smcFunc['db_fetch_assoc']($request)) { if (!isset($context['cls_themes'][$row['id_theme']])) $context['cls_themes'][$row['id_theme']] = array( 'id' => $row['id_theme'], ); $context['cls_themes'][$row['id_theme']][$row['variable']] = $row['value']; } $smcFunc['db_free_result']($request); } // ClickSafe Top selector function cls_change_theme_top() { global $context, $settings, $txt, $modSettings, $smcFunc; //PrintPage does not need a theme selector ... If(isset($_GET['action'])) if($_GET['action']=="printpage"){return;} // ClickSafe Read the Templates Database cls_read_db(); // ClickSafe Execute the javascript cls_java(); // ClickSafe Load the language loadLanguage('cls'); // Right position for selector (example: 100[total screen] - 90[width forum] / 2 = 5 ) if(!empty($modSettings['change_theme_check_top']) || !empty($modSettings['change_theme_check_bot'])){ //If Top is on/off if($modSettings['change_theme_check_top']=='1') { echo '