info['default_variant']; $variants = $themes['osu_standard']->info['variants']; // Expose the variants array to Javascript drupal_add_js(array('osu_standard_variants' => $variants), 'setting'); // We need to build an array of background options for each variant $backgrounds = array(); $bg_images = array(); foreach ($variants as $varname => $vartitle) { if ($varname != $default_variant ) { $backgrounds[$varname] = array (); include_once './' . drupal_get_path('theme', 'osu_standard') . '/' . $varname . '.inc'; $func = 'ous_standard_' . $varname; $styles = $func(); foreach($styles as $class => $style ) { $title = $style['title']; $thumb = $style['bg']; $backgrounds[$varname][$class] = $title; $bg_images[$class] = $thumb; } } } // Expose the bg_images array to Javascript drupal_add_js(array('osu_standard_bg' => $bg_images), 'setting'); // Start the configuration form $form['osu_settings_start'] = array( '#type' => 'markup', '#value' => '
', ); $form['osu_standard_options'] = array( '#type' => 'fieldset', '#title' => t('OSU Theme options'), ); // Option - Enter custom Google Analytics tracking code $form['osu_standard_options']['custom_ga_code'] = array( '#type' => 'textfield', '#title' => 'Custom Google Analytics Tracking Code', '#default_value' => $settings['custom_ga_code'], '#description' => t('Enter a custom Google Analytics Tracking Code, or leave blank to use the default OSU code'), ); // Option - Hide Book Navigation $form['osu_standard_options']['hide_book_nav'] = array( '#type' => 'checkbox', '#title' => 'Hide the book navigation links.', '#default_value' => $settings['hide_book_nav'], '#description' => t('Hide the prev, top, and next links at the bottom of a book page.'), ); // Option - Hide Taxonomy Terms $form['osu_standard_options']['hide_terms'] = array( '#type' => 'checkbox', '#title' => 'Hide Taxonomy Tags.', '#default_value' => $settings['hide_terms'], '#description' => t('Hide the display of taxonomy tags on all nodes.'), ); // Get current user and display only for user 1 if ($GLOBALS['user']->uid == 1 ) { // Option - Home page navigaion /* Not yet $form['osu_standard_options']['homepage_nav'] = array ( '#type' => 'checkbox', '#title' => 'Use the Home Page top navigation.', '#default_value' => $settings['homepage_nav'], '#description' => t('For top tier sites. Use the home page banner menus'), ); */ // Option - Hide utiltity links $form['osu_standard_options']['hide_utility'] = array( '#type' => 'checkbox', '#title' => 'Hide utitlity links in Tophat.', '#default_value' => $settings['hide_utility'], '#description' => t('Hide the "Calendar, Library, Maps..." links in the top hat'), ); // Option - VSO Branding $form['osu_standard_options']['vso_option'] = array( '#type' => 'checkbox', '#title' => 'Use the VSO branding.', '#default_value' => $settings['vso_option'], '#description' => t('Set the appropriate branding for volunteer organizations'), ); // End of User 1 only options } else { // Must keep default values for user 1 options when other admin saves the form $form['osu_standard_options']['hide_utility'] = array( '#type' => 'hidden', '#default_value' => $settings['hide_utility'], ); $form['osu_standard_options']['vso_option'] = array( '#type' => 'hidden', '#default_value' => $settings['vso_option'], ); } // Option - Color scheme $form['osu_standard_options']['variant'] = array( '#type' => 'select', '#title' => 'Color Scheme', '#default_value' => $settings['variant'], '#options' => $variants, '#description' => t('Select a theme variant'), ); foreach ($variants as $varname => $vartitle) { if ($varname != 'standard' ) { $form['osu_standard_options'][$varname] = array( '#type' => 'markup', '#value' => '
', ); $form['osu_standard_options'][$varname]['preview'] = array( '#type' => 'markup', '#value' => '' ); $form['osu_standard_options'][$varname][$varname . '_class'] = array( '#type' => 'select', '#title' => 'Select Background Image', '#default_value' => $settings[$varname . '_class'], '#options' => $backgrounds[$varname], ); $form['osu_standard_options'][$varname]['end'] = array( '#type' => 'markup', '#value' => '
', ); } } // Option - Social Media $form['osu_strandard_social_media'] = array( '#type' => 'fieldset', '#title' => t('Social Media Links - Footer'), ); $form['osu_strandard_social_media']['osu_standard_facebook'] = array( '#type' => 'textfield', '#title' => t('Facebook'), '#default_value' => $settings['osu_standard_facebook'], '#size' => 60, '#maxlength' => 127, ); $form['osu_strandard_social_media']['osu_standard_youtube'] = array( '#type' => 'textfield', '#title' => t('YouTube'), '#default_value' => $settings['osu_standard_youtube'], '#size' => 60, '#maxlength' => 127, ); $form['osu_strandard_social_media']['osu_standard_flickr'] = array( '#type' => 'textfield', '#title' => t('Flickr'), '#default_value' => $settings['osu_standard_flickr'], '#size' => 60, '#maxlength' => 127, ); $form['osu_strandard_social_media']['osu_standard_linkedin'] = array( '#type' => 'textfield', '#title' => t('LinkedIn'), '#default_value' => $settings['osu_standard_linkedin'], '#size' => 60, '#maxlength' => 127, ); $form['osu_strandard_social_media']['osu_standard_twitter'] = array( '#type' => 'textfield', '#title' => t('Twitter'), '#default_value' => $settings['osu_standard_twitter'], '#size' => 60, '#maxlength' => 127, ); $form['osu_strandard_social_media']['osu_standard_google'] = array( '#type' => 'textfield', '#title' => t('Google+'), '#default_value' => $settings['osu_standard_google'], '#size' => 60, '#maxlength' => 127, ); $form['osu_settings_end'] = array( '#type' => 'markup', '#value' => '
', ); // Add the osu_drupal_1_11 header options $form += osu_drupal_1_11_settings($settings); // Return the form return $form; } ?>