summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--css/text.css2
-rw-r--r--js/debug.js153
-rw-r--r--js/omega.js46
-rw-r--r--js/omega_admin.js91
-rw-r--r--omega.info8
-rw-r--r--page.tpl.php295
-rw-r--r--preprocess/preprocess-block.inc5
-rw-r--r--preprocess/preprocess-comment-wrapper.inc7
-rw-r--r--preprocess/preprocess-comment.inc7
-rw-r--r--preprocess/preprocess-html.inc31
-rw-r--r--preprocess/preprocess-maintenance-page.inc7
-rw-r--r--preprocess/preprocess-node-content.inc7
-rw-r--r--preprocess/preprocess-node.inc10
-rw-r--r--preprocess/preprocess-page.inc126
-rw-r--r--preprocess/preprocess-region.inc7
-rw-r--r--process/process-html.inc7
-rw-r--r--process/process-node.inc7
-rw-r--r--process/process-page.inc7
-rwxr-xr-xstarterkit/omega_starterkit.info3
-rw-r--r--starterkit/page.tpl.php299
-rw-r--r--starterkit/template.php7
-rw-r--r--starterkit/theme-settings.php20
-rw-r--r--template.php209
-rw-r--r--theme-functions.inc7
-rw-r--r--theme-settings.php1418
25 files changed, 1440 insertions, 1346 deletions
diff --git a/css/text.css b/css/text.css
index 77df88f..4a8caee 100644
--- a/css/text.css
+++ b/css/text.css
@@ -11,7 +11,7 @@
/** ################# Custom CSS Styles ####################### */
body {
font: 13px/1.5 Verdana,Helvetica,Arial,sans-serif;
-}Verdana,Helvetica,Arial,sans-serif
+}
a:link, a:visited {
color: #202124;
diff --git a/js/debug.js b/js/debug.js
index fb4ce1c..a2737f1 100644
--- a/js/debug.js
+++ b/js/debug.js
@@ -1,78 +1,79 @@
//$Id$
-Drupal.grid_debug = function (context) {
- // add toolbar items
-
-
- if(Drupal.settings.fluid_grid == 'fluid') {
- omega('body').addClass('fluid-grid');
- }
- // add an extra identifying class to body
- omega('body').addClass('has-grid');
- if(Drupal.settings.grid_overlay_state) {
- // grid is on by default
- omega('body:not(.fluid-grid)').addClass('show-grid');
- omega('body').addClass('grid-hover');
- var debug_next_state = "Off";
- }
- else {
- // grid is off by default
- var debug_next_state = "On";
- }
- // add toggle button/section
- omega('#page').after('<div id="omega-debug"><a href="#">Turn Debug <strong>'+debug_next_state+'</strong></a><div id="omega-debug-info"></div></div>');
- // toggle info between clicks
- omega('#omega-debug a').click(function(){
- if(debug_next_state == "Off") {
- omega('#omega-debug a').html('Turn Debug <strong>On</strong>');
- omega('body:not(.fluid-grid)').removeClass('show-grid');
- omega('body').removeClass('grid-hover');
- debug_next_state = "On";
- return false;
- }
- else {
- omega('#omega-debug a').html('Turn Debug <strong>Off</strong>');
- omega('body:not(.fluid-grid)').addClass('show-grid');
- omega('body').addClass('grid-hover');
- debug_next_state = "Off";
- return false;
- }
- });
-
- // show info on hovering region
- omega('.has-grid .grid-1, .has-grid .grid-2, .has-grid .grid-3, .has-grid .grid-4, .has-grid .grid-5, .has-grid .grid-6, .has-grid .grid-7, .has-grid .grid-8, .has-grid .grid-9, .has-grid .grid-10, .has-grid .grid-11, .has-grid .grid-12, .has-grid .grid-13, .has-grid .grid-14, .has-grid .grid-15, .has-grid .grid-16, .has-grid .grid-17, .has-grid .grid-18, .has-grid .grid-19, .has-grid .grid-20, .has-grid .grid-21, .has-grid .grid-22, .has-grid .grid-23, .has-grid .grid-24')
- .hover(function(){
- if(omega(this).parents('body').hasClass('grid-hover')) {
- var grid_classes = '';
- var i = 1;
- var grid_size = 'undefined';
- for(i = 1; i <= 24; i++) {
- var grid_size_test = 'grid-'+i;
- if(omega(this).hasClass(grid_size_test)) {
- var grid_size = grid_size_test;
- }
- }
-
- var container_parent = omega(this).parents('div[class*=container]');
- if(container_parent.hasClass('container-12')) {
- var container_size = 'container-12';
- }
- if(container_parent.hasClass('container-16')) {
- var container_size = 'container-16';
- }
- if(container_parent.hasClass('container-24')) {
- var container_size = 'container-24';
- }
- omega('#omega-debug-info').html('<hr /><div><strong>Container class: '+container_size+'</div><div><strong>Grid class: </strong>'+grid_size+'</div>');
- //omega('#omega-debug-info').html(container_info);
- }
- }, function(){
- if(omega(this).parents('body').hasClass('grid-hover')) {
- omega('#omega-debug-info').html('');
- }
- });
-
-};
-omega(document).ready(function(){
- var debug = new Drupal.grid_debug();
-}); \ No newline at end of file
+(function ($) {
+ Drupal.grid_debug = function (context) {
+ // add toolbar items
+ if (Drupal.settings.fluid_grid == 'fluid') {
+ omega('body').addClass('fluid-grid');
+ }
+ // add an extra identifying class to body
+ omega('body').addClass('has-grid');
+ if (Drupal.settings.grid_overlay_state) {
+ // grid is on by default
+ omega('body:not(.fluid-grid)').addClass('show-grid');
+ omega('body').addClass('grid-hover');
+ var debug_next_state = "Off";
+ }
+ else {
+ // grid is off by default
+ var debug_next_state = "On";
+ }
+ // add toggle button/section
+ omega('#page').after('<div id="omega-debug"><a href="#">Turn Debug <strong>'+debug_next_state+'</strong></a><div id="omega-debug-info"></div></div>');
+ // toggle info between clicks
+ omega('#omega-debug a').click(function(){
+ if (debug_next_state == "Off") {
+ omega('#omega-debug a').html('Turn Debug <strong>On</strong>');
+ omega('body:not(.fluid-grid)').removeClass('show-grid');
+ omega('body').removeClass('grid-hover');
+ debug_next_state = "On";
+ return false;
+ }
+ else {
+ omega('#omega-debug a').html('Turn Debug <strong>Off</strong>');
+ omega('body:not(.fluid-grid)').addClass('show-grid');
+ omega('body').addClass('grid-hover');
+ debug_next_state = "Off";
+ return false;
+ }
+ });
+
+ // show info on hovering region
+ omega('.has-grid .grid-1, .has-grid .grid-2, .has-grid .grid-3, .has-grid .grid-4, .has-grid .grid-5, .has-grid .grid-6, .has-grid .grid-7, .has-grid .grid-8, .has-grid .grid-9, .has-grid .grid-10, .has-grid .grid-11, .has-grid .grid-12, .has-grid .grid-13, .has-grid .grid-14, .has-grid .grid-15, .has-grid .grid-16, .has-grid .grid-17, .has-grid .grid-18, .has-grid .grid-19, .has-grid .grid-20, .has-grid .grid-21, .has-grid .grid-22, .has-grid .grid-23, .has-grid .grid-24')
+ .hover(function(){
+ if (omega(this).parents('body').hasClass('grid-hover')) {
+ var grid_classes = '';
+ var i = 1;
+ var grid_size = 'undefined';
+ for(i = 1; i <= 24; i++) {
+ var grid_size_test = 'grid-'+i;
+ if (omega(this).hasClass(grid_size_test)) {
+ var grid_size = grid_size_test;
+ }
+ }
+
+ var container_parent = omega(this).parents('div[class*=container]');
+ if (container_parent.hasClass('container-12')) {
+ var container_size = 'container-12';
+ }
+ if (container_parent.hasClass('container-16')) {
+ var container_size = 'container-16';
+ }
+ if (container_parent.hasClass('container-24')) {
+ var container_size = 'container-24';
+ }
+ omega('#omega-debug-info').html('<hr /><div><strong>Container class: '+container_size+'</div><div><strong>Grid class: </strong>'+grid_size+'</div>');
+ //omega('#omega-debug-info').html(container_info);
+ }
+ }, function(){
+ if (omega(this).parents('body').hasClass('grid-hover')) {
+ omega('#omega-debug-info').html('');
+ }
+ });
+
+ };
+
+ omega(document).ready(function(){
+ var debug = new Drupal.grid_debug();
+ });
+})(jQuery);
diff --git a/js/omega.js b/js/omega.js
index b84428f..0163590 100644
--- a/js/omega.js
+++ b/js/omega.js
@@ -1,23 +1,25 @@
// $Id$
-function populateElement(selector, defvalue) {
- if(omega.trim(omega(selector).val()) == "") {
- omega(selector).val(defvalue);
- }
- omega(selector).focus(function() {
- if(omega(selector).val() == defvalue) {
- omega(selector).val("");
- }
- });
- omega(selector).blur(function() {
- if(omega.trim(omega(selector).val()) == "") {
- omega(selector).val(defvalue);
- }
- });
- }
-
-omega = jQuery.noConflict();
-omega(document).ready(function(){
- // give the search box some fancy stuff
- populateElement('#search-box input.form-text, #search-block-form input.form-text', Drupal.t(Drupal.settings.default_search_text));
- populateElement('#search-region input.form-text', Drupal.t(Drupal.settings.default_search_text));
-}); \ No newline at end of file
+(function ($) {
+ function populateElement(selector, defvalue) {
+ if (omega.trim(omega(selector).val()) == "") {
+ omega(selector).val(defvalue);
+ }
+ omega(selector).focus(function() {
+ if(omega(selector).val() == defvalue) {
+ omega(selector).val("");
+ }
+ });
+ omega(selector).blur(function() {
+ if(omega.trim(omega(selector).val()) == "") {
+ omega(selector).val(defvalue);
+ }
+ });
+ }
+
+ omega = jQuery.noConflict();
+ omega(document).ready(function(){
+ // give the search box some fancy stuff
+ populateElement('#search-box input.form-text, #search-block-form input.form-text', Drupal.t(Drupal.settings.default_search_text));
+ populateElement('#search-region input.form-text', Drupal.t(Drupal.settings.default_search_text));
+ });
+})(jQuery);
diff --git a/js/omega_admin.js b/js/omega_admin.js
index 793c832..b1cf269 100644
--- a/js/omega_admin.js
+++ b/js/omega_admin.js
@@ -1,45 +1,48 @@
//$Id$
-omega = jQuery.noConflict();
-omega(document).ready(function(){
- // hide all collapsible fieldset stuffs
- omega('.omega-accordion-content').hide();
- // show the first fieldset in any group of "accordion" items
- firsts = omega([]);
- omega('.fieldset-wrapper').each(function(){
- var new_first = omega(this).children('.omega-accordion:first');
- firsts = firsts.add(new_first);
- });
- firsts
- .children('a')
- .addClass('expanded')
- .end() // return to the h3
- .next('.omega-accordion-content')
- .addClass('expanded')
- .show();
- // provide click/toggle functionality
- omega('.omega-accordion a').click(function(){
- // remove expanded class from all href items
- omega(this).parents('.fieldset-wrapper').find('a').removeClass('expanded');
- // add expanded back to the cliked href
- omega(this).addClass('expanded');
- var clicked = omega(this).parent('h3');
- // if we click a header that is already open, do nothing
- if(clicked.next('.omega-accordion-content').hasClass('expanded')) {
- return false;
- }
- else {
- clicked
- .next('.omega-accordion-content')
- .slideDown('fast')
- .addClass('expanded')
- .addClass('active-accordion')
- .end()
- .parents('.fieldset-wrapper')
- .children('.omega-accordion-content:not(.active-accordion)')
- .removeClass('expanded')
- .slideUp('fast');
- omega('.omega-accordion-content').removeClass('active-accordion');
- return false;
- }
- });
-});
+
+(function ($) {
+ omega = jQuery.noConflict();
+ omega(document).ready(function(){
+ // hide all collapsible fieldset stuffs
+ omega('.omega-accordion-content').hide();
+ // show the first fieldset in any group of "accordion" items
+ firsts = omega([]);
+ omega('.fieldset-wrapper').each(function(){
+ var new_first = omega(this).children('.omega-accordion:first');
+ firsts = firsts.add(new_first);
+ });
+ firsts
+ .children('a')
+ .addClass('expanded')
+ .end() // return to the h3
+ .next('.omega-accordion-content')
+ .addClass('expanded')
+ .show();
+ // provide click/toggle functionality
+ omega('.omega-accordion a').click(function(){
+ // remove expanded class from all href items
+ omega(this).parents('.fieldset-wrapper').find('a').removeClass('expanded');
+ // add expanded back to the cliked href
+ omega(this).addClass('expanded');
+ var clicked = omega(this).parent('h3');
+ // if we click a header that is already open, do nothing
+ if(clicked.next('.omega-accordion-content').hasClass('expanded')) {
+ return false;
+ }
+ else {
+ clicked
+ .next('.omega-accordion-content')
+ .slideDown('fast')
+ .addClass('expanded')
+ .addClass('active-accordion')
+ .end()
+ .parents('.fieldset-wrapper')
+ .children('.omega-accordion-content:not(.active-accordion)')
+ .removeClass('expanded')
+ .slideUp('fast');
+ omega('.omega-accordion-content').removeClass('active-accordion');
+ return false;
+ }
+ });
+ });
+})(jQuery);
diff --git a/omega.info b/omega.info
index 86317d3..ad2e63f 100644
--- a/omega.info
+++ b/omega.info
@@ -9,6 +9,11 @@ stylesheets[all][] = css/960.css
scripts[] = js/omega.js
+; Required core regions
+regions[page_top] = Page Top
+regions[page_bottom] = Page Bottom
+regions[content] = content
+
regions[sidebar_first] = sidebar first
regions[sidebar_second] = sidebar second
@@ -19,8 +24,6 @@ regions[preface_first] = preface first
regions[preface_second] = preface second
regions[preface_third] = preface third
-regions[content] = content
-
regions[postscript_first] = postscript first
regions[postscript_second] = postscript second
regions[postscript_third] = postscript third
@@ -29,6 +32,7 @@ regions[postscript_fourth] = postscript fourth
regions[footer_first] = footer first
regions[footer_second] = footer second
+
; Set the default settings to be used in theme-settings.php
; Non-960gs default settings
diff --git a/page.tpl.php b/page.tpl.php
index 6b4739e..ce6cfe4 100644
--- a/page.tpl.php
+++ b/page.tpl.php
@@ -1,167 +1,170 @@
<?php
// $Id$
+
+/**
+ * @file
+ * Theme implementation to display a single Drupal page.
+ */
?>
- <?php if (!empty($admin)) print $admin; ?>
- <div id="page" class="clearfix">
- <div id="site-header" class="container-<?php print $branding_wrapper_width; ?> clearfix">
- <div id="branding" class="grid-<?php print $header_logo_width; ?>">
- <?php if (isset($linked_logo_img)): ?>
- <?php print $linked_logo_img; ?>
- <?php endif; ?>
-
- <?php if (isset($linked_site_name)): ?>
- <?php if ($title): ?>
- <h2 id="site-name" class=""><?php print $linked_site_name; ?></h2>
- <?php else: ?>
- <h1 id="site-name" class=""><?php print $linked_site_name; ?></h1>
- <?php endif; ?>
- <?php endif; ?>
- </div><!-- /#branding -->
- <?php if ($primary_nav || $secondary_nav): ?>
- <div id="site-menu" class="grid-<?php print $header_menu_width; ?>">
-
- <?php if($primary_nav): ?>
- <div><?php print $primary_nav; ?></div>
- <?php endif; ?>
- <?php if($secondary_nav): ?>
- <div><?php print $secondary_nav; ?></div>
+<div id="page" class="clearfix">
+ <div id="site-header" class="container-<?php print $branding_wrapper_width; ?> clearfix">
+ <div id="branding" class="grid-<?php print $header_logo_width; ?>">
+ <?php if (isset($linked_logo_img)): ?>
+ <?php print $linked_logo_img; ?>
+ <?php endif; ?>
+
+ <?php if (isset($linked_site_name)): ?>
+ <?php if ($title): ?>
+ <h2 id="site-name" class=""><?php print $linked_site_name; ?></h2>
+ <?php else: ?>
+ <h1 id="site-name" class=""><?php print $linked_site_name; ?></h1>
<?php endif; ?>
- </div><!-- /#site-menu -->
<?php endif; ?>
- </div><!-- /#site-header -->
+ </div><!-- /#branding -->
+ <?php if ($primary_nav || $secondary_nav): ?>
+ <div id="site-menu" class="grid-<?php print $header_menu_width; ?>">
- <?php if($page['header_first'] || $page['header_second']): ?>
- <div id="header-regions" class="container-<?php print $header_wrapper_width; ?> clearfix">
- <?php if($page['header_first']): ?>
- <div id="header-first" class="<?php print $header_first_classes; ?>">
- <?php print render($page['header_first']); ?>
- </div><!-- /#header-first -->
+ <?php if ($primary_nav): ?>
+ <div><?php print $primary_nav; ?></div>
<?php endif; ?>
- <?php if($page['header_second']): ?>
- <div id="header-last" class="<?php print $header_second_classes; ?>">
- <?php print render($page['header_second']); ?>
- </div><!-- /#header-last -->
+ <?php if ($secondary_nav): ?>
+ <div><?php print $secondary_nav; ?></div>
<?php endif; ?>
- </div><!-- /#header-regions -->
+ </div><!-- /#site-menu -->
<?php endif; ?>
-
- <?php if($site_slogan && $is_front || $breadcrumb): ?>
- <div id="internal-nav" class="container-<?php print $internal_nav_wrapper_width; ?> clearfix">
- <div id="slogan-bcrumb" class="grid-<?php print $breadcrumb_slogan_width; ?>">
- <?php if ($site_slogan && $is_front): ?>
- <div id="slogan"><?php print $site_slogan; ?></div><!-- /#slogan -->
- <?php endif; ?>
- <?php if($breadcrumb): ?>
- <div id="bcrumb"><?php print $breadcrumb; ?></div><!-- /#bcrumb -->
- <?php endif; ?>
- </div>
- <?php if(isset($search_region)): ?>
- <div id="search-region" class="<?php print $search_region_classes; ?>"><?php print render($search_region);?></div>
- <?php endif; ?>
- </div><!-- /#internal-nav -->
+ </div><!-- /#site-header -->
+
+ <?php if ($page['header_first'] || $page['header_second']): ?>
+ <div id="header-regions" class="container-<?php print $header_wrapper_width; ?> clearfix">
+ <?php if ($page['header_first']): ?>
+ <div id="header-first" class="<?php print $header_first_classes; ?>">
+ <?php print render($page['header_first']); ?>
+ </div><!-- /#header-first -->
<?php endif; ?>
-
- <?php if($page['preface_first'] || $page['preface_second'] || $page['preface_third']): ?>
- <div id="preface-wrapper" class="container-<?php print $preface_wrapper_grids; ?> clearfix">
- <?php if($page['preface_first']): ?>
- <div id="preface-first" class="preface <?php print $preface_first_classes; ?>">
- <?php print render($page['preface_first']); ?>
- </div><!-- /#preface-first -->
- <?php endif; ?>
- <?php if($page['preface_second']): ?>
- <div id="preface-middle" class="preface <?php print $preface_second_classes; ?>">
- <?php print render($page['preface_second']); ?>
- </div><!-- /#preface-middle -->
+ <?php if ($page['header_second']): ?>
+ <div id="header-last" class="<?php print $header_second_classes; ?>">
+ <?php print render($page['header_second']); ?>
+ </div><!-- /#header-last -->
+ <?php endif; ?>
+ </div><!-- /#header-regions -->
+ <?php endif; ?>
+
+ <?php if ($site_slogan && $is_front || $breadcrumb): ?>
+ <div id="internal-nav" class="container-<?php print $internal_nav_wrapper_width; ?> clearfix">
+ <div id="slogan-bcrumb" class="grid-<?php print $breadcrumb_slogan_width; ?>">
+ <?php if ($site_slogan && $is_front): ?>
+ <div id="slogan"><?php print $site_slogan; ?></div><!-- /#slogan -->
<?php endif; ?>
- <?php if($page['preface_third']): ?>
- <div id="preface-last" class="preface <?php print $preface_third_classes; ?>">
- <?php print render($page['preface_third']); ?>
- </div><!-- /#preface-last -->
+ <?php if ($breadcrumb): ?>
+ <div id="bcrumb"><?php print $breadcrumb; ?></div><!-- /#bcrumb -->
<?php endif; ?>
- </div><!-- /#preface-wrapper -->
+ </div>
+ <?php if (isset($search_region)): ?>
+ <div id="search-region" class="<?php print $search_region_classes; ?>"><?php print render($search_region);?></div>
<?php endif; ?>
-
- <?php if($messages): ?>
- <div class="container-<?php print $default_container_width; ?> clearfix">
- <div class="grid-<?php print $default_container_width; ?>">
- <?php print $messages; ?>
- </div>
- </div><!-- /.container-xx -->
+ </div><!-- /#internal-nav -->
+ <?php endif; ?>
+
+ <?php if ($page['preface_first'] || $page['preface_second'] || $page['preface_third']): ?>
+ <div id="preface-wrapper" class="container-<?php print $preface_wrapper_grids; ?> clearfix">
+ <?php if ($page['preface_first']): ?>
+ <div id="preface-first" class="preface <?php print $preface_first_classes; ?>">
+ <?php print render($page['preface_first']); ?>
+ </div><!-- /#preface-first -->
<?php endif; ?>
-
- <div id="main-content-container" class="container-<?php print $content_container_width; ?> clearfix">
- <div id="main-wrapper" class="column <?php print $main_content_classes; ?>">
- <?php if (isset($tabs) && count($tabs) > 0): ?>
- <div id="content-tabs" class=""><?php print render($tabs); ?></div><!-- /#content-tabs -->
- <?php endif; ?>
-
- <?php print render($title_prefix); ?>
- <?php if ($title): ?>
- <h1 class="title" id="page-title"><?php print $title; ?></h1>
- <?php endif; ?>
- <?php print render($title_suffix); ?>
+ <?php if ($page['preface_second']): ?>
+ <div id="preface-middle" class="preface <?php print $preface_second_classes; ?>">
+ <?php print render($page['preface_second']); ?>
+ </div><!-- /#preface-middle -->
+ <?php endif; ?>
+ <?php if ($page['preface_third']): ?>
+ <div id="preface-last" class="preface <?php print $preface_third_classes; ?>">
+ <?php print render($page['preface_third']); ?>
+ </div><!-- /#preface-last -->
+ <?php endif; ?>
+ </div><!-- /#preface-wrapper -->
+ <?php endif; ?>
- <?php if ($action_links): ?>
- <ul class="action-links"><?php print render($action_links); ?></ul>
- <?php endif; ?>
+ <?php if ($messages): ?>
+ <div class="container-<?php print $default_container_width; ?> clearfix">
+ <div class="grid-<?php print $default_container_width; ?>">
+ <?php print $messages; ?>
+ </div>
+ </div><!-- /.container-xx -->
+ <?php endif; ?>
- <div id="main-content" class="region clearfix">
- <?php print render($page['content']); ?>
- </div><!-- /#main-content -->
-
-
- </div><!-- /#main-wrapper -->
-
- <?php if (isset($page['sidebar_first'])): ?>
- <div id="sidebar-first" class="column sidebar region <?php print $sidebar_first_classes; ?>">
- <?php print render($page['sidebar_first']); ?>
- </div><!-- /#sidebar-first -->
+ <div id="main-content-container" class="container-<?php print $content_container_width; ?> clearfix">
+ <div id="main-wrapper" class="column <?php print $main_content_classes; ?>">
+ <?php if (isset($tabs) && count($tabs) > 0): ?>
+ <div id="content-tabs" class=""><?php print render($tabs); ?></div><!-- /#content-tabs -->
<?php endif; ?>
-
- <?php if (isset($page['sidebar_second'])): ?>
- <div id="sidebar-last" class="column sidebar region <?php print $sidebar_second_classes; ?>">
- <?php print render($page['sidebar_second']); ?>
- </div><!-- /#sidebar-last -->
- <?php endif; ?>
- </div><!-- /#main-content-container -->
-
- <?php if($page['postscript_first'] || $page['postscript_second'] || $page['postscript_third'] || $page['postscript_fourth']): ?>
- <div id="postscript-wrapper" class="container-<?php print $postscript_container_width; ?> clearfix">
- <?php if($page['postscript_first']): ?>
- <div id="postscript-one" class="postscript <?php print $postscript_first_classes; ?>">
- <?php print render($page['postscript_first']); ?>
- </div><!-- /#postscript-one -->
- <?php endif; ?>
- <?php if($page['postscript_second']): ?>
- <div id="postscript-two" class="postscript <?php print $postscript_second_classes; ?>">
- <?php print render($page['postscript_second']); ?>
- </div><!-- /#postscript-two -->
- <?php endif; ?>
- <?php if($page['postscript_third']): ?>
- <div id="postscript-three" class="postscript <?php print $postscript_third_classes; ?>">
- <?php print render($page['postscript_third']); ?>
- </div><!-- /#postscript-three -->
+
+ <?php print render($title_prefix); ?>
+ <?php if ($title): ?>
+ <h1 class="title" id="page-title"><?php print $title; ?></h1>
<?php endif; ?>
- <?php if($page['postscript_fourth']): ?>
- <div id="postscript-four" class="postscript <?php print $postscript_fourth_classes; ?>">
- <?php print render($page['postscript_fourth']); ?>
- </div><!-- /#postscript-four -->
+ <?php print render($title_suffix); ?>
+
+ <?php if ($action_links): ?>
+ <ul class="action-links"><?php print render($action_links); ?></ul>
<?php endif; ?>
- </div><!-- /#postscript-wrapper -->
+
+ <div id="main-content" class="region clearfix">
+ <?php print render($page['content']); ?>
+ </div><!-- /#main-content -->
+
+ </div><!-- /#main-wrapper -->
+
+ <?php if (isset($page['sidebar_first'])): ?>
+ <div id="sidebar-first" class="column sidebar region <?php print $sidebar_first_classes; ?>">
+ <?php print render($page['sidebar_first']); ?>
+ </div><!-- /#sidebar-first -->
<?php endif; ?>
-
- <?php if($page['footer_first'] || $page['footer_second']): ?>
- <div id="footer-wrapper" class="container-<?php print $footer_container_width; ?> clearfix">
- <?php if($page['footer_first']): ?>
- <div id="footer-first" class="<?php print $footer_first_classes; ?>">
- <?php print render($page['footer_first']); ?>
- </div><!-- /#footer-first -->
- <?php endif; ?>
- <?php if($page['footer_second']): ?>
- <div id="footer-last" class="<?php print $footer_second_classes; ?>">
- <?php print render($page['footer_second']); ?>
- </div><!-- /#footer-last -->
- <?php endif; ?>
- </div><!-- /#footer-wrapper -->
+
+ <?php if (isset($page['sidebar_second'])): ?>
+ <div id="sidebar-last" class="column sidebar region <?php print $sidebar_second_classes; ?>">
+ <?php print render($page['sidebar_second']); ?>
+ </div><!-- /#sidebar-last -->
+ <?php endif; ?>
+ </div><!-- /#main-content-container -->
+
+ <?php if ($page['postscript_first'] || $page['postscript_second'] || $page['postscript_third'] || $page['postscript_fourth']): ?>
+ <div id="postscript-wrapper" class="container-<?php print $postscript_container_width; ?> clearfix">
+ <?php if ($page['postscript_first']): ?>
+ <div id="postscript-one" class="postscript <?php print $postscript_first_classes; ?>">
+ <?php print render($page['postscript_first']); ?>
+ </div><!-- /#postscript-one -->
+ <?php endif; ?>
+ <?php if ($page['postscript_second']): ?>
+ <div id="postscript-two" class="postscript <?php print $postscript_second_classes; ?>">
+ <?php print render($page['postscript_second']); ?>
+ </div><!-- /#postscript-two -->
+ <?php endif; ?>
+ <?php if ($page['postscript_third']): ?>
+ <div id="postscript-three" class="postscript <?php print $postscript_third_classes; ?>">
+ <?php print render($page['postscript_third']); ?>
+ </div><!-- /#postscript-three -->
+ <?php endif; ?>
+ <?php if ($page['postscript_fourth']): ?>
+ <div id="postscript-four" class="postscript <?php print $postscript_fourth_classes; ?>">
+ <?php print render($page['postscript_fourth']); ?>
+ </div><!-- /#postscript-four -->
+ <?php endif; ?>
+ </div><!-- /#postscript-wrapper -->
+ <?php endif; ?>
+
+ <?php if ($page['footer_first'] || $page['footer_second']): ?>
+ <div id="footer-wrapper" class="container-<?php print $footer_container_width; ?> clearfix">
+ <?php if ($page['footer_first']): ?>
+ <div id="footer-first" class="<?php print $footer_first_classes; ?>">
+ <?php print render($page['footer_first']); ?>
+ </div><!-- /#footer-first -->
+ <?php endif; ?>
+ <?php if ($page['footer_second']): ?>
+ <div id="footer-last" class="<?php print $footer_second_classes; ?>">
+ <?php print render($page['footer_second']); ?>
+ </div><!-- /#footer-last -->
<?php endif; ?>
- </div><!-- /#page --> \ No newline at end of file
+ </div><!-- /#footer-wrapper -->
+ <?php endif; ?>
+</div><!-- /#page --> \ No newline at end of file
diff --git a/preprocess/preprocess-block.inc b/preprocess/preprocess-block.inc
index 13bb990..5f1d7cf 100644
--- a/preprocess/preprocess-block.inc
+++ b/preprocess/preprocess-block.inc
@@ -1,2 +1,7 @@
<?php
// $Id$
+
+/**
+ * @file
+ * Contents of omega_preprocess_block().
+ */ \ No newline at end of file
diff --git a/preprocess/preprocess-comment-wrapper.inc b/preprocess/preprocess-comment-wrapper.inc
index 44a44a7..ee26dcd 100644
--- a/preprocess/preprocess-comment-wrapper.inc
+++ b/preprocess/preprocess-comment-wrapper.inc
@@ -1,2 +1,7 @@
<?php
-// $Id$ \ No newline at end of file
+// $Id$
+
+/**
+ * @file
+ * Contents of omega_preprocess_comment_wrapper().
+ */ \ No newline at end of file
diff --git a/preprocess/preprocess-comment.inc b/preprocess/preprocess-comment.inc
index 44a44a7..3cecc3d 100644
--- a/preprocess/preprocess-comment.inc
+++ b/preprocess/preprocess-comment.inc
@@ -1,2 +1,7 @@
<?php
-// $Id$ \ No newline at end of file
+// $Id$
+
+/**
+ * @file
+ * Contents of omega_preprocess_comment().
+ */ \ No newline at end of file
diff --git a/preprocess/preprocess-html.inc b/preprocess/preprocess-html.inc
index 10b52c5..9b45f36 100644
--- a/preprocess/preprocess-html.inc
+++ b/preprocess/preprocess-html.inc
@@ -1,30 +1,33 @@
<?php
// $Id$
-
+/**
+ * @file
+ * Contents of omega_preprocess_html().
+ */
// grid debugging
global $user;
$debug_access = FALSE;
$debug_roles = theme_get_setting('debug_grid_roles');
-if(!isset($user->roles[1])) {
- // Check to see if $user has the appropriate role.
- foreach($debug_roles AS $k => $v) {
- if ($v && $user->roles[$k]) {
- // user has access to debug tools
- $debug_access = TRUE;
- }
- }
+if (!isset($user->roles[1])) {
+ // Check to see if $user has the appropriate role.
+ foreach ($debug_roles as $k => $v) {
+ if ($v && $user->roles[$k]) {
+ // user has access to debug tools
+ $debug_access = TRUE;
+ }
+ }
}
// if grid debug is ON, and user either has access by role, or is uid 1
if(theme_get_setting('debug_grid_toggle') && ($debug_access || $user->uid == 1)) {
- $debug_settings = array(
+ $debug_settings = array(
'grid_overlay_on' => theme_get_setting('debug_grid_toggle'),
'grid_overlay_state' => theme_get_setting('debug_grid_toggle_state'),
- );
- drupal_add_js($debug_settings, 'setting');
- drupal_add_js(drupal_get_path('theme', 'omega') .'/js/debug.js', array('weight' => 1000, 'type' => 'file'));
- drupal_add_css(drupal_get_path('theme', 'omega') .'/css/debug.css');
+ );
+ drupal_add_js($debug_settings, 'setting');
+ drupal_add_js(drupal_get_path('theme', 'omega') . '/js/debug.js', array('weight' => 1000, 'type' => 'file'));
+ drupal_add_css(drupal_get_path('theme', 'omega') . '/css/debug.css');
}
/**
diff --git a/preprocess/preprocess-maintenance-page.inc b/preprocess/preprocess-maintenance-page.inc
index f5b9bc4..781a395 100644
--- a/preprocess/preprocess-maintenance-page.inc
+++ b/preprocess/preprocess-maintenance-page.inc
@@ -1,5 +1,12 @@
<?php
// $Id$
+
+/**
+ * @file
+ * Contents of omega_preprocess_maintenance_page().
+ * @todo This needs work.
+ */
+
$vars['body_attributes'] = array();
$vars['body_attributes']['id'] = 'maintenance-page';
diff --git a/preprocess/preprocess-node-content.inc b/preprocess/preprocess-node-content.inc
index 44a44a7..e6de86d 100644
--- a/preprocess/preprocess-node-content.inc
+++ b/preprocess/preprocess-node-content.inc
@@ -1,2 +1,7 @@
<?php
-// $Id$ \ No newline at end of file
+// $Id$
+
+/**
+ * @file
+ * Contents of omega_preprocess_node_content().
+ */ \ No newline at end of file
diff --git a/preprocess/preprocess-node.inc b/preprocess/preprocess-node.inc
index 3603d01..7f4689b 100644
--- a/preprocess/preprocess-node.inc
+++ b/preprocess/preprocess-node.inc
@@ -1,11 +1,11 @@
<?php
// $Id$
+
/**
- * Implementation of theme_preprocess_HOOK().
- * Passes varables to the node templates.
- *
- * @return $vars
+ * @file
+ * Contents of omega_preprocess_node().
*/
+
// Add a class to allow styling of nodes of a specific type.
$vars['classes_array'][] = drupal_html_class($vars['type']);
@@ -38,7 +38,7 @@ $vars['classes_array'][] = drupal_html_class($vars['zebra']);
$vars['classes_array'][] = 'clearfix';
// Remove node classes provided by core where duplication exists.
-$exclusions = array(drupal_html_class('node-'. $vars['type']), 'node-promoted', 'node-sticky', 'node-teaser', 'node-unpublished');
+$exclusions = array(drupal_html_class('node-' . $vars['type']), 'node-promoted', 'node-sticky', 'node-teaser', 'node-unpublished');
foreach ($vars['classes_array'] as $key => $value) {
if (in_array($value, $exclusions)) {
unset($vars['classes_array'][$key]);
diff --git a/preprocess/preprocess-page.inc b/preprocess/preprocess-page.inc
index ca2812e..1d01cb9 100644
--- a/preprocess/preprocess-page.inc
+++ b/preprocess/preprocess-page.inc
@@ -1,15 +1,21 @@
<?php
// $Id$
+
+/**
+ * @file
+ * Contents of omega_preprocess_page().
+ */
+
global $theme_key;
/**
- * Adding in the ability to combine the sidebars on certain paths in order to adjust
- * layouts based on context of the page. My main purpose for this is in the admin
- * section to help widen up the layout if two sidebars are being used.
- *
- * All it does is combine the sidebar_first and sidebar_second into sidebar_first and
- * unset the sidebar_second variable. This resets the layout to act like only one
- * sidebar is present in certain paths
+ * Adding in the ability to combine the sidebars on certain paths in order to
+ * adjust layouts based on context of the page. My main purpose for this is in
+ * the admin section to help widen up the layout if two sidebars are being used.
+ *
+ * All it does is combine the sidebar_first and sidebar_second into
+ * sidebar_first and unset the sidebar_second variable. This resets the layout
+ * to act like only one sidebar is present in certain paths.
*/
if (theme_get_setting('sidebar_contain_pages')) {
$path = drupal_get_path_alias($_GET['q']);
@@ -20,24 +26,24 @@ if (theme_get_setting('sidebar_contain_pages')) {
}
$page_match = !(theme_get_setting('sidebar_combine') xor $page_match);
if ($page_match && substr($_GET['q'], 0, 17) != 'admin/build/block') {
- unset($vars['page']['sidebar_second']['#sorted']);
- unset($vars['page']['sidebar_second']['#theme_wrappers']);
- unset($vars['page']['sidebar_second']['#region']);
-
- $vars['page']['sidebar_first'] = array_merge($vars['page']['sidebar_first'], $vars['page']['sidebar_second']);
- unset($vars['page']['sidebar_second']);
+ unset($vars['page']['sidebar_second']['#sorted']);
+ unset($vars['page']['sidebar_second']['#theme_wrappers']);
+ unset($vars['page']['sidebar_second']['#region']);
+
+ $vars['page']['sidebar_first'] = array_merge($vars['page']['sidebar_first'], $vars['page']['sidebar_second']);
+ unset($vars['page']['sidebar_second']);
}
}
/**
* Header Region
- * Depends on the width of the logo and title region, which is 4 grids by default.
- * This leaves 12 (Grid-12 by default) for the maximum width of any one of the elements in this zone
- * If only one zone is included, it fills the maximum width, and if both zones are present,
- * they will use the provided settings from the theme configuration interface.
+ * Depends on the width of the logo and title region, which is 4 grids by
+ * default. This leaves 12 (Grid-12 by default) for the maximum width of any one
+ * of the elements in this zone. If only one zone is included, it fills the
+ * maximum width, and if both zones are present, they will use the provided
+ * settings from the theme configuration interface.
*/
-
-// the width of the wrapper item around the navigation menus & header block regions
-// This width plus the logo width should total the width of your grid.
+// The width of the wrapper item around the navigation menus & header block
+// regions. This width plus the logo width should total the width of your grid.
$vars['header_wrapper_width'] = theme_get_setting('omega_header_wrapper_width');
// The width of the logo element.
@@ -97,11 +103,11 @@ $vars = static_region_builder($preface_regions, theme_get_setting('preface_wrapp
/**
* Body Region
* Configuration of $sidebar_first, $sidebar_second, and the main content zone
- *
+ *
* This section needs MUCH cleanup as I know I can condense the switch
* statement to be much shorter than completely redeclaring each zone
* for each case that can be present.
- *
+ *
* @todo cleanup switch statement
*/
// now we will be switching between our primary content layout types.
@@ -119,7 +125,7 @@ else {
$layout = theme_get_setting('omega_content_layout');
$sidebar_first_width = theme_get_setting('omega_sidebar_first_width');
$sidebar_second_width = theme_get_setting('omega_sidebar_second_width');
- $vars['content_container_width'] = theme_get_setting('omega_content_container_width');
+ $vars['content_container_width'] = theme_get_setting('omega_content_container_width');
$content_width = theme_get_setting('omega_content_container_width');
}
@@ -131,8 +137,8 @@ $content_regions = array(
// should other regions be left out.
'primary' => TRUE,
// we need to tell the "related" zones so that we can determine widths for this primary zone
- 'related' => array(
- 'sidebar_first' => array('width' => $sidebar_first_width),
+ 'related' => array(
+ 'sidebar_first' => array('width' => $sidebar_first_width),
'sidebar_second' => array('width' => $sidebar_second_width),
),
'push' => array(
@@ -155,7 +161,7 @@ $content_regions = array(
'width' => '',
'conditions' => array(
// this just needs the region name it depends on in this primary array
- // must be a region in this group though, not a region outside the
+ // must be a region in this group though, not a region outside the
// $content_regions area.
// 'sidebar_second',
),
@@ -186,35 +192,24 @@ $content_regions = array(
),
);
-/**
- * For panels and other modules that may set $show_blocks to false, we will need to
- * unset the sidebars in this case
- */
-/*
-if (!$vars['page']['show_blocks']) {
- unset($vars['page']['sidebar_first']);
- unset($vars['page']['sidebar_second']);
-}
-*/
-
-
-switch($layout){
+switch ($layout) {
default:
case 'first_content_last':
// FIRST - CONTENT - LAST
- // the distance to pull the "first" / left sidebar to place it on the left of the content
- // this does always include the right sidebar width, and does not need to account for if
- // there is content available in that region or not. If there wasn't content in it, the
- // primary content region would swallow up that extra grid space anyway.
-
- // if sidebar_second isn't present, we will pull the first sidebar the combined width of the content & sidebar last spacing
- // otherwise,
- if(theme_get_setting('omega_content_front_override') && $vars['is_front']) {
- $sl_pull = $vars['page']['sidebar_second'] ? theme_get_setting('omega_front_content_main_width') : theme_get_setting('omega_front_content_main_width') + theme_get_setting('omega_front_sidebar_second_width');
+ // The distance to pull the "first" / left sidebar to place it on the left of
+ // the content this does always include the right sidebar width, and does not
+ // need to account for if there is content available in that region or not. If
+ // there wasn't content in it, the primary content region would swallow up
+ // that extra grid space anyway.
+
+ // If sidebar_second isn't present, we will pull the first sidebar the
+ // combined width of the content & sidebar last spacing otherwise.
+ if (theme_get_setting('omega_content_front_override') && $vars['is_front']) {
+ $sl_pull = isset($vars['page']['sidebar_second']) ? theme_get_setting('omega_front_content_main_width') : theme_get_setting('omega_front_content_main_width') + theme_get_setting('omega_front_sidebar_second_width');
}
else {
- $sl_pull = $vars['page']['sidebar_second'] ? theme_get_setting('omega_content_main_width') : theme_get_setting('omega_content_main_width') + theme_get_setting('omega_sidebar_second_width');
+ $sl_pull = isset($vars['page']['sidebar_second']) ? theme_get_setting('omega_content_main_width') : theme_get_setting('omega_content_main_width') + theme_get_setting('omega_sidebar_second_width');
}
// let's assign some new data to our $content_regions array to assing pull classes
@@ -238,14 +233,14 @@ switch($layout){
),
),
);
-
+
break;
// CONTENT - FIRST - LAST
case 'content_first_last':
// This is seriously the easiest implementation because source order is used
// making push/pull irrelevant in this case.
-
+
// sidebar_first doesn't move in this layout
$content_regions['sidebar_first']['pull'] = FALSE;
$content_regions['sidebar_first']['push'] = FALSE;
@@ -263,14 +258,14 @@ switch($layout){
case 'first_last_content':
// if sidebar_second isn't present, we will pull the first sidebar the combined width of the content & sidebar last spacing
// otherwise,
- if(theme_get_setting('omega_content_front_override') && $vars['is_front']) {
- $sl_pull = $vars['page']['sidebar_second'] ? theme_get_setting('omega_front_content_main_width') : theme_get_setting('omega_front_content_main_width') + theme_get_setting('omega_front_sidebar_second_width');
- $sr_pull = $vars['page']['sidebar_first'] ? theme_get_setting('omega_front_content_main_width') : theme_get_setting('omega_front_content_main_width') + theme_get_setting('omega_front_sidebar_first_width');
+ if (theme_get_setting('omega_content_front_override') && $vars['is_front']) {
+ $sl_pull = isset($vars['page']['sidebar_second']) ? theme_get_setting('omega_front_content_main_width') : theme_get_setting('omega_front_content_main_width') + theme_get_setting('omega_front_sidebar_second_width');
+ $sr_pull = isset($vars['page']['sidebar_first']) ? theme_get_setting('omega_front_content_main_width') : theme_get_setting('omega_front_content_main_width') + theme_get_setting('omega_front_sidebar_first_width');
$sc_max_push = $sidebar_first_width + $sidebar_second_width;
}
else {
- $sl_pull = $vars['page']['sidebar_second'] ? theme_get_setting('omega_content_main_width') : theme_get_setting('omega_content_main_width') + theme_get_setting('omega_sidebar_second_width');
- $sr_pull = $vars['page']['sidebar_first'] ? theme_get_setting('omega_content_main_width') : theme_get_setting('omega_content_main_width') + theme_get_setting('omega_sidebar_first_width');
+ $sl_pull = isset($vars['page']['sidebar_second']) ? theme_get_setting('omega_content_main_width') : theme_get_setting('omega_content_main_width') + theme_get_setting('omega_sidebar_second_width');
+ $sr_pull = isset($vars['page']['sidebar_first']) ? theme_get_setting('omega_content_main_width') : theme_get_setting('omega_content_main_width') + theme_get_setting('omega_sidebar_first_width');
$sc_max_push = $sidebar_first_width + $sidebar_second_width;
}
@@ -303,7 +298,7 @@ switch($layout){
),
),
);
-
+
break;
}
// calling the dynamic region builder function to position these elements
@@ -368,16 +363,17 @@ $vars = static_region_builder($footer_regions, theme_get_setting('omega_footer_c
$slogan_text = $vars['site_slogan'];
$site_name_text = $vars['site_name'];
$vars['site_name_and_slogan'] = $site_name_text . ' ' . $slogan_text;
-if(isset($vars['logo'])) {
- //$vars['logo_img'] = theme('image', substr($vars['logo'], strlen(base_path())), t($vars['site_name']), t($vars['site_name']));
- $vars['logo_img'] = '<img src="'. $vars['logo'] .'" alt="'. $vars['site_name_and_slogan'] .'" id="logo" />';
+if (isset($vars['logo'])) {
+ //$vars['logo_img'] = theme('image', substr($vars['logo'], strlen(base_path())), t($vars['site_name']), t($vars['site_name']));
+ // @todo - Why no theme_image()?
+ $vars['logo_img'] = '<img src="' . $vars['logo'] . '" alt="' . $vars['site_name_and_slogan'] . '" id="logo" />';
}
// NINESIXTY - For easy printing of variables.
-if(isset($vars['logo_img'])) {
+if (isset($vars['logo_img'])) {
$vars['linked_logo_img'] = l($vars['logo_img'], '<front>', array('rel' => 'home', 'title' => t($vars['site_name']), 'html' => TRUE));
}
-if(isset($vars['site_name'])) {
+if (isset($vars['site_name'])) {
$vars['linked_site_name'] = l($vars['site_name'], '<front>', array('rel' => 'home', 'title' => t('Home')));
}
@@ -413,8 +409,8 @@ if(isset($vars['site_name'])) {
else {
$vars['secondary_nav'] = FALSE;
}
-
+
if (user_access('search content') && theme_get_setting('omega_render_search_box')) {
$vars['search_region'] = drupal_get_form('search_block_form');
- $vars['search_region_classes'] = 'grid-'. theme_get_setting('omega_search_width');
-} \ No newline at end of file
+ $vars['search_region_classes'] = 'grid-' . theme_get_setting('omega_search_width');
+}
diff --git a/preprocess/preprocess-region.inc b/preprocess/preprocess-region.inc
index 44a44a7..0e7cf80 100644
--- a/preprocess/preprocess-region.inc
+++ b/preprocess/preprocess-region.inc
@@ -1,2 +1,7 @@
<?php
-// $Id$ \ No newline at end of file
+// $Id$
+
+/**
+ * @file
+ * Contents of omega_preprocess_region().
+ */
diff --git a/process/process-html.inc b/process/process-html.inc
index 44a44a7..741fd92 100644
--- a/process/process-html.inc
+++ b/process/process-html.inc
@@ -1,2 +1,7 @@
<?php
-// $Id$ \ No newline at end of file
+// $Id$
+
+/**
+ * @file
+ * Contents of omega_process_html().
+ */ \ No newline at end of file
diff --git a/process/process-node.inc b/process/process-node.inc
index 44a44a7..d9c3e76 100644
--- a/process/process-node.inc
+++ b/process/process-node.inc
@@ -1,2 +1,7 @@
<?php
-// $Id$ \ No newline at end of file
+// $Id$
+
+/**
+ * @file
+ * Contents of omega_process_node().
+ */ \ No newline at end of file
diff --git a/process/process-page.inc b/process/process-page.inc
index 44a44a7..d204b5b 100644
--- a/process/process-page.inc
+++ b/process/process-page.inc
@@ -1,2 +1,7 @@
<?php
-// $Id$ \ No newline at end of file
+// $Id$
+
+/**
+ * @file
+ * Contents of omega_process_page().
+ */ \ No newline at end of file
diff --git a/starterkit/omega_starterkit.info b/starterkit/omega_starterkit.info
index 98e2b63..54748a9 100755
--- a/starterkit/omega_starterkit.info
+++ b/starterkit/omega_starterkit.info
@@ -15,6 +15,9 @@ regions[preface_first] = preface first
regions[preface_second] = preface second
regions[preface_third] = preface third
+; Required core regions
+regions[page_top] = Page Top
+regions[page_bottom] = Page Bottom
regions[content] = content
regions[postscript_first] = postscript first
diff --git a/starterkit/page.tpl.php b/starterkit/page.tpl.php
index d0b07a9..ce6cfe4 100644
--- a/starterkit/page.tpl.php
+++ b/starterkit/page.tpl.php
@@ -1,167 +1,170 @@
<?php
// $Id$
+
+/**
+ * @file
+ * Theme implementation to display a single Drupal page.
+ */
?>
- <?php if (!empty($admin)) print $admin; ?>
- <div id="page" class="clearfix">
- <div id="site-header" class="container-<?php print $branding_wrapper_width; ?> clearfix">
- <div id="branding" class="grid-<?php print $header_logo_width; ?>">
- <?php if (isset($linked_logo_img)): ?>
- <?php print $linked_logo_img; ?>
- <?php endif; ?>
-
- <?php if (isset($linked_site_name)): ?>
- <?php if ($title): ?>
- <h2 id="site-name" class=""><?php print $linked_site_name; ?></h2>
- <?php else: ?>
- <h1 id="site-name" class=""><?php print $linked_site_name; ?></h1>
- <?php endif; ?>
- <?php endif; ?>
- </div><!-- /#branding -->
- <?php if ($primary_nav || $secondary_nav): ?>
- <div id="site-menu" class="grid-<?php print $header_menu_width; ?>">
-
- <?php if($primary_nav): ?>
- <div><?php print $primary_nav; ?></div>
- <?php endif; ?>
- <?php if($secondary_nav): ?>
- <div><?php print $secondary_nav; ?></div>
+<div id="page" class="clearfix">
+ <div id="site-header" class="container-<?php print $branding_wrapper_width; ?> clearfix">
+ <div id="branding" class="grid-<?php print $header_logo_width; ?>">
+ <?php if (isset($linked_logo_img)): ?>
+ <?php print $linked_logo_img; ?>
+ <?php endif; ?>
+
+ <?php if (isset($linked_site_name)): ?>
+ <?php if ($title): ?>
+ <h2 id="site-name" class=""><?php print $linked_site_name; ?></h2>
+ <?php else: ?>
+ <h1 id="site-name" class=""><?php print $linked_site_name; ?></h1>
<?php endif; ?>
- </div><!-- /#site-menu -->
<?php endif; ?>
- </div><!-- /#site-header -->
+ </div><!-- /#branding -->
+ <?php if ($primary_nav || $secondary_nav): ?>
+ <div id="site-menu" class="grid-<?php print $header_menu_width; ?>">
- <?php if($page['header_first'] || $page['header_second']): ?>
- <div id="header-regions" class="container-<?php print $header_wrapper_width; ?> clearfix">
- <?php if($page['header_first']): ?>
- <div id="header-first" class="<?php print $header_first_classes; ?>">
- <?php print render($page['header_first']); ?>
- </div><!-- /#header-first -->
+ <?php if ($primary_nav): ?>
+ <div><?php print $primary_nav; ?></div>
<?php endif; ?>
- <?php if($page['header_second']): ?>
- <div id="header-last" class="<?php print $header_second_classes; ?>">
- <?php print render($page['header_second']); ?>
- </div><!-- /#header-last -->
+ <?php if ($secondary_nav): ?>
+ <div><?php print $secondary_nav; ?></div>
<?php endif; ?>
- </div><!-- /#header-regions -->
+ </div><!-- /#site-menu -->
<?php endif; ?>
-
- <?php if($site_slogan && $is_front || $breadcrumb): ?>
- <div id="internal-nav" class="container-<?php print $internal_nav_wrapper_width; ?> clearfix">
- <div id="slogan-bcrumb" class="grid-<?php print $breadcrumb_slogan_width; ?>">
- <?php if ($site_slogan && $is_front): ?>
- <div id="slogan"><?php print $site_slogan; ?></div><!-- /#slogan -->
- <?php endif; ?>
- <?php if($breadcrumb): ?>
- <div id="bcrumb"><?php print $breadcrumb; ?></div><!-- /#bcrumb -->
- <?php endif; ?>
- </div>
- <?php if(isset($search_region)): ?>
- <div id="search-region" class="<?php print $search_region_classes; ?>"><?php print render($search_region);?></div>
- <?php endif; ?>
- </div><!-- /#internal-nav -->
+ </div><!-- /#site-header -->
+
+ <?php if ($page['header_first'] || $page['header_second']): ?>
+ <div id="header-regions" class="container-<?php print $header_wrapper_width; ?> clearfix">
+ <?php if ($page['header_first']): ?>
+ <div id="header-first" class="<?php print $header_first_classes; ?>">
+ <?php print render($page['header_first']); ?>
+ </div><!-- /#header-first -->
<?php endif; ?>
-
- <?php if($page['preface_first'] || $page['preface_second'] || $page['preface_third']): ?>
- <div id="preface-wrapper" class="container-<?php print $preface_wrapper_grids; ?> clearfix">
- <?php if($page['preface_first']): ?>
- <div id="preface-first" class="preface <?php print $preface_first_classes; ?>">
- <?php print render($page['preface_first']); ?>
- </div><!-- /#preface-first -->
- <?php endif; ?>
- <?php if($page['preface_second']): ?>
- <div id="preface-middle" class="preface <?php print $preface_second_classes; ?>">
- <?php print render($page['preface_second']); ?>
- </div><!-- /#preface-middle -->
+ <?php if ($page['header_second']): ?>
+ <div id="header-last" class="<?php print $header_second_classes; ?>">
+ <?php print render($page['header_second']); ?>
+ </div><!-- /#header-last -->
+ <?php endif; ?>
+ </div><!-- /#header-regions -->
+ <?php endif; ?>
+
+ <?php if ($site_slogan && $is_front || $breadcrumb): ?>
+ <div id="internal-nav" class="container-<?php print $internal_nav_wrapper_width; ?> clearfix">
+ <div id="slogan-bcrumb" class="grid-<?php print $breadcrumb_slogan_width; ?>">
+ <?php if ($site_slogan && $is_front): ?>
+ <div id="slogan"><?php print $site_slogan; ?></div><!-- /#slogan -->
<?php endif; ?>
- <?php if($page['preface_third']): ?>
- <div id="preface-last" class="preface <?php print $preface_third_classes; ?>">
- <?php print render($page['preface_third']); ?>
- </div><!-- /#preface-last -->
+ <?php if ($breadcrumb): ?>
+ <div id="bcrumb"><?php print $breadcrumb; ?></div><!-- /#bcrumb -->
<?php endif; ?>
- </div><!-- /#preface-wrapper -->
+ </div>
+ <?php if (isset($search_region)): ?>
+ <div id="search-region" class="<?php print $search_region_classes; ?>"><?php print render($search_region);?></div>
<?php endif; ?>
-
- <?php if($messages): ?>
- <div class="container-<?php print $default_container_width; ?> clearfix">
- <div class="grid-<?php print $default_container_width; ?>">
- <?php print $messages; ?>
- </div>
- </div><!-- /.container-xx -->
+ </div><!-- /#internal-nav -->
+ <?php endif; ?>
+
+ <?php if ($page['preface_first'] || $page['preface_second'] || $page['preface_third']): ?>
+ <div id="preface-wrapper" class="container-<?php print $preface_wrapper_grids; ?> clearfix">
+ <?php if ($page['preface_first']): ?>
+ <div id="preface-first" class="preface <?php print $preface_first_classes; ?>">
+ <?php print render($page['preface_first']); ?>
+ </div><!-- /#preface-first -->
<?php endif; ?>
-
- <div id="main-content-container" class="container-<?php print $content_container_width; ?> clearfix">
- <div id="main-wrapper" class="column <?php print $main_content_classes; ?>">
- <?php if (isset($tabs) && count($tabs) > 0): ?>
- <div id="content-tabs" class=""><?php print render($tabs); ?></div><!-- /#content-tabs -->
- <?php endif; ?>
-
- <?php print render($title_prefix); ?>
- <?php if ($title): ?>
- <h1 class="title" id="page-title"><?php print $title; ?></h1>
- <?php endif; ?>
- <?php print render($title_suffix); ?>
-
- <?php if ($action_links): ?>
- <ul class="action-links"><?php print render($action_links); ?></ul>
- <?php endif; ?>
-
- <div id="main-content" class="region clearfix">
- <?php print render($page['content']); ?>
- </div><!-- /#main-content -->
-
-
- </div><!-- /#main-wrapper -->
-
- <?php if (isset($page['sidebar_first'])): ?>
- <div id="sidebar-first" class="column sidebar region <?php print $sidebar_first_classes; ?>">
- <?php print render($page['sidebar_first']); ?>
- </div><!-- /#sidebar-first -->
- <?php endif; ?>
-
- <?php if (isset($page['sidebar_second'])): ?>
- <div id="sidebar-last" class="column sidebar region <?php print $sidebar_second_classes; ?>">
- <?php print render($page['sidebar_second']); ?>
- </div><!-- /#sidebar-last -->
- <?php endif; ?>
- </div><!-- /#main-content-container -->
-
- <?php if($page['postscript_first'] || $page['postscript_second'] || $page['postscript_third'] || $page['postscript_fourth']): ?>
- <div id="postscript-wrapper" class="container-<?php print $postscript_container_width; ?> clearfix">
- <?php if($page['postscript_first']): ?>
- <div id="postscript-one" class="postscript <?php print $postscript_first_classes; ?>">
- <?php print render($page['postscript_first']); ?>
- </div><!-- /#postscript-one -->
- <?php endif; ?>
- <?php if($page['postscript_second']): ?>
- <div id="postscript-two" class="postscript <?php print $postscript_second_classes; ?>">
- <?php print render($page['postscript_second']); ?>
- </div><!-- /#postscript-two -->
+ <?php if ($page['preface_second']): ?>
+ <div id="preface-middle" class="preface <?php print $preface_second_classes; ?>">
+ <?php print render($page['preface_second']); ?>
+ </div><!-- /#preface-middle -->
+ <?php endif; ?>
+ <?php if ($page['preface_third']): ?>
+ <div id="preface-last" class="preface <?php print $preface_third_classes; ?>">
+ <?php print render($page['preface_third']); ?>
+ </div><!-- /#preface-last -->
+ <?php endif; ?>
+ </div><!-- /#preface-wrapper -->
+ <?php endif; ?>
+
+ <?php if ($messages): ?>
+ <div class="container-<?php print $default_container_width; ?> clearfix">
+ <div class="grid-<?php print $default_container_width; ?>">
+ <?php print $messages; ?>
+ </div>
+ </div><!-- /.container-xx -->
+ <?php endif; ?>
+
+ <div id="main-content-container" class="container-<?php print $content_container_width; ?> clearfix">
+ <div id="main-wrapper" class="column <?php print $main_content_classes; ?>">
+ <?php if (isset($tabs) && count($tabs) > 0): ?>
+ <div id="content-tabs" class=""><?php print render($tabs); ?></div><!-- /#content-tabs -->
<?php endif; ?>
- <?php if($page['postscript_third']): ?>
- <div id="postscript-three" class="postscript <?php print $postscript_third_classes; ?>">
- <?php print render($page['postscript_third']); ?>
- </div><!-- /#postscript-three -->
+
+ <?php print render($title_prefix); ?>
+ <?php if ($title): ?>
+ <h1 class="title" id="page-title"><?php print $title; ?></h1>
<?php endif; ?>
- <?php if($page['postscript_fourth']): ?>
- <div id="postscript-four" class="postscript <?php print $postscript_fourth_classes; ?>">
- <?php print render($page['postscript_fourth']); ?>
- </div><!-- /#postscript-four -->
+ <?php print render($title_suffix); ?>
+
+ <?php if ($action_links): ?>
+ <ul class="action-links"><?php print render($action_links); ?></ul>
<?php endif; ?>
- </div><!-- /#postscript-wrapper -->
+
+ <div id="main-content" class="region clearfix">
+ <?php print render($page['content']); ?>
+ </div><!-- /#main-content -->
+
+ </div><!-- /#main-wrapper -->
+
+ <?php if (isset($page['sidebar_first'])): ?>
+ <div id="sidebar-first" class="column sidebar region <?php print $sidebar_first_classes; ?>">
+ <?php print render($page['sidebar_first']); ?>
+ </div><!-- /#sidebar-first -->
<?php endif; ?>
-
- <?php if($page['footer_first'] || $page['footer_second']): ?>
- <div id="footer-wrapper" class="container-<?php print $footer_container_width; ?> clearfix">
- <?php if($page['footer_first']): ?>
- <div id="footer-first" class="<?php print $footer_first_classes; ?>">
- <?php print render($page['footer_first']); ?>
- </div><!-- /#footer-first -->
- <?php endif; ?>
- <?php if($page['footer_second']): ?>
- <div id="footer-last" class="<?php print $footer_second_classes; ?>">
- <?php print render($page['footer_second']); ?>
- </div><!-- /#footer-last -->
- <?php endif; ?>
- </div><!-- /#footer-wrapper -->
+
+ <?php if (isset($page['sidebar_second'])): ?>
+ <div id="sidebar-last" class="column sidebar region <?php print $sidebar_second_classes; ?>">
+ <?php print render($page['sidebar_second']); ?>
+ </div><!-- /#sidebar-last -->
+ <?php endif; ?>
+ </div><!-- /#main-content-container -->
+
+ <?php if ($page['postscript_first'] || $page['postscript_second'] || $page['postscript_third'] || $page['postscript_fourth']): ?>
+ <div id="postscript-wrapper" class="container-<?php print $postscript_container_width; ?> clearfix">
+ <?php if ($page['postscript_first']): ?>
+ <div id="postscript-one" class="postscript <?php print $postscript_first_classes; ?>">
+ <?php print render($page['postscript_first']); ?>
+ </div><!-- /#postscript-one -->
+ <?php endif; ?>
+ <?php if ($page['postscript_second']): ?>
+ <div id="postscript-two" class="postscript <?php print $postscript_second_classes; ?>">
+ <?php print render($page['postscript_second']); ?>
+ </div><!-- /#postscript-two -->
+ <?php endif; ?>
+ <?php if ($page['postscript_third']): ?>
+ <div id="postscript-three" class="postscript <?php print $postscript_third_classes; ?>">
+ <?php print render($page['postscript_third']); ?>
+ </div><!-- /#postscript-three -->
+ <?php endif; ?>
+ <?php if ($page['postscript_fourth']): ?>
+ <div id="postscript-four" class="postscript <?php print $postscript_fourth_classes; ?>">
+ <?php print render($page['postscript_fourth']); ?>
+ </div><!-- /#postscript-four -->
+ <?php endif; ?>
+ </div><!-- /#postscript-wrapper -->
+ <?php endif; ?>
+
+ <?php if ($page['footer_first'] || $page['footer_second']): ?>
+ <div id="footer-wrapper" class="container-<?php print $footer_container_width; ?> clearfix">
+ <?php if ($page['footer_first']): ?>
+ <div id="footer-first" class="<?php print $footer_first_classes; ?>">
+ <?php print render($page['footer_first']); ?>
+ </div><!-- /#footer-first -->
+ <?php endif; ?>
+ <?php if ($page['footer_second']): ?>
+ <div id="footer-last" class="<?php print $footer_second_classes; ?>">
+ <?php print render($page['footer_second']); ?>
+ </div><!-- /#footer-last -->
<?php endif; ?>
- </div><!-- /#page --> \ No newline at end of file
+ </div><!-- /#footer-wrapper -->
+ <?php endif; ?>
+</div><!-- /#page --> \ No newline at end of file
diff --git a/starterkit/template.php b/starterkit/template.php
index 16c84cc..211ef60 100644
--- a/starterkit/template.php
+++ b/starterkit/template.php
@@ -1,6 +1,11 @@
<?php
// $Id$
+/**
+ * @file
+ * Starter template.php file for subthemes of Omega.
+ */
+
/*
* Add any conditional stylesheets you will need for this sub-theme.
*
@@ -16,7 +21,7 @@ if (theme_get_setting('omega_starterkit_fixed')) {
// */
/**
- * Implementation of HOOK_theme().
+ * Implements hook_theme().
*/
function omega_starterkit_theme(&$existing, $type, $theme, $path) {
$hooks = omega_theme($existing, $type, $theme, $path);
diff --git a/starterkit/theme-settings.php b/starterkit/theme-settings.php
index 9dc31d0..e795499 100644
--- a/starterkit/theme-settings.php
+++ b/starterkit/theme-settings.php
@@ -1,19 +1,19 @@
<?php
// $Id$
-// Include the definition of zen_settings() and zen_theme_get_default_settings().
-include_once './' . drupal_get_path('theme', 'omega') . '/theme-settings.php';
+/**
+ * @file
+ * Theme settings for the Omega theme.
+ */
/**
- * Implementation of THEMEHOOK_settings() function.
+ * Implements hook_form_system_theme_settings_alter().
*
- * @param $saved_settings
- * An array of saved settings for this theme.
- * @return
- * A form array.
+ * @param $form
+ * Nested array of form elements that comprise the form.
+ * @param $form_state
+ * A keyed array containing the current state of the form.
*/
function omega_starterkit_form_system_theme_settings_alter(&$form, &$form_state) {
-
- // Return the form
- return $form;
+ // Include any changes to the theme settings here.
}
diff --git a/template.php b/template.php
index 0388039..9d760cb 100644
--- a/template.php
+++ b/template.php
@@ -1,41 +1,44 @@
<?php
-//$Id$
+// $Id$
// Report all PHP errors (see changelog)
/**
- * Implementation of hook_preprocess()
- *
- * This function checks to see if a hook has a preprocess file associated with
- * it, and if so, loads it.
- *
- * This makes it easier to keep sorted the preprocess functions that can be present in the
- * template.php file. You may still use hook_preprocess_page in template.php
- * or create a file preprocess-page.inc in the preprocess folder to include the appropriate
- * logic to your preprocess functionality
- *
- * @param $vars
- * @param $hook
+ * @file
+ * Contains theme functions, preprocess and process overrides, and custom
+ * functions for the Omega theme.
*/
+/**
+ * Implements hook_process().
+ *
+ * This function checks to see if a hook has a process file associated with it
+ * and if so, loads it.
+ *
+ * This makes it easier to keep sorted the process functions that can be present
+ * in the template.php file. You may still use hook_process_page, etc in
+ * template.php or create a file process-page.inc in the process folder to
+ * include the appropriate logic to your process functionality.
+ *
+ * @param $vars
+ * @param $hook
+ */
function omega_preprocess(&$vars, $hook) {
// Collect all information for the active theme.
$themes_active = array();
global $theme_info;
- //krumo($theme_info);
- // If there is a base theme, collect the names of all themes that may have
+ // If there is a base theme, collect the names of all themes that may have
// preprocess files to load.
- if(isset($theme_info->base_theme)) {
+ if (isset($theme_info->base_theme)) {
global $base_theme_info;
- foreach($base_theme_info as $base){
+ foreach ($base_theme_info as $base) {
$themes_active[] = $base->name;
}
}
// Add the active theme to the list of themes that may have preprocess files.
$themes_active[] = $theme_info->name;
-
// Check all active themes for preprocess files that will need to be loaded.
- foreach($themes_active as $name) {
- if(is_file(drupal_get_path('theme', $name) . '/preprocess/preprocess-' . str_replace('_', '-', $hook) . '.inc')) {
+ foreach ($themes_active as $name) {
+ if (is_file(drupal_get_path('theme', $name) . '/preprocess/preprocess-' . str_replace('_', '-', $hook) . '.inc')) {
include(drupal_get_path('theme', $name) . '/preprocess/preprocess-' . str_replace('_', '-', $hook) . '.inc');
}
}
@@ -62,9 +65,9 @@ function omega_process(&$vars, $hook) {
//krumo($theme_info);
// If there is a base theme, collect the names of all themes that may have
// preprocess files to load.
- if(isset($theme_info->base_theme)) {
+ if (isset($theme_info->base_theme)) {
global $base_theme_info;
- foreach($base_theme_info as $base){
+ foreach ($base_theme_info as $base) {
$themes_active[] = $base->name;
}
}
@@ -73,59 +76,80 @@ function omega_process(&$vars, $hook) {
$themes_active[] = $theme_info->name;
// Check all active themes for preprocess files that will need to be loaded.
- foreach($themes_active as $name) {
- if(is_file(drupal_get_path('theme', $name) . '/process/process-' . str_replace('_', '-', $hook) . '.inc')) {
+ foreach ($themes_active as $name) {
+ if (is_file(drupal_get_path('theme', $name) . '/process/process-' . str_replace('_', '-', $hook) . '.inc')) {
include(drupal_get_path('theme', $name) . '/process/process-' . str_replace('_', '-', $hook) . '.inc');
}
}
}
/**
+ * Implements template_preprocess_html().
+ *
* Preprocessor for page.tpl.php template file.
* The default functionality can be found in preprocess/preprocess-page.inc
*/
function omega_preprocess_html(&$vars) {
- // enable/disable optional CSS files
+ // enable/disable optional CSS files
if (theme_get_setting('reset_css') == '1') {
- drupal_add_css(drupal_get_path('theme', 'omega') .'/css/reset.css', 'theme', 'all');
+ drupal_add_css(drupal_get_path('theme', 'omega') . '/css/reset.css', 'theme', 'all');
}
if (theme_get_setting('text_css') == '1') {
- drupal_add_css(drupal_get_path('theme', 'omega') .'/css/text.css', 'theme', 'all');
+ drupal_add_css(drupal_get_path('theme', 'omega') . '/css/text.css', 'theme', 'all');
}
if (theme_get_setting('regions_css') == '1') {
- drupal_add_css(drupal_get_path('theme', 'omega') .'/css/regions.css', 'theme', 'all');
+ drupal_add_css(drupal_get_path('theme', 'omega') . '/css/regions.css', 'theme', 'all');
}
if (theme_get_setting('defaults_css') == '1') {
- drupal_add_css(drupal_get_path('theme', 'omega') .'/css/defaults.css', 'theme', 'all');
+ drupal_add_css(drupal_get_path('theme', 'omega') . '/css/defaults.css', 'theme', 'all');
}
if (theme_get_setting('custom_css') == '1') {
- drupal_add_css(drupal_get_path('theme', 'omega') .'/css/custom.css', 'theme', 'all');
+ drupal_add_css(drupal_get_path('theme', 'omega') . '/css/custom.css', 'theme', 'all');
+ }
+
+ // Add JavaScript for fluid width option
+ if (theme_get_setting('omega_fixed_fluid') == 'fluid') {
+ drupal_add_js(array('fluid_grid' => theme_get_setting('omega_fixed_fluid')), 'setting');
}
- // redeclare $styles
- $vars['styles'] = drupal_get_css();
+
}
+
+/**
+ * Implements template_preprocess_page().
+ */
function omega_preprocess_page(&$vars) {
-
-} // end preprocess_page
+
+}
+
+/**
+ * Implements template_preprocess_node().
+ */
function omega_preprocess_node(&$vars) {
-
-} // end preprocess_node
+}
+
+/**
+ * Implements template_process_page().
+ */
function omega_process_page(&$vars) {
-
-} // end process_page
+
+}
+
+/**
+ * Implements template_process_node().
+ */
function omega_process_node(&$vars) {
// Convert node attributes to a string and append to existing RDFa attributes.
$vars['attributes'] .= drupal_attributes($vars['node_attributes']);
-} // end process_node
+}
-/**
+/**
* NINESIXTY - Contextually adds 960 Grid System classes.
*
* The first parameter passed is the *default class*. All other parameters must
- * be set in pairs like so: "$variable, 3". The variable can be anything available
- * within a template file and the integer is the width set for the adjacent box
- * containing that variable.
+ * be set in pairs like so: "$variable, 3". The variable can be anything
+ * available within a template file and the integer is the width set for the
+ * adjacent box containing that variable.
*
* class="<?php print ns('grid-16', $var_a, 6); ?>"
*
@@ -160,14 +184,13 @@ function ns() {
return $output;
}
-
/**
* The region_builder function will create the variables needed to create
* a dynamic group of regions. This function is simply a quick pass-thru
* that will create either inline or stacked regions. This function will
- * not do any advanced functionality, but simply assing the appropriate
+ * not do any advanced functionality, but simply assing the appropriate
* classes based on the settings for the theme.
- *
+ *
* For a more advanced set of regions, dynamic_region_builder() will be used.
*/
function static_region_builder($region_data, $container_width, $vars) {
@@ -175,12 +198,12 @@ function static_region_builder($region_data, $container_width, $vars) {
foreach ($region_data AS $region => $info) {
// if we do have content for this region, let's create it.
if ($info['data']) {
- $vars[$region .'_classes'] = ns('grid-'. $info['width']);
+ $vars[$region . '_classes'] = ns('grid-' . $info['width']);
}
if (isset($info['spacing'])) {
foreach ($info['spacing'] AS $attribute => $value) {
if ($value) {
- $vars[$region .'_classes'] .= ' '. $attribute .'-'. $value;
+ $vars[$region . '_classes'] .= ' ' . $attribute . '-' . $value;
}
}
}
@@ -190,8 +213,8 @@ function static_region_builder($region_data, $container_width, $vars) {
function _omega_dynamic_zones($width, $conditions, $vars) {
- foreach($conditions AS $variable => $reaction) {
- if(($reaction['type'] && $vars['page'][$variable]) || (!$reaction['type'] && !$vars['page'][$variable])) {
+ foreach ($conditions AS $variable => $reaction) {
+ if (($reaction['type'] && isset($vars['page'][$variable])) || (!$reaction['type'] && !isset($vars['page'][$variable]))) {
$width = $width - $reaction['value'];
}
}
@@ -199,18 +222,19 @@ function _omega_dynamic_zones($width, $conditions, $vars) {
}
function _omega_dynamic_widths($width, $conditions, $vars) {
- foreach($conditions AS $variable => $zone) {
- if((isset($vars['page'][$variable])) && count($vars['page'][$variable]) > 0) {
+ foreach ($conditions AS $variable => $zone) {
+ if ((isset($vars['page'][$variable])) && count($vars['page'][$variable]) > 0) {
$width = $width - $zone['width'];
}
}
return $width;
}
+
/**
* The dynamic_region_builder function will be used to pass important zones
* like the content regions where the regions sent to the function MUST appear
* inline, and advanced calculations need to be done in order to display the as such
- *
+ *
* Stacked regions are not possible using this function, and should be passed through
* static_region_builder() instead.
*/
@@ -219,22 +243,22 @@ function dynamic_region_builder($region_data, $container_width, $vars) {
foreach ($region_data AS $region => $info) {
// if we do have content for this region, let's create it.
if (isset($info['data'])) {
- if(isset($info['primary'])) {
- $width = $container_width;
- $vars[$region .'_classes'] = ns('grid-'. _omega_dynamic_widths($width, $info['related'], $vars));
+ if (isset($info['primary'])) {
+ $width = $container_width;
+ $vars[$region . '_classes'] = ns('grid-' . _omega_dynamic_widths($width, $info['related'], $vars));
}
else {
- $width = $info['width'];
- $vars[$region .'_classes'] = ns('grid-'. $info['width']);
+ $width = $info['width'];
+ $vars[$region . '_classes'] = ns('grid-' . $info['width']);
}
// we know we have stuff to put here, so we can check for push & pull options
- if($info['pull']) {
- // looks like we do wanna pull, or this value would have been false, so let's boogie
- $vars[$region .'_classes'] .= ' '. ns('pull-'. _omega_dynamic_zones($info['pull']['width'], $info['pull']['conditions'], $vars));
+ if ($info['pull']) {
+ // looks like we do wanna pull, or this value would have been false, so let's boogie
+ $vars[$region . '_classes'] .= ' ' . ns('pull-' . _omega_dynamic_zones($info['pull']['width'], $info['pull']['conditions'], $vars));
}
- if($info['push']) {
- // looks like a push
- $vars[$region .'_classes'] .= ' '. ns('push-'. _omega_dynamic_zones($info['push']['width'], $info['push']['conditions'], $vars));
+ if ($info['push']) {
+ // looks like a push
+ $vars[$region . '_classes'] .= ' ' . ns('push-' . _omega_dynamic_zones($info['push']['width'], $info['push']['conditions'], $vars));
}
}
// currently ignored becuase we have not given prefix/suffix class options
@@ -242,8 +266,8 @@ function dynamic_region_builder($region_data, $container_width, $vars) {
if (isset($info['spacing'])) {
foreach ($info['spacing'] AS $attribute => $value) {
if ($value) {
- $vars[$region .'_classes'] .= ' '. $attribute .'-'. $value;
- }
+ $vars[$region . '_classes'] .= ' ' . $attribute . '-' . $value;
+ }
}
}
// \unused prefix/suffix stuffs
@@ -252,25 +276,23 @@ function dynamic_region_builder($region_data, $container_width, $vars) {
}
/**
- * The rfilter function takes one argument, an array of values for the regions
- * for a "group" of regions like preface or postscript
+ * The rfilter function takes one argument, an array of values for the regions
+ * for a "group" of regions like preface or postscript
* @param $vars
*/
function rfilter($vars) {
- return count(array_filter($vars));
+ return count(array_filter($vars));
}
/**
- * ZEN - Return a themed breadcrumb trail.
+ * ZEN - Returns HTML for a breadcrumb trail.
*
- * @param $breadcrumb
- * An array containing the breadcrumb links.
- * @return
- * A string containing the breadcrumb output.
+ * @param $variables
+ * An associative array containing:
+ * - breadcrumb: An array containing the breadcrumb links.
*/
-
function omega_breadcrumb($variables) {
- $breadcrumb = $variables['breadcrumb'];
+ $breadcrumb = $variables['breadcrumb'];
// Determine if we are to display the breadcrumb.
$show_breadcrumb = theme_get_setting('omega_breadcrumb');
if ($show_breadcrumb == 'yes' || $show_breadcrumb == 'admin' && arg(0) == 'admin') {
@@ -304,11 +326,10 @@ function omega_breadcrumb($variables) {
return '';
}
-
/**
- * Implementation of hook_theme().
+ * Implements hook_theme().
*
- * @return
+ * @todo Either remove this entirely, or clean up and document.
*/
function omega_theme(&$existing, $type, $theme, $path) {
//include_once './' . drupal_get_path('theme', 'omega') . '/theme-functions.inc';
@@ -316,20 +337,22 @@ function omega_theme(&$existing, $type, $theme, $path) {
// values may have changed, make sure they are saved in the database properly.
//omega_theme_get_default_settings($theme);
return array();
-}// */
+}
+
+/**
+ * Implements hook_css_alter().
+ * Alter CSS files before they are output on the page.
+ *
+ * @param $css
+ * An array of all CSS items (files and inline CSS) being requested on the page.
+ */
function omega_css_alter(&$css) {
-// fluid width option
- if(theme_get_setting('omega_fixed_fluid') == 'fluid') {
- $css_960 = drupal_get_path('theme', 'omega') .'/css/960.css';
- //drupal_add_css(drupal_get_path('theme', 'omega') .'/css/960-fluid.css', array('weight' => 1000));
- if (isset($css[$css_960])) {
- $css[$css_960]['data'] = drupal_get_path('theme', 'omega') .'/css/960-fluid.css';
- }
-
- $fluid_settings = array(
- 'fluid_grid' => theme_get_setting('omega_fixed_fluid'),
- );
- drupal_add_js($fluid_settings, 'setting');
- }
+ // fluid width option
+ if (theme_get_setting('omega_fixed_fluid') == 'fluid') {
+ $css_960 = drupal_get_path('theme', 'omega') . '/css/960.css';
+ if (isset($css[$css_960])) {
+ $css[$css_960]['data'] = drupal_get_path('theme', 'omega') . '/css/960-fluid.css';
+ }
+ }
}
diff --git a/theme-functions.inc b/theme-functions.inc
index 13bb990..a9cd847 100644
--- a/theme-functions.inc
+++ b/theme-functions.inc
@@ -1,2 +1,9 @@
<?php
// $Id$
+
+/**
+ * @file
+ * Seems like this should go... Was being referenced in theme-settings.php,
+ * but it's not necessary, especially if all it's meant to do is store
+ * overridden theme functions.
+ */ \ No newline at end of file
diff --git a/theme-settings.php b/theme-settings.php
index 392b0be..96bc50b 100644
--- a/theme-settings.php
+++ b/theme-settings.php
@@ -1,736 +1,730 @@
<?php
// $Id$
-// require_once for the functions that need to be available when we are outside
-// of the omega theme in the administrative interface
-//include_once './' . drupal_get_path('theme', 'omega') . '/template.theme-registry.inc';
-include_once './' . drupal_get_path('theme', 'omega') . '/theme-functions.inc';
+/**
+ * @file
+ * Theme settings for the Omega theme.
+ */
/**
- * Implementation of THEMEHOOK_settings() function.
+ * Implements hook_form_system_theme_settings_alter().
*
- * @param $saved_settings
- * array An array of saved settings for this theme.
- * @return
- * array A form array.
+ * @param $form
+ * Nested array of form elements that comprise the form.
+ * @param $form_state
+ * A keyed array containing the current state of the form.
*/
function omega_form_system_theme_settings_alter(&$form, &$form_state) {
// Add the form's CSS
- //drupal_add_css(drupal_get_path('theme', 'omega') . '/theme-settings.css', 'theme');
+ drupal_add_css(drupal_get_path('theme', 'omega') . '/css/omega_theme_settings.css', array('weight' => 1000));
// Add javascript to show/hide optional settings
- drupal_add_js(drupal_get_path('theme', 'omega') .'/js/omega_admin.js', array('weight' => 1000, 'type' => 'file', 'cache' => FALSE));
- drupal_add_css(drupal_get_path('theme', 'omega') .'/css/omega_theme_settings.css', array('weight' => 1000));
- for ($i = 1; $i <= 24; $i++){
+ drupal_add_js(drupal_get_path('theme', 'omega') . '/js/omega_admin.js', array('weight' => 1000, 'type' => 'file', 'cache' => FALSE));
+
+ for ($i = 1; $i <= 24; $i++) {
$grids[$i] = $i;
}
- for ($i = 0; $i <= 23; $i++){
+ for ($i = 0; $i <= 23; $i++) {
$spacing[$i] = $i;
}
$containers = array(
'12' => '12 column grid',
'16' => '16 column grid',
- '24' => '24 column grid'
- );
-
- // General Settings
- $form['omega_general'] = array(
- '#type' => 'vertical_tabs',
- '#prefix' => t('<h2 class="omega-config-title">General Omega 960 Settings</h2>'),
- '#description' => t('Configure generic options on rendering content in this theme.'),
- '#collapsible' => TRUE,
- '#collapsed' => TRUE,
- '#weight' => 10,
- );
- $form['omega_general']['optional_css'] = array(
- '#type' => 'fieldset',
- '#title' => t('Optional CSS Files'),
- '#description' => t('Here, you may disable default theme CSS provided by the Omega base theme.'),
- '#collapsible' => TRUE,
- '#collapsed' => TRUE,
- );
- $form['omega_general']['optional_css']['reset_css'] = array(
- '#type' => 'checkbox',
- '#title' => t('Enable reset.css'),
- '#default_value' => theme_get_setting('reset_css'),
- '#description' => t('reset.css is the default CSS reset standard created by <a href="http://meyerweb.com/eric/tools/css/reset/">Eric Meyer</a>.'),
- );
- $form['omega_general']['optional_css']['text_css'] = array(
- '#type' => 'checkbox',
- '#title' => t('Enable text.css'),
- '#default_value' => theme_get_setting('text_css'),
- '#description' => t('text.css offers some generic typography to give the default text presenation a bit more love.'),
- );
- $form['omega_general']['optional_css']['regions_css'] = array(
- '#type' => 'checkbox',
- '#title' => t('Enable regions.css'),
- '#default_value' => theme_get_setting('regions_css'),
- '#description' => t('regions.css defines all the default regions of the Omega theme and its sub-themes. Currently there are no defining characteristics in this file, and it can be disabled without affecting any region presentation.'),
- );
- $form['omega_general']['optional_css']['defaults_css'] = array(
- '#type' => 'checkbox',
- '#title' => t('Enable defaults.css'),
- '#default_value' => theme_get_setting('defaults_css'),
- '#description' => t('defaults.css gives the Omega theme the majority of the spacing and alignment CSS for various elements.'),
- );
- $form['omega_general']['optional_css']['custom_css'] = array(
- '#type' => 'checkbox',
- '#title' => t('Enable custom.css'),
- '#default_value' => theme_get_setting('custom_css'),
- '#description' => t('custom.css provides some additional CSS that is module related, and not a part of core drupal. Can be disabled and used as a reference for certain items. Contributed CSS that is not directly related to core markup will be in this file.'),
- );
- // Page titles
- $form['omega_general']['search_settings'] = array(
- '#type' => 'fieldset',
- '#title' => t('Search Settings'),
- '#description' => t('You may configure search settings here.'),
- '#collapsible' => TRUE,
- '#collapsed' => TRUE,
- );
- $form['omega_general']['search_settings']['omega_render_search_box'] = array(
- '#type' => 'checkbox',
- '#title' => t('Render tradional search box in theme.'),
- '#description' => t('By default in Drupal 7, the search box is no longer rendered in the theme. Enabling this setting will recreate that Drupal 6 behavior, allowing the search box to be renderd in the theme, AND as a block elsewhere should you choose.'),
- '#default_value' => theme_get_setting('omega_render_search_box'),
- );
- $form['omega_general']['search_settings']['omega_search_default_text'] = array(
- '#type' => 'textfield',
- '#title' => t('Custom Default Search Text'),
- '#size' => 60,
- '#default_value' => theme_get_setting('omega_search_default_text'),
- '#description' => t('Enter default value to use in search boxes.'),
- );
- $form['omega_general']['page_format_titles'] = array(
- '#type' => 'fieldset',
- '#title' => t('Page titles'),
- '#description' => t('This is the title that displays in the title bar of your web browser. Your site title, slogan, and mission can all be set on your Site Information page. [NOTE: For more advanced page title functionality, consider using the "Page Title" module. However, the Page titles theme settings do not work in combination with the "Page Title" module and will be disabled if you have it enabled.]'),
- '#collapsible' => TRUE,
- '#collapsed' => TRUE,
- );
- if (module_exists('page_title') == FALSE) {
-
- $form['omega_general']['page_format_titles']['general_page_title_settings'] = array(
- '#type' => 'fieldset',
- '#prefix' => t('<h3 class="omega-accordion"><a href="#">General Page Title Settings</a></h3><div class="omega-accordion-content">'),
- '#suffix' => '</div>',
- '#title' => t('Front page title'),
- '#description' => t('Your front page in particular should have important keywords for your site in the page title'),
- );
- // SEO configurable separator
- $form['omega_general']['page_format_titles']['general_page_title_settings']['configurable_separator'] = array(
- '#type' => 'textfield',
- '#title' => t('Title separator'),
- '#description' => t('Customize the separator character used in the page title'),
- '#size' => 60,
- '#default_value' => theme_get_setting('configurable_separator'),
- );
- // front page title
- $form['omega_general']['page_format_titles']['front_page_format_titles'] = array(
- '#type' => 'fieldset',
- '#prefix' => t('<h3 class="omega-accordion"><a href="#">Front page titles</a></h3><div class="omega-accordion-content">'),
- '#suffix' => '</div>',
- '#title' => t('Front page title'),
- '#description' => t('Your front page in particular should have important keywords for your site in the page title'),
- );
- $form['omega_general']['page_format_titles']['front_page_format_titles']['front_page_title_display'] = array(
- '#type' => 'select',
- '#title' => t('Set text of front page title'),
- '#default_value' => theme_get_setting('front_page_title_display'),
- '#options' => array(
- 'title_slogan' => t('Site title | Site slogan'),
- 'slogan_title' => t('Site slogan | Site title'),
- 'custom' => t('Custom (below)'),
- ),
- );
- $form['omega_general']['page_format_titles']['front_page_format_titles']['page_title_display_custom'] = array(
- '#type' => 'textfield',
- '#title' => t('Custom'),
- '#size' => 60,
- '#default_value' => theme_get_setting('page_title_display_custom'),
- '#description' => t('Enter a custom page title for your front page'),
- );
+ '24' => '24 column grid',
+ );
- // other pages title
- $form['omega_general']['page_format_titles']['other_page_format_titles'] = array(
- '#type' => 'fieldset',
- '#title' => t('Other page titles'),
- '#prefix' => t('<h3 class="omega-accordion"><a href="#">Other page titles</a></h3><div class="omega-accordion-content">'),
- '#suffix' => '</div>',
- );
- $form['omega_general']['page_format_titles']['other_page_format_titles']['other_page_title_display'] = array(
- '#type' => 'select',
- '#title' => t('Set text of other page titles'),
- '#collapsible' => TRUE,
- '#collapsed' => FALSE,
- '#default_value' => theme_get_setting('other_page_title_display'),
- '#options' => array(
- 'ptitle_slogan' => t('Page title | Site slogan'),
- 'ptitle_stitle' => t('Page title | Site title'),
- 'ptitle_custom' => t('Page title | Custom (below)'),
- 'custom' => t('Custom (below)'),
- ),
- );
- $form['omega_general']['page_format_titles']['other_page_format_titles']['other_page_title_display_custom'] = array(
- '#type' => 'textfield',
- '#title' => t('Custom'),
- '#size' => 60,
- '#default_value' => theme_get_setting('other_page_title_display_custom'),
- '#description' => t('Enter a custom page title for all other pages'),
- );
-
- }
- else {
- $form['omega_general']['page_format_titles']['#description'] = 'NOTICE: You currently have the "Page Title" module installed and enabled, so the Page titles theme settings have been disabled to prevent conflicts. If you wish to re-enable the Page titles theme settings, you must first disable the "Page Title" module.';
- $form['omega_general']['page_format_titles']['configurable_separator']['#disabled'] = 'disabled';
- }
+ // General Settings
+ $form['omega_general'] = array(
+ '#type' => 'vertical_tabs',
+ '#prefix' => t('<h2 class="omega-config-title">General Omega 960 Settings</h2>'),
+ '#description' => t('Configure generic options on rendering content in this theme.'),
+ '#collapsible' => TRUE,
+ '#collapsed' => TRUE,
+ '#weight' => 10,
+ );
+ $form['omega_general']['optional_css'] = array(
+ '#type' => 'fieldset',
+ '#title' => t('Optional CSS Files'),
+ '#description' => t('Here, you may disable default theme CSS provided by the Omega base theme.'),
+ '#collapsible' => TRUE,
+ '#collapsed' => TRUE,
+ );
+ $form['omega_general']['optional_css']['reset_css'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Enable reset.css'),
+ '#default_value' => theme_get_setting('reset_css'),
+ '#description' => t('reset.css is the default CSS reset standard created by <a href="http://meyerweb.com/eric/tools/css/reset/">Eric Meyer</a>.'),
+ );
+ $form['omega_general']['optional_css']['text_css'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Enable text.css'),
+ '#default_value' => theme_get_setting('text_css'),
+ '#description' => t('text.css offers some generic typography to give the default text presenation a bit more love.'),
+ );
+ $form['omega_general']['optional_css']['regions_css'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Enable regions.css'),
+ '#default_value' => theme_get_setting('regions_css'),
+ '#description' => t('regions.css defines all the default regions of the Omega theme and its sub-themes. Currently there are no defining characteristics in this file, and it can be disabled without affecting any region presentation.'),
+ );
+ $form['omega_general']['optional_css']['defaults_css'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Enable defaults.css'),
+ '#default_value' => theme_get_setting('defaults_css'),
+ '#description' => t('defaults.css gives the Omega theme the majority of the spacing and alignment CSS for various elements.'),
+ );
+ $form['omega_general']['optional_css']['custom_css'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Enable custom.css'),
+ '#default_value' => theme_get_setting('custom_css'),
+ '#description' => t('custom.css provides some additional CSS that is module related, and not a part of core drupal. Can be disabled and used as a reference for certain items. Contributed CSS that is not directly related to core markup will be in this file.'),
+ );
- // Breadcrumb
- $form['omega_general']['breadcrumb'] = array(
- '#type' => 'fieldset',
- '#title' => t('Breadcrumb settings'),
- '#attributes' => array('id' => 'omega-breadcrumb'),
- );
- $form['omega_general']['breadcrumb']['omega_breadcrumb'] = array(
- '#type' => 'select',
- '#title' => t('Display breadcrumb'),
- '#default_value' => theme_get_setting('omega_breadcrumb'),
- '#options' => array(
- 'yes' => t('Yes'),
- 'admin' => t('Only in admin section'),
- 'no' => t('No'),
- ),
- );
- $form['omega_general']['breadcrumb']['omega_breadcrumb_separator'] = array(
- '#type' => 'textfield',
- '#title' => t('Breadcrumb separator'),
- '#description' => t('Text only. Don’t forget to include spaces.'),
- '#default_value' => theme_get_setting('omega_breadcrumb_separator'),
- '#size' => 5,
- '#maxlength' => 10,
- );
- $form['omega_general']['breadcrumb']['omega_breadcrumb_home'] = array(
- '#type' => 'checkbox',
- '#title' => t('Show home page link in breadcrumb'),
- '#default_value' => theme_get_setting('omega_breadcrumb_home'),
- );
- $form['omega_general']['breadcrumb']['omega_breadcrumb_trailing'] = array(
- '#type' => 'checkbox',
- '#title' => t('Append a separator to the end of the breadcrumb'),
- '#default_value' => theme_get_setting('omega_breadcrumb_trailing'),
- '#description' => t('Useful when the breadcrumb is placed just before the title.'),
- );
- $form['omega_general']['breadcrumb']['omega_breadcrumb_title'] = array(
- '#type' => 'checkbox',
- '#title' => t('Append the content title to the end of the breadcrumb'),
- '#default_value' => theme_get_setting('omega_breadcrumb_title'),
- '#description' => t('Useful when the breadcrumb is not placed just before the title.'),
- );
+ // Page titles
+ $form['omega_general']['search_settings'] = array(
+ '#type' => 'fieldset',
+ '#title' => t('Search Settings'),
+ '#description' => t('You may configure search settings here.'),
+ '#collapsible' => TRUE,
+ '#collapsed' => TRUE,
+ );
+ $form['omega_general']['search_settings']['omega_render_search_box'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Render tradional search box in theme.'),
+ '#description' => t('By default in Drupal 7, the search box is no longer rendered in the theme. Enabling this setting will recreate that Drupal 6 behavior, allowing the search box to be renderd in the theme, AND as a block elsewhere should you choose.'),
+ '#default_value' => theme_get_setting('omega_render_search_box'),
+ );
+ $form['omega_general']['search_settings']['omega_search_default_text'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Custom Default Search Text'),
+ '#size' => 60,
+ '#default_value' => theme_get_setting('omega_search_default_text'),
+ '#description' => t('Enter default value to use in search boxes.'),
+ );
+ $form['omega_general']['page_format_titles'] = array(
+ '#type' => 'fieldset',
+ '#title' => t('Page titles'),
+ '#description' => t('This is the title that displays in the title bar of your web browser. Your site title, slogan, and mission can all be set on your Site Information page. [NOTE: For more advanced page title functionality, consider using the "Page Title" module. However, the Page titles theme settings do not work in combination with the "Page Title" module and will be disabled if you have it enabled.]'),
+ '#collapsible' => TRUE,
+ '#collapsed' => TRUE,
+ );
- // Region Settings
- $form['omega_regions'] = array(
- '#type' => 'vertical_tabs',
- '#prefix' => t('<h2 class="omega-config-title">960gs Region Settings</h2>'),
- '#weight' => -10,
- '#description' => t('Configure how your regions are rendered. This area is currently a quick implementation of an interface to allow end users to quickly build out and adjust the default page layout. This feature will be improved over time, and include much more flexibility.'),
+ if (module_exists('page_title') == FALSE) {
+ $form['omega_general']['page_format_titles']['general_page_title_settings'] = array(
+ '#type' => 'fieldset',
+ '#prefix' => t('<h3 class="omega-accordion"><a href="#">General Page Title Settings</a></h3><div class="omega-accordion-content">'),
+ '#suffix' => '</div>',
+ '#title' => t('Front page title'),
+ '#description' => t('Your front page in particular should have important keywords for your site in the page title'),
+ );
+ // SEO configurable separator
+ $form['omega_general']['page_format_titles']['general_page_title_settings']['configurable_separator'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Title separator'),
+ '#description' => t('Customize the separator character used in the page title'),
+ '#size' => 60,
+ '#default_value' => theme_get_setting('configurable_separator'),
+ );
+ // front page title
+ $form['omega_general']['page_format_titles']['front_page_format_titles'] = array(
+ '#type' => 'fieldset',
+ '#prefix' => t('<h3 class="omega-accordion"><a href="#">Front page titles</a></h3><div class="omega-accordion-content">'),
+ '#suffix' => '</div>',
+ '#title' => t('Front page title'),
+ '#description' => t('Your front page in particular should have important keywords for your site in the page title'),
+ );
+ $form['omega_general']['page_format_titles']['front_page_format_titles']['front_page_title_display'] = array(
+ '#type' => 'select',
+ '#title' => t('Set text of front page title'),
+ '#default_value' => theme_get_setting('front_page_title_display'),
+ '#options' => array(
+ 'title_slogan' => t('Site title | Site slogan'),
+ 'slogan_title' => t('Site slogan | Site title'),
+ 'custom' => t('Custom (below)'),
+ ),
+ );
+ $form['omega_general']['page_format_titles']['front_page_format_titles']['page_title_display_custom'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Custom'),
+ '#size' => 60,
+ '#default_value' => theme_get_setting('page_title_display_custom'),
+ '#description' => t('Enter a custom page title for your front page'),
);
- $form['omega_regions']['defaults'] = array(
- '#type' => 'fieldset',
- '#title' => t('Default Configuration'),
- );
- $form['omega_regions']['defaults']['omega_default_container_width'] = array(
- '#type' => 'select',
- '#title' => t('Default container width'),
- '#default_value' => theme_get_setting('omega_default_container_width'),
- '#options' => $containers,
- '#weight' => -50,
- '#description' => t('This width is used for regions like $help, $messages and other non-important regions in page.tpl.php'),
- );
- $default_omega_layout = theme_get_setting('omega_fixed_fluid') ? theme_get_setting('omega_fixed_fluid') : 'fixed';
- $form['omega_regions']['defaults']['omega_fixed_fluid'] = array(
- '#type' => 'radios',
- '#description' => t('You may select fluid layout, or the default fixed width layout.'),
- '#title' => t('Fixed / Fluid Layout'),
- '#default_value' => $default_omega_layout,
- '#options' => array(
- 'fixed' => t('Fixed width (theme default)'),
- 'fluid' => t('Fluid width'),
- ),
- );
- // Header Blocks
- $form['omega_regions']['branding'] = array(
- '#type' => 'fieldset',
- '#title' => t('Logo/Menu Configuration'),
- '#description' => t('Header region zones, including Logo/Branding, Primary & Secondary menus, Header first and Header Second. By default, the logo and menu elements are designed to display inline. This is accomplished by making the width of the grid elements for the logo and menus to equal the container width for those items, however, to make them stack, you can make each element have the full amount of grids that the container allows.'),
- );
-
- $form['omega_regions']['branding']['omega_branding_wrapper_width'] = array(
- '#type' => 'select',
- '#title' => t('Wrapper Area width for Logo/Navigation Elements'),
- '#default_value' => theme_get_setting('omega_branding_wrapper_width'),
- '#options' => $containers,
- '#description' => t('Container Grid width for the branding (logo) area and navigation menus.'),
- );
- $form['omega_regions']['branding']['omega_header_logo_width'] = array(
- '#type' => 'select',
- '#title' => t('Width for Logo/Branding area'),
- '#default_value' => theme_get_setting('omega_header_logo_width'),
- '#options' => $grids,
- '#description' => t('Grid width of the logo/branding area. This number should be less than or equal to the container width defined above.'),
- );
- $form['omega_regions']['branding']['omega_header_menu_width'] = array(
- '#type' => 'select',
- '#title' => t('Wrapper Area width for Menu Elements'),
- '#default_value' => theme_get_setting('omega_header_menu_width'),
- '#options' => $grids,
- '#description' => t('Grid width of the primary/secondary menu elements. This number should be less than or equal to the container width defined above.'),
- );
-
- $form['omega_regions']['headers'] = array(
- '#type' => 'fieldset',
- '#title' => t('Header Configuration'),
- '#description' => t(''),
- );
-
- $form['omega_regions']['headers']['omega_header_wrapper_width'] = array(
- '#type' => 'select',
- '#title' => t('Wrapper Area width for Header Elements'),
- '#default_value' => theme_get_setting('omega_header_wrapper_width'),
- '#options' => $containers,
- '#description' => t('Container Grid width for the header region areas.'),
- );
- $form['omega_regions']['headers']['omega_header_first_width'] = array(
- '#type' => 'select',
- '#title' => t('Contextual Width for Header First'),
- '#default_value' => theme_get_setting('omega_header_first_width'),
- '#options' => $grids,
- '#description' => t('Grid width of the first header region. This number should be less than or equal to the container width defined above.'),
- );
- $form['omega_regions']['headers']['omega_header_second_width'] = array(
- '#type' => 'select',
- '#title' => t('Contextual Width for Header Second'),
- '#default_value' => theme_get_setting('omega_header_second_width'),
- '#options' => $grids,
- '#description' => t('Grid width of the last header region. This number should be less than or equal to the container width defined above.'),
- );
- $form['omega_regions']['internal_nav'] = array(
- '#type' => 'fieldset',
- '#title' => t('Slogan/Breadcrumb/Search Configuration'),
- '#description' => t(''),
- );
- $form['omega_regions']['internal_nav']['omega_internal_nav_wrapper_width'] = array(
- '#type' => 'select',
- '#title' => t('Wrapper Area width for Breadcrumb/Slogan/Search'),
- '#default_value' => theme_get_setting('omega_internal_nav_wrapper_width'),
- '#options' => $containers,
- '#description' => t('Container Grid width for the breadcrumb/search/slogan area.'),
- );
- $form['omega_regions']['internal_nav']['omega_breadcrumb_slogan_width'] = array(
- '#type' => 'select',
- '#title' => t('Wrapper Area width for Breadcrumb/Slogan'),
- '#default_value' => theme_get_setting('omega_breadcrumb_slogan_width'),
- '#options' => $grids,
- '#description' => t('Grid width for the slogan/breadcrumb area. By default, the slogan will only appear in the zone if there is no breadcrumb avaiable.'),
- );
- $form['omega_regions']['internal_nav']['omega_search_width'] = array(
- '#type' => 'select',
- '#title' => t('Wrapper Area width for Search'),
- '#default_value' => theme_get_setting('omega_search_width'),
- '#options' => $grids,
- '#description' => t('Grid width for the search zone, which appears inline with the breadcrumb/slogan zone.'),
- );
- // Preface Blocks
- $form['omega_regions']['preface'] = array(
- '#type' => 'fieldset',
- '#title' => t('Preface Configuration'),
- '#description' => t('Grid configuration for preface zones. You may use prefix and suffix here to allow extra spacing between regions. You can create all regions inline if the total of the grid elements are less than or equal to the container width defind above. You may stack these items easily by making the elements grid width be the full amount defined by the container.'),
- );
- $form['omega_regions']['preface']['omega_preface_wrapper_grids'] = array(
- '#type' => 'select',
- '#title' => t('Preface Wrapper Container Grids'),
- '#default_value' => theme_get_setting('omega_preface_wrapper_grids'),
- '#options' => $containers,
- '#description' => t('Container Grid width for the preface regions.'),
- );
- $form['omega_regions']['preface']['omega_preface_first_width'] = array(
- '#type' => 'select',
- '#title' => t('Contextual Width for Preface First'),
- '#default_value' => theme_get_setting('omega_preface_first_width'),
- '#options' => $grids,
- '#description' => t('Grid width of the first preface region. This number should be less than or equal to the container width defined above.'),
- );
- $form['omega_regions']['preface']['omega_preface_first_prefix'] = array(
- '#type' => 'select',
- '#title' => t('Prefix Spacing for Preface First'),
- '#default_value' => theme_get_setting('omega_preface_first_prefix'),
- '#options' => $spacing,
- '#prefix' => '<div class="prefix_config">',
- '#suffix' => '</div>',
- '#description' => t('Adding prefix grids to this element will add padding to the left side of the element, creating spacing between the previous element.'),
- );
- $form['omega_regions']['preface']['omega_preface_first_suffix'] = array(
- '#type' => 'select',
- '#title' => t('Suffix Spacing for Preface First'),
- '#default_value' => theme_get_setting('omega_preface_first_suffix'),
- '#options' => $spacing,
- '#prefix' => '<div class="suffix_config">',
- '#suffix' => '</div>',
- '#description' => t('Adding suffix grids to this element will add padding to the right side of the element, creating spacing between the next element.'),
- );
- $form['omega_regions']['preface']['omega_preface_second_width'] = array(
- '#type' => 'select',
- '#title' => t('Contextual Width for Preface Second'),
- '#default_value' => theme_get_setting('omega_preface_second_width'),
- '#options' => $grids,
- '#description' => t('Grid width of the middle preface region. This number should be less than or equal to the container width defined above.'),
- );
- $form['omega_regions']['preface']['omega_preface_second_prefix'] = array(
- '#type' => 'select',
- '#title' => t('Prefix Spacing for Preface Second'),
- '#default_value' => theme_get_setting('omega_preface_second_prefix'),
- '#options' => $spacing,
- '#prefix' => '<div class="prefix_config">',
- '#suffix' => '</div>',
- '#description' => t('Adding prefix grids to this element will add padding to the left side of the element, creating spacing between the previous element.'),
- );
- $form['omega_regions']['preface']['omega_preface_second_suffix'] = array(
- '#type' => 'select',
- '#title' => t('Suffix Spacing for Preface Second'),
- '#default_value' => theme_get_setting('omega_preface_second_suffix'),
- '#options' => $spacing,
- '#prefix' => '<div class="suffix_config">',
- '#suffix' => '</div>',
- '#description' => t('Adding suffix grids to this element will add padding to the right side of the element, creating spacing between the next element.'),
- );
- $form['omega_regions']['preface']['omega_preface_third_width'] = array(
- '#type' => 'select',
- '#title' => t('Contextual Width for Preface Third'),
- '#default_value' => theme_get_setting('omega_preface_third_width'),
- '#options' => $grids,
- '#description' => t('Grid width of the last preface region. This number should be less than or equal to the container width defined above.'),
- );
- $form['omega_regions']['preface']['omega_preface_third_prefix'] = array(
- '#type' => 'select',
- '#title' => t('Prefix Spacing for Preface Third'),
- '#default_value' => theme_get_setting('omega_preface_third_prefix'),
- '#options' => $spacing,
- '#prefix' => '<div class="prefix_config">',
- '#suffix' => '</div>',
- '#description' => t('Adding prefix grids to this element will add padding to the left side of the element, creating spacing between the previous element.'),
- );
- $form['omega_regions']['preface']['omega_preface_third_suffix'] = array(
- '#type' => 'select',
- '#title' => t('Suffix Spacing for Preface Third'),
- '#default_value' => theme_get_setting('omega_preface_third_suffix'),
- '#options' => $spacing,
- '#prefix' => '<div class="suffix_config">',
- '#suffix' => '</div>',
- '#description' => t('Adding suffix grids to this element will add padding to the right side of the element, creating spacing between the next element.'),
- );
- // Main Body Regions
- $form['omega_regions']['main'] = array(
- '#type' => 'fieldset',
- '#title' => t('Content Layout Configuration'),
- '#description' => t('<p>Grid configurations for Content Zone, Sidebar First and Sidebar Second. The "main" regions here are the only true "smart" zone that will use the maximum container width to determine the appropriate width for elements in this zone based on which regions are displayed on the current page.</p><p>If your container grid is 16 grids, and you have a configuration of 4-8-4, which would imply two sidebars and the content zone, if all regions are present, this layout of 4-8-4 will be respected. However, if on a page, the first sidebar is empty of content, the content zone would then incorporate those leftover 4 grids, so your layout would be 12-4.'),
- );
- $form['omega_regions']['main']['defaults'] = array(
- '#type' => 'fieldset',
- '#title' => t('Content Layout Configuration Defaults'),
- '#prefix' => t('<h3 class="omega-accordion"><a href="#">Content Layout Configuration Defaults</a></h3><div class="omega-accordion-content">'),
- '#suffix' => '</div>',
- );
- $form['omega_regions']['main']['defaults']['omega_content_layout'] = array(
- '#type' => 'radios',
- '#description' => t('You may arrange the order and size of your sidebars and main content zones here.'),
- '#title' => t('Content Zone Layout'),
- '#default_value' => theme_get_setting('omega_content_layout'),
- '#options' => array(
- 'first_content_last' => t('Sidebar First - Content - Sidebar Second'),
- 'content_first_last' => t('Content - Sidebar First - Sidebar Second'),
- 'first_last_content' => t('Sidebar First - Sidebar Second - Content'),
- ),
- );
- $form['omega_regions']['main']['defaults']['omega_content_container_width'] = array(
- '#type' => 'select',
- '#title' => t('Container width for content zone'),
- '#default_value' => theme_get_setting('omega_content_container_width'),
- '#options' => $containers,
- '#description' => t('Container Grid width for the main content regions. This includes the content_top, content_bottom, and primary content zone.'),
- );
- $form['omega_regions']['main']['defaults']['omega_sidebar_first_width'] = array(
- '#type' => 'select',
- '#title' => t('Contextual Width for Sidebar First'),
- '#default_value' => theme_get_setting('omega_sidebar_first_width'),
- '#options' => $grids,
- '#description' => t('This number, combined with the Content Main and Sidebar Second determine the share of your grid for each element.'),
- );
- $form['omega_regions']['main']['defaults']['omega_content_main_width'] = array(
- '#type' => 'select',
- '#title' => t('Contextual Width for Main Content Region'),
- '#default_value' => theme_get_setting('omega_content_main_width'),
- '#options' => $grids,
- '#description' => t('This number, combined with the Sidebar First and Sidebar Second determine the share of your grid for each element.'),
- );
- $form['omega_regions']['main']['defaults']['omega_sidebar_second_width'] = array(
- '#type' => 'select',
- '#title' => t('Contextual Width for Sidebar Second'),
- '#default_value' => theme_get_setting('omega_sidebar_second_width'),
- '#options' => $grids,
- '#description' => t('This number, combined with the Sidebar First and Main Content determine the share of your grid for each element.'),
- );
-
- $form['omega_regions']['main']['front'] = array(
- '#type' => 'fieldset',
- '#title' => t('Content Layout Configuration for Front Page'),
- '#prefix' => t('<h3 class="omega-accordion"><a href="#">Content Layout Configuration for Front Page</a></h3><div class="omega-accordion-content">'),
- '#suffix' => '</div>',
- '#description' => t('<p>You have the ability to proide alternate setings here for the content zone on the front page.'),
- );
- $form['omega_regions']['main']['front']['omega_content_front_override'] = array(
- '#type' => 'checkbox',
- '#title' => t('Override settings for content zones on home page.'),
- '#default_value' => theme_get_setting('omega_content_front_override'),
- );
- $form['omega_regions']['main']['front']['omega_front_content_layout'] = array(
- '#type' => 'radios',
- '#description' => t('You may arrange the order and size of your sidebars and main content zones here.'),
- '#title' => t('Content Zone Layout'),
- '#default_value' => theme_get_setting('omega_front_content_layout'),
- '#options' => array(
- 'first_content_last' => t('Sidebar First - Content - Sidebar Second'),
- 'content_first_last' => t('Content - Sidebar First - Sidebar Second'),
- 'first_last_content' => t('Sidebar First - Sidebar Second - Content'),
- ),
- );
- $form['omega_regions']['main']['front']['omega_front_content_container_width'] = array(
- '#type' => 'select',
- '#title' => t('Container width for content zone'),
- '#default_value' => theme_get_setting('omega_front_content_container_width'),
- '#options' => $containers,
- '#description' => t('Container Grid width for the main content regions. This includes the content_top, content_bottom, and primary content zone.'),
- );
- $form['omega_regions']['main']['front']['omega_front_sidebar_first_width'] = array(
- '#type' => 'select',
- '#title' => t('Contextual Width for Sidebar First'),
- '#default_value' => theme_get_setting('omega_front_sidebar_first_width'),
- '#options' => $grids,
- '#description' => t('This number, combined with the Content Main and Sidebar Second determine the share of your grid for each element.'),
- );
- $form['omega_regions']['main']['front']['omega_front_content_main_width'] = array(
- '#type' => 'select',
- '#title' => t('Contextual Width for Main Content Region'),
- '#default_value' => theme_get_setting('omega_front_content_main_width'),
- '#options' => $grids,
- '#description' => t('This number, combined with the Sidebar First and Sidebar Second determine the share of your grid for each element.'),
- );
- $form['omega_regions']['main']['front']['omega_front_sidebar_second_width'] = array(
- '#type' => 'select',
- '#title' => t('Contextual Width for Sidebar Second'),
- '#default_value' => theme_get_setting('omega_front_sidebar_second_width'),
- '#options' => $grids,
- '#description' => t('This number, combined with the Sidebar First and Main Content determine the share of your grid for each element.'),
- );
- $form['omega_regions']['main']['combine'] = array(
- '#type' => 'fieldset',
- '#title' => t('Combine Sidebar Settings'),
- '#prefix' => t('<h3 class="omega-accordion"><a href="#">Combine Sidebar Settings</a></h3><div class="omega-accordion-content">'),
- '#suffix' => '</div>',
- );
- $options = array(t('Combine Sidebars on all except the listed pages.'), t('Combine Sidebars on only the listed pages.'));
- $description = t("Enter one page per line as Drupal paths. The '*' character is a wildcard. Example paths are %blog for the blog page and %blog-wildcard for every personal blog. %front is the front page.", array('%blog' => 'blog', '%blog-wildcard' => 'blog/*', '%front' => '<front>'));
- $form['omega_regions']['main']['combine']['sidebar_combine'] = array(
- '#type' => 'radios',
- '#title' => t('Combine Sidebars'),
- '#description' => t('This is useful for administrative pages, and in certain contexts. You may choose to in certain areas, combine the <strong>$sidebar_first</strong> and <strong>$sidebar_second</strong> to create one sidebar from the content of both.'),
- '#options' => $options,
- '#default_value' => theme_get_setting('sidebar_combine'),
- );
- $form['omega_regions']['main']['combine']['sidebar_contain_pages'] = array(
- '#type' => 'textarea',
- '#title' => t('Pages'),
- '#default_value' => theme_get_setting('sidebar_contain_pages'),
- '#description' => $description,
- );
-
-
-
- // Postscript Blocks
- $form['omega_regions']['postscript'] = array(
- '#type' => 'fieldset',
- '#title' => t('Postscript Configuration'),
- '#description' => t('Grid configuration for postscript zones. You may use prefix and suffix here to allow extra spacing between regions. You can create all regions inline if the total of the grid elements are less than or equal to the container width defind above. You may stack these items easily by making the elements grid width be the full amount defined by the container.'),
- '#collapsible' => TRUE,
- '#collapsed' => TRUE,
- );
- $form['omega_regions']['postscript']['omega_postscript_container_width'] = array(
- '#type' => 'select',
- '#title' => t('Container width for postscript regions'),
- '#default_value' => theme_get_setting('omega_postscript_container_width'),
- '#options' => $containers,
- '#description' => t('Container Grid width for the postscript regions.'),
- );
- $form['omega_regions']['postscript']['omega_postscript_first_width'] = array(
- '#type' => 'select',
- '#title' => t('Contextual Width for Postscript First'),
- '#default_value' => theme_get_setting('omega_postscript_first_width'),
- '#options' => $grids,
- '#description' => t('Grid width of the first postscript region. This number should be less than or equal to the container width defined above.'),
- );
- $form['omega_regions']['postscript']['omega_postscript_first_prefix'] = array(
- '#type' => 'select',
- '#title' => t('Prefix Spacing for Postscript First'),
- '#default_value' => theme_get_setting('omega_postscript_first_prefix'),
- '#options' => $spacing,
- '#prefix' => '<div class="prefix_config">',
- '#suffix' => '</div>',
- '#description' => t('Adding prefix grids to this element will add padding to the left side of the element, creating spacing between the previous element.'),
- );
- $form['omega_regions']['postscript']['omega_postscript_first_suffix'] = array(
- '#type' => 'select',
- '#title' => t('Suffix Spacing for Postscript First'),
- '#default_value' => theme_get_setting('omega_postscript_first_suffix'),
- '#options' => $spacing,
- '#prefix' => '<div class="suffix_config">',
- '#suffix' => '</div>',
- '#description' => t('Adding suffix grids to this element will add padding to the right side of the element, creating spacing between the next element.'),
- );
- $form['omega_regions']['postscript']['omega_postscript_second_width'] = array(
- '#type' => 'select',
- '#title' => t('Contextual Width for Postscript Second'),
- '#default_value' => theme_get_setting('omega_postscript_second_width'),
- '#options' => $grids,
- '#description' => t('Grid width of the second postscript region. This number should be less than or equal to the container width defined above.'),
- );
- $form['omega_regions']['postscript']['omega_postscript_second_prefix'] = array(
- '#type' => 'select',
- '#title' => t('Prefix Spacing for Postscript Second'),
- '#default_value' => theme_get_setting('omega_postscript_second_prefix'),
- '#options' => $spacing,
- '#prefix' => '<div class="prefix_config">',
- '#suffix' => '</div>',
- '#description' => t('Adding prefix grids to this element will add padding to the left side of the element, creating spacing between the previous element.'),
- );
- $form['omega_regions']['postscript']['omega_postscript_second_suffix'] = array(
- '#type' => 'select',
- '#title' => t('Suffix Spacing for Postscript Second'),
- '#default_value' => theme_get_setting('omega_postscript_second_suffix'),
- '#options' => $spacing,
- '#prefix' => '<div class="suffix_config">',
- '#suffix' => '</div>',
- '#description' => t('Adding suffix grids to this element will add padding to the right side of the element, creating spacing between the next element.'),
- );
- $form['omega_regions']['postscript']['omega_postscript_third_width'] = array(
- '#type' => 'select',
- '#title' => t('Contextual Width for Postscript Third'),
- '#default_value' => theme_get_setting('omega_postscript_third_width'),
- '#options' => $grids,
- '#description' => t('Grid width of the third postscript region. This number should be less than or equal to the container width defined above.'),
- );
- $form['omega_regions']['postscript']['omega_postscript_third_prefix'] = array(
- '#type' => 'select',
- '#title' => t('Prefix Spacing for Postscript Third'),
- '#default_value' => theme_get_setting('omega_postscript_third_prefix'),
- '#options' => $spacing,
- '#prefix' => '<div class="prefix_config">',
- '#suffix' => '</div>',
- '#description' => t('Adding prefix grids to this element will add padding to the left side of the element, creating spacing between the previous element.'),
- );
- $form['omega_regions']['postscript']['omega_postscript_third_suffix'] = array(
- '#type' => 'select',
- '#title' => t('Suffix Spacing for Postscript Third'),
- '#default_value' => theme_get_setting('omega_postscript_third_suffix'),
- '#options' => $spacing,
- '#prefix' => '<div class="suffix_config">',
- '#suffix' => '</div>',
- '#description' => t('Adding suffix grids to this element will add padding to the right side of the element, creating spacing between the next element.'),
- );
- $form['omega_regions']['postscript']['omega_postscript_fourth_width'] = array(
- '#type' => 'select',
- '#title' => t('Contextual Width for Postscript Fourth'),
- '#default_value' => theme_get_setting('omega_postscript_fourth_width'),
- '#options' => $grids,
- '#description' => t('Grid width of the fourth postscript region. This number should be less than or equal to the container width defined above.'),
- );
- $form['omega_regions']['postscript']['omega_postscript_fourth_prefix'] = array(
- '#type' => 'select',
- '#title' => t('Prefix Spacing for Postscript Fourth'),
- '#default_value' => theme_get_setting('omega_postscript_fourth_prefix'),
- '#options' => $spacing,
- '#prefix' => '<div class="prefix_config">',
- '#suffix' => '</div>',
- '#description' => t('Adding prefix grids to this element will add padding to the left side of the element, creating spacing between the previous element.'),
- );
- $form['omega_regions']['postscript']['omega_postscript_fourth_suffix'] = array(
- '#type' => 'select',
- '#title' => t('Suffix Spacing for Postscript Fourth'),
- '#default_value' => theme_get_setting('omega_postscript_fourth_suffix'),
- '#options' => $spacing,
- '#prefix' => '<div class="suffix_config">',
- '#suffix' => '</div>',
- '#description' => t('Adding suffix grids to this element will add padding to the right side of the element, creating spacing between the next element.'),
- );
- // Footer Blocks
- $form['omega_regions']['footer'] = array(
- '#type' => 'fieldset',
- '#title' => t('Footer Configuration'),
- '#description' => t('Grid configuration for footer zones. You can create both regions inline if the total of the grid elements are less than or equal to the container width defind above. You may stack these items easily by making the elements grid width be the full amount defined by the container.'),
- '#collapsible' => TRUE,
- '#collapsed' => TRUE,
- );
- $form['omega_regions']['footer']['omega_footer_container_width'] = array(
- '#type' => 'select',
- '#title' => t('Container width for footer regions'),
- '#default_value' => theme_get_setting('omega_footer_container_width'),
- '#options' => $containers,
- '#description' => t('Container Grid width for the footer regions.'),
- );
- $form['omega_regions']['footer']['omega_footer_first_width'] = array(
- '#type' => 'select',
- '#title' => t('Contextual Width for Footer First'),
- '#default_value' => theme_get_setting('omega_footer_first_width'),
- '#options' => $grids,
- '#description' => t('Grid width of the first footer region. This number should be less than or equal to the container width defined above.'),
- );
- $form['omega_regions']['footer']['omega_footer_second_width'] = array(
- '#type' => 'select',
- '#title' => t('Contextual Width for Footer Second'),
- '#default_value' => theme_get_setting('omega_footer_second_width'),
- '#options' => $grids,
- '#description' => t('Grid width of the last footer region. This number should be less than or equal to the container width defined above.'),
- );
- // Administrative Settings
- $form['omega_admin'] = array(
- '#type' => 'vertical_tabs',
- '#prefix' => t('<h2 class="omega-config-title">Administrative Omega 960 Settings</h2>'),
- '#description' => t('Configure options for administration and development.'),
- '#weight' => 11,
+ // other pages title
+ $form['omega_general']['page_format_titles']['other_page_format_titles'] = array(
+ '#type' => 'fieldset',
+ '#title' => t('Other page titles'),
+ '#prefix' => t('<h3 class="omega-accordion"><a href="#">Other page titles</a></h3><div class="omega-accordion-content">'),
+ '#suffix' => '</div>',
+ );
+ $form['omega_general']['page_format_titles']['other_page_format_titles']['other_page_title_display'] = array(
+ '#type' => 'select',
+ '#title' => t('Set text of other page titles'),
+ '#collapsible' => TRUE,
+ '#collapsed' => FALSE,
+ '#default_value' => theme_get_setting('other_page_title_display'),
+ '#options' => array(
+ 'ptitle_slogan' => t('Page title | Site slogan'),
+ 'ptitle_stitle' => t('Page title | Site title'),
+ 'ptitle_custom' => t('Page title | Custom (below)'),
+ 'custom' => t('Custom (below)'),
+ ),
+ );
+ $form['omega_general']['page_format_titles']['other_page_format_titles']['other_page_title_display_custom'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Custom'),
+ '#size' => 60,
+ '#default_value' => theme_get_setting('other_page_title_display_custom'),
+ '#description' => t('Enter a custom page title for all other pages'),
);
- // overlay toggle options
- $form['omega_admin']['grid_overlay'] = array(
- '#type' => 'fieldset',
- '#title' => t('Grid Overlay / Debugging'),
- '#collapsible' => TRUE,
- '#collapsed' => TRUE,
- );
- $form['omega_admin']['grid_overlay']['debug_grid_toggle'] = array(
- '#type' => 'checkbox',
- '#title' => t('Enable grid overlay/toggle for selected roles.'),
- '#default_value' => theme_get_setting('debug_grid_toggle'),
- );
- $form['omega_admin']['grid_overlay']['debug_grid_toggle_state'] = array(
- '#type' => 'checkbox',
- '#title' => t('Turn on grid overlay on page load. (otherwise requires clicking to enable)'),
- '#default_value' => theme_get_setting('debug_grid_toggle_state'),
- );
- $role_options = array_map('check_plain', user_roles());
- unset($role_options[1]);
- $form['omega_admin']['grid_overlay']['debug_grid_roles'] = array(
- '#type' => 'checkboxes',
- '#title' => t('Roles that may use the grid overlay/debugging tool. (User 1 Automatically has access.)'),
- '#default_value' => theme_get_setting('debug_grid_roles'),
- '#options' => $role_options,
- );
-
-
- // Return theme settings form
- return $form;
+ }
+ else {
+ $form['omega_general']['page_format_titles']['#description'] = 'NOTICE: You currently have the "Page Title" module installed and enabled, so the Page titles theme settings have been disabled to prevent conflicts. If you wish to re-enable the Page titles theme settings, you must first disable the "Page Title" module.';
+ $form['omega_general']['page_format_titles']['configurable_separator']['#disabled'] = 'disabled';
+ }
+
+ // Breadcrumb
+ $form['omega_general']['breadcrumb'] = array(
+ '#type' => 'fieldset',
+ '#title' => t('Breadcrumb settings'),
+ '#attributes' => array('id' => 'omega-breadcrumb'),
+ );
+ $form['omega_general']['breadcrumb']['omega_breadcrumb'] = array(
+ '#type' => 'select',
+ '#title' => t('Display breadcrumb'),
+ '#default_value' => theme_get_setting('omega_breadcrumb'),
+ '#options' => array(
+ 'yes' => t('Yes'),
+ 'admin' => t('Only in admin section'),
+ 'no' => t('No'),
+ ),
+ );
+ $form['omega_general']['breadcrumb']['omega_breadcrumb_separator'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Breadcrumb separator'),
+ '#description' => t('Text only. Don’t forget to include spaces.'),
+ '#default_value' => theme_get_setting('omega_breadcrumb_separator'),
+ '#size' => 5,
+ '#maxlength' => 10,
+ );
+ $form['omega_general']['breadcrumb']['omega_breadcrumb_home'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Show home page link in breadcrumb'),
+ '#default_value' => theme_get_setting('omega_breadcrumb_home'),
+ );
+ $form['omega_general']['breadcrumb']['omega_breadcrumb_trailing'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Append a separator to the end of the breadcrumb'),
+ '#default_value' => theme_get_setting('omega_breadcrumb_trailing'),
+ '#description' => t('Useful when the breadcrumb is placed just before the title.'),
+ );
+ $form['omega_general']['breadcrumb']['omega_breadcrumb_title'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Append the content title to the end of the breadcrumb'),
+ '#default_value' => theme_get_setting('omega_breadcrumb_title'),
+ '#description' => t('Useful when the breadcrumb is not placed just before the title.'),
+ );
+
+ // Region Settings
+ $form['omega_regions'] = array(
+ '#type' => 'vertical_tabs',
+ '#prefix' => t('<h2 class="omega-config-title">960gs Region Settings</h2>'),
+ '#weight' => -10,
+ '#description' => t('Configure how your regions are rendered. This area is currently a quick implementation of an interface to allow end users to quickly build out and adjust the default page layout. This feature will be improved over time, and include much more flexibility.'),
+ );
+ $form['omega_regions']['defaults'] = array(
+ '#type' => 'fieldset',
+ '#title' => t('Default Configuration'),
+ );
+ $form['omega_regions']['defaults']['omega_default_container_width'] = array(
+ '#type' => 'select',
+ '#title' => t('Default container width'),
+ '#default_value' => theme_get_setting('omega_default_container_width'),
+ '#options' => $containers,
+ '#weight' => -50,
+ '#description' => t('This width is used for regions like $help, $messages and other non-important regions in page.tpl.php'),
+ );
+ $default_omega_layout = theme_get_setting('omega_fixed_fluid') ? theme_get_setting('omega_fixed_fluid') : 'fixed';
+ $form['omega_regions']['defaults']['omega_fixed_fluid'] = array(
+ '#type' => 'radios',
+ '#description' => t('You may select fluid layout, or the default fixed width layout.'),
+ '#title' => t('Fixed / Fluid Layout'),
+ '#default_value' => $default_omega_layout,
+ '#options' => array(
+ 'fixed' => t('Fixed width (theme default)'),
+ 'fluid' => t('Fluid width'),
+ ),
+ );
+
+ // Header Blocks
+ $form['omega_regions']['branding'] = array(
+ '#type' => 'fieldset',
+ '#title' => t('Logo/Menu Configuration'),
+ '#description' => t('Header region zones, including Logo/Branding, Primary & Secondary menus, Header first and Header Second. By default, the logo and menu elements are designed to display inline. This is accomplished by making the width of the grid elements for the logo and menus to equal the container width for those items, however, to make them stack, you can make each element have the full amount of grids that the container allows.'),
+ );
+ $form['omega_regions']['branding']['omega_branding_wrapper_width'] = array(
+ '#type' => 'select',
+ '#title' => t('Wrapper Area width for Logo/Navigation Elements'),
+ '#default_value' => theme_get_setting('omega_branding_wrapper_width'),
+ '#options' => $containers,
+ '#description' => t('Container Grid width for the branding (logo) area and navigation menus.'),
+ );
+ $form['omega_regions']['branding']['omega_header_logo_width'] = array(
+ '#type' => 'select',
+ '#title' => t('Width for Logo/Branding area'),
+ '#default_value' => theme_get_setting('omega_header_logo_width'),
+ '#options' => $grids,
+ '#description' => t('Grid width of the logo/branding area. This number should be less than or equal to the container width defined above.'),
+ );
+ $form['omega_regions']['branding']['omega_header_menu_width'] = array(
+ '#type' => 'select',
+ '#title' => t('Wrapper Area width for Menu Elements'),
+ '#default_value' => theme_get_setting('omega_header_menu_width'),
+ '#options' => $grids,
+ '#description' => t('Grid width of the primary/secondary menu elements. This number should be less than or equal to the container width defined above.'),
+ );
+ $form['omega_regions']['headers'] = array(
+ '#type' => 'fieldset',
+ '#title' => t('Header Configuration'),
+ '#description' => t(''),
+ );
+ $form['omega_regions']['headers']['omega_header_wrapper_width'] = array(
+ '#type' => 'select',
+ '#title' => t('Wrapper Area width for Header Elements'),
+ '#default_value' => theme_get_setting('omega_header_wrapper_width'),
+ '#options' => $containers,
+ '#description' => t('Container Grid width for the header region areas.'),
+ );
+ $form['omega_regions']['headers']['omega_header_first_width'] = array(
+ '#type' => 'select',
+ '#title' => t('Contextual Width for Header First'),
+ '#default_value' => theme_get_setting('omega_header_first_width'),
+ '#options' => $grids,
+ '#description' => t('Grid width of the first header region. This number should be less than or equal to the container width defined above.'),
+ );
+ $form['omega_regions']['headers']['omega_header_second_width'] = array(
+ '#type' => 'select',
+ '#title' => t('Contextual Width for Header Second'),
+ '#default_value' => theme_get_setting('omega_header_second_width'),
+ '#options' => $grids,
+ '#description' => t('Grid width of the last header region. This number should be less than or equal to the container width defined above.'),
+ );
+ $form['omega_regions']['internal_nav'] = array(
+ '#type' => 'fieldset',
+ '#title' => t('Slogan/Breadcrumb/Search Configuration'),
+ '#description' => t(''),
+ );
+ $form['omega_regions']['internal_nav']['omega_internal_nav_wrapper_width'] = array(
+ '#type' => 'select',
+ '#title' => t('Wrapper Area width for Breadcrumb/Slogan/Search'),
+ '#default_value' => theme_get_setting('omega_internal_nav_wrapper_width'),
+ '#options' => $containers,
+ '#description' => t('Container Grid width for the breadcrumb/search/slogan area.'),
+ );
+ $form['omega_regions']['internal_nav']['omega_breadcrumb_slogan_width'] = array(
+ '#type' => 'select',
+ '#title' => t('Wrapper Area width for Breadcrumb/Slogan'),
+ '#default_value' => theme_get_setting('omega_breadcrumb_slogan_width'),
+ '#options' => $grids,
+ '#description' => t('Grid width for the slogan/breadcrumb area. By default, the slogan will only appear in the zone if there is no breadcrumb avaiable.'),
+ );
+ $form['omega_regions']['internal_nav']['omega_search_width'] = array(
+ '#type' => 'select',
+ '#title' => t('Wrapper Area width for Search'),
+ '#default_value' => theme_get_setting('omega_search_width'),
+ '#options' => $grids,
+ '#description' => t('Grid width for the search zone, which appears inline with the breadcrumb/slogan zone.'),
+ );
+
+ // Preface Blocks
+ $form['omega_regions']['preface'] = array(
+ '#type' => 'fieldset',
+ '#title' => t('Preface Configuration'),
+ '#description' => t('Grid configuration for preface zones. You may use prefix and suffix here to allow extra spacing between regions. You can create all regions inline if the total of the grid elements are less than or equal to the container width defind above. You may stack these items easily by making the elements grid width be the full amount defined by the container.'),
+ );
+ $form['omega_regions']['preface']['omega_preface_wrapper_grids'] = array(
+ '#type' => 'select',
+ '#title' => t('Preface Wrapper Container Grids'),
+ '#default_value' => theme_get_setting('omega_preface_wrapper_grids'),
+ '#options' => $containers,
+ '#description' => t('Container Grid width for the preface regions.'),
+ );
+ $form['omega_regions']['preface']['omega_preface_first_width'] = array(
+ '#type' => 'select',
+ '#title' => t('Contextual Width for Preface First'),
+ '#default_value' => theme_get_setting('omega_preface_first_width'),
+ '#options' => $grids,
+ '#description' => t('Grid width of the first preface region. This number should be less than or equal to the container width defined above.'),
+ );
+ $form['omega_regions']['preface']['omega_preface_first_prefix'] = array(
+ '#type' => 'select',
+ '#title' => t('Prefix Spacing for Preface First'),
+ '#default_value' => theme_get_setting('omega_preface_first_prefix'),
+ '#options' => $spacing,
+ '#prefix' => '<div class="prefix_config">',
+ '#suffix' => '</div>',
+ '#description' => t('Adding prefix grids to this element will add padding to the left side of the element, creating spacing between the previous element.'),
+ );
+ $form['omega_regions']['preface']['omega_preface_first_suffix'] = array(
+ '#type' => 'select',
+ '#title' => t('Suffix Spacing for Preface First'),
+ '#default_value' => theme_get_setting('omega_preface_first_suffix'),
+ '#options' => $spacing,
+ '#prefix' => '<div class="suffix_config">',
+ '#suffix' => '</div>',
+ '#description' => t('Adding suffix grids to this element will add padding to the right side of the element, creating spacing between the next element.'),
+ );
+ $form['omega_regions']['preface']['omega_preface_second_width'] = array(
+ '#type' => 'select',
+ '#title' => t('Contextual Width for Preface Second'),
+ '#default_value' => theme_get_setting('omega_preface_second_width'),
+ '#options' => $grids,
+ '#description' => t('Grid width of the middle preface region. This number should be less than or equal to the container width defined above.'),
+ );
+ $form['omega_regions']['preface']['omega_preface_second_prefix'] = array(
+ '#type' => 'select',
+ '#title' => t('Prefix Spacing for Preface Second'),
+ '#default_value' => theme_get_setting('omega_preface_second_prefix'),
+ '#options' => $spacing,
+ '#prefix' => '<div class="prefix_config">',
+ '#suffix' => '</div>',
+ '#description' => t('Adding prefix grids to this element will add padding to the left side of the element, creating spacing between the previous element.'),
+ );
+ $form['omega_regions']['preface']['omega_preface_second_suffix'] = array(
+ '#type' => 'select',
+ '#title' => t('Suffix Spacing for Preface Second'),
+ '#default_value' => theme_get_setting('omega_preface_second_suffix'),
+ '#options' => $spacing,
+ '#prefix' => '<div class="suffix_config">',
+ '#suffix' => '</div>',
+ '#description' => t('Adding suffix grids to this element will add padding to the right side of the element, creating spacing between the next element.'),
+ );
+ $form['omega_regions']['preface']['omega_preface_third_width'] = array(
+ '#type' => 'select',
+ '#title' => t('Contextual Width for Preface Third'),
+ '#default_value' => theme_get_setting('omega_preface_third_width'),
+ '#options' => $grids,
+ '#description' => t('Grid width of the last preface region. This number should be less than or equal to the container width defined above.'),
+ );
+ $form['omega_regions']['preface']['omega_preface_third_prefix'] = array(
+ '#type' => 'select',
+ '#title' => t('Prefix Spacing for Preface Third'),
+ '#default_value' => theme_get_setting('omega_preface_third_prefix'),
+ '#options' => $spacing,
+ '#prefix' => '<div class="prefix_config">',
+ '#suffix' => '</div>',
+ '#description' => t('Adding prefix grids to this element will add padding to the left side of the element, creating spacing between the previous element.'),
+ );
+ $form['omega_regions']['preface']['omega_preface_third_suffix'] = array(
+ '#type' => 'select',
+ '#title' => t('Suffix Spacing for Preface Third'),
+ '#default_value' => theme_get_setting('omega_preface_third_suffix'),
+ '#options' => $spacing,
+ '#prefix' => '<div class="suffix_config">',
+ '#suffix' => '</div>',
+ '#description' => t('Adding suffix grids to this element will add padding to the right side of the element, creating spacing between the next element.'),
+ );
+
+ // Main Body Regions
+ $form['omega_regions']['main'] = array(
+ '#type' => 'fieldset',
+ '#title' => t('Content Layout Configuration'),
+ '#description' => t('<p>Grid configurations for Content Zone, Sidebar First and Sidebar Second. The "main" regions here are the only true "smart" zone that will use the maximum container width to determine the appropriate width for elements in this zone based on which regions are displayed on the current page.</p><p>If your container grid is 16 grids, and you have a configuration of 4-8-4, which would imply two sidebars and the content zone, if all regions are present, this layout of 4-8-4 will be respected. However, if on a page, the first sidebar is empty of content, the content zone would then incorporate those leftover 4 grids, so your layout would be 12-4.'),
+ );
+ $form['omega_regions']['main']['defaults'] = array(
+ '#type' => 'fieldset',
+ '#title' => t('Content Layout Configuration Defaults'),
+ '#prefix' => t('<h3 class="omega-accordion"><a href="#">Content Layout Configuration Defaults</a></h3><div class="omega-accordion-content">'),
+ '#suffix' => '</div>',
+ );
+ $form['omega_regions']['main']['defaults']['omega_content_layout'] = array(
+ '#type' => 'radios',
+ '#description' => t('You may arrange the order and size of your sidebars and main content zones here.'),
+ '#title' => t('Content Zone Layout'),
+ '#default_value' => theme_get_setting('omega_content_layout'),
+ '#options' => array(
+ 'first_content_last' => t('Sidebar First - Content - Sidebar Second'),
+ 'content_first_last' => t('Content - Sidebar First - Sidebar Second'),
+ 'first_last_content' => t('Sidebar First - Sidebar Second - Content'),
+ ),
+ );
+ $form['omega_regions']['main']['defaults']['omega_content_container_width'] = array(
+ '#type' => 'select',
+ '#title' => t('Container width for content zone'),
+ '#default_value' => theme_get_setting('omega_content_container_width'),
+ '#options' => $containers,
+ '#description' => t('Container Grid width for the main content regions. This includes the content_top, content_bottom, and primary content zone.'),
+ );
+ $form['omega_regions']['main']['defaults']['omega_sidebar_first_width'] = array(
+ '#type' => 'select',
+ '#title' => t('Contextual Width for Sidebar First'),
+ '#default_value' => theme_get_setting('omega_sidebar_first_width'),
+ '#options' => $grids,
+ '#description' => t('This number, combined with the Content Main and Sidebar Second determine the share of your grid for each element.'),
+ );
+ $form['omega_regions']['main']['defaults']['omega_content_main_width'] = array(
+ '#type' => 'select',
+ '#title' => t('Contextual Width for Main Content Region'),
+ '#default_value' => theme_get_setting('omega_content_main_width'),
+ '#options' => $grids,
+ '#description' => t('This number, combined with the Sidebar First and Sidebar Second determine the share of your grid for each element.'),
+ );
+ $form['omega_regions']['main']['defaults']['omega_sidebar_second_width'] = array(
+ '#type' => 'select',
+ '#title' => t('Contextual Width for Sidebar Second'),
+ '#default_value' => theme_get_setting('omega_sidebar_second_width'),
+ '#options' => $grids,
+ '#description' => t('This number, combined with the Sidebar First and Main Content determine the share of your grid for each element.'),
+ );
+ $form['omega_regions']['main']['front'] = array(
+ '#type' => 'fieldset',
+ '#title' => t('Content Layout Configuration for Front Page'),
+ '#prefix' => t('<h3 class="omega-accordion"><a href="#">Content Layout Configuration for Front Page</a></h3><div class="omega-accordion-content">'),
+ '#suffix' => '</div>',
+ '#description' => t('<p>You have the ability to proide alternate setings here for the content zone on the front page.'),
+ );
+ $form['omega_regions']['main']['front']['omega_content_front_override'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Override settings for content zones on home page.'),
+ '#default_value' => theme_get_setting('omega_content_front_override'),
+ );
+ $form['omega_regions']['main']['front']['omega_front_content_layout'] = array(
+ '#type' => 'radios',
+ '#description' => t('You may arrange the order and size of your sidebars and main content zones here.'),
+ '#title' => t('Content Zone Layout'),
+ '#default_value' => theme_get_setting('omega_front_content_layout'),
+ '#options' => array(
+ 'first_content_last' => t('Sidebar First - Content - Sidebar Second'),
+ 'content_first_last' => t('Content - Sidebar First - Sidebar Second'),
+ 'first_last_content' => t('Sidebar First - Sidebar Second - Content'),
+ ),
+ );
+ $form['omega_regions']['main']['front']['omega_front_content_container_width'] = array(
+ '#type' => 'select',
+ '#title' => t('Container width for content zone'),
+ '#default_value' => theme_get_setting('omega_front_content_container_width'),
+ '#options' => $containers,
+ '#description' => t('Container Grid width for the main content regions. This includes the content_top, content_bottom, and primary content zone.'),
+ );
+ $form['omega_regions']['main']['front']['omega_front_sidebar_first_width'] = array(
+ '#type' => 'select',
+ '#title' => t('Contextual Width for Sidebar First'),
+ '#default_value' => theme_get_setting('omega_front_sidebar_first_width'),
+ '#options' => $grids,
+ '#description' => t('This number, combined with the Content Main and Sidebar Second determine the share of your grid for each element.'),
+ );
+ $form['omega_regions']['main']['front']['omega_front_content_main_width'] = array(
+ '#type' => 'select',
+ '#title' => t('Contextual Width for Main Content Region'),
+ '#default_value' => theme_get_setting('omega_front_content_main_width'),
+ '#options' => $grids,
+ '#description' => t('This number, combined with the Sidebar First and Sidebar Second determine the share of your grid for each element.'),
+ );
+ $form['omega_regions']['main']['front']['omega_front_sidebar_second_width'] = array(
+ '#type' => 'select',
+ '#title' => t('Contextual Width for Sidebar Second'),
+ '#default_value' => theme_get_setting('omega_front_sidebar_second_width'),
+ '#options' => $grids,
+ '#description' => t('This number, combined with the Sidebar First and Main Content determine the share of your grid for each element.'),
+ );
+ $form['omega_regions']['main']['combine'] = array(
+ '#type' => 'fieldset',
+ '#title' => t('Combine Sidebar Settings'),
+ '#prefix' => t('<h3 class="omega-accordion"><a href="#">Combine Sidebar Settings</a></h3><div class="omega-accordion-content">'),
+ '#suffix' => '</div>',
+ );
+ $options = array(t('Combine Sidebars on all except the listed pages.'), t('Combine Sidebars on only the listed pages.'));
+ $description = t("Enter one page per line as Drupal paths. The '*' character is a wildcard. Example paths are %blog for the blog page and %blog-wildcard for every personal blog. %front is the front page.", array('%blog' => 'blog', '%blog-wildcard' => 'blog/*', '%front' => '<front>'));
+ $form['omega_regions']['main']['combine']['sidebar_combine'] = array(
+ '#type' => 'radios',
+ '#title' => t('Combine Sidebars'),
+ '#description' => t('This is useful for administrative pages, and in certain contexts. You may choose to in certain areas, combine the <strong>$sidebar_first</strong> and <strong>$sidebar_second</strong> to create one sidebar from the content of both.'),
+ '#options' => $options,
+ '#default_value' => theme_get_setting('sidebar_combine'),
+ );
+ $form['omega_regions']['main']['combine']['sidebar_contain_pages'] = array(
+ '#type' => 'textarea',
+ '#title' => t('Pages'),
+ '#default_value' => theme_get_setting('sidebar_contain_pages'),
+ '#description' => $description,
+ );
+
+ // Postscript Blocks
+ $form['omega_regions']['postscript'] = array(
+ '#type' => 'fieldset',
+ '#title' => t('Postscript Configuration'),
+ '#description' => t('Grid configuration for postscript zones. You may use prefix and suffix here to allow extra spacing between regions. You can create all regions inline if the total of the grid elements are less than or equal to the container width defind above. You may stack these items easily by making the elements grid width be the full amount defined by the container.'),
+ '#collapsible' => TRUE,
+ '#collapsed' => TRUE,
+ );
+ $form['omega_regions']['postscript']['omega_postscript_container_width'] = array(
+ '#type' => 'select',
+ '#title' => t('Container width for postscript regions'),
+ '#default_value' => theme_get_setting('omega_postscript_container_width'),
+ '#options' => $containers,
+ '#description' => t('Container Grid width for the postscript regions.'),
+ );
+ $form['omega_regions']['postscript']['omega_postscript_first_width'] = array(
+ '#type' => 'select',
+ '#title' => t('Contextual Width for Postscript First'),
+ '#default_value' => theme_get_setting('omega_postscript_first_width'),
+ '#options' => $grids,
+ '#description' => t('Grid width of the first postscript region. This number should be less than or equal to the container width defined above.'),
+ );
+ $form['omega_regions']['postscript']['omega_postscript_first_prefix'] = array(
+ '#type' => 'select',
+ '#title' => t('Prefix Spacing for Postscript First'),
+ '#default_value' => theme_get_setting('omega_postscript_first_prefix'),
+ '#options' => $spacing,
+ '#prefix' => '<div class="prefix_config">',
+ '#suffix' => '</div>',
+ '#description' => t('Adding prefix grids to this element will add padding to the left side of the element, creating spacing between the previous element.'),
+ );
+ $form['omega_regions']['postscript']['omega_postscript_first_suffix'] = array(
+ '#type' => 'select',
+ '#title' => t('Suffix Spacing for Postscript First'),
+ '#default_value' => theme_get_setting('omega_postscript_first_suffix'),
+ '#options' => $spacing,
+ '#prefix' => '<div class="suffix_config">',
+ '#suffix' => '</div>',
+ '#description' => t('Adding suffix grids to this element will add padding to the right side of the element, creating spacing between the next element.'),
+ );
+ $form['omega_regions']['postscript']['omega_postscript_second_width'] = array(
+ '#type' => 'select',
+ '#title' => t('Contextual Width for Postscript Second'),
+ '#default_value' => theme_get_setting('omega_postscript_second_width'),
+ '#options' => $grids,
+ '#description' => t('Grid width of the second postscript region. This number should be less than or equal to the container width defined above.'),
+ );
+ $form['omega_regions']['postscript']['omega_postscript_second_prefix'] = array(
+ '#type' => 'select',
+ '#title' => t('Prefix Spacing for Postscript Second'),
+ '#default_value' => theme_get_setting('omega_postscript_second_prefix'),
+ '#options' => $spacing,
+ '#prefix' => '<div class="prefix_config">',
+ '#suffix' => '</div>',
+ '#description' => t('Adding prefix grids to this element will add padding to the left side of the element, creating spacing between the previous element.'),
+ );
+ $form['omega_regions']['postscript']['omega_postscript_second_suffix'] = array(
+ '#type' => 'select',
+ '#title' => t('Suffix Spacing for Postscript Second'),
+ '#default_value' => theme_get_setting('omega_postscript_second_suffix'),
+ '#options' => $spacing,
+ '#prefix' => '<div class="suffix_config">',
+ '#suffix' => '</div>',
+ '#description' => t('Adding suffix grids to this element will add padding to the right side of the element, creating spacing between the next element.'),
+ );
+ $form['omega_regions']['postscript']['omega_postscript_third_width'] = array(
+ '#type' => 'select',
+ '#title' => t('Contextual Width for Postscript Third'),
+ '#default_value' => theme_get_setting('omega_postscript_third_width'),
+ '#options' => $grids,
+ '#description' => t('Grid width of the third postscript region. This number should be less than or equal to the container width defined above.'),
+ );
+ $form['omega_regions']['postscript']['omega_postscript_third_prefix'] = array(
+ '#type' => 'select',
+ '#title' => t('Prefix Spacing for Postscript Third'),
+ '#default_value' => theme_get_setting('omega_postscript_third_prefix'),
+ '#options' => $spacing,
+ '#prefix' => '<div class="prefix_config">',
+ '#suffix' => '</div>',
+ '#description' => t('Adding prefix grids to this element will add padding to the left side of the element, creating spacing between the previous element.'),
+ );
+ $form['omega_regions']['postscript']['omega_postscript_third_suffix'] = array(
+ '#type' => 'select',
+ '#title' => t('Suffix Spacing for Postscript Third'),
+ '#default_value' => theme_get_setting('omega_postscript_third_suffix'),
+ '#options' => $spacing,
+ '#prefix' => '<div class="suffix_config">',
+ '#suffix' => '</div>',
+ '#description' => t('Adding suffix grids to this element will add padding to the right side of the element, creating spacing between the next element.'),
+ );
+ $form['omega_regions']['postscript']['omega_postscript_fourth_width'] = array(
+ '#type' => 'select',
+ '#title' => t('Contextual Width for Postscript Fourth'),
+ '#default_value' => theme_get_setting('omega_postscript_fourth_width'),
+ '#options' => $grids,
+ '#description' => t('Grid width of the fourth postscript region. This number should be less than or equal to the container width defined above.'),
+ );
+ $form['omega_regions']['postscript']['omega_postscript_fourth_prefix'] = array(
+ '#type' => 'select',
+ '#title' => t('Prefix Spacing for Postscript Fourth'),
+ '#default_value' => theme_get_setting('omega_postscript_fourth_prefix'),
+ '#options' => $spacing,
+ '#prefix' => '<div class="prefix_config">',
+ '#suffix' => '</div>',
+ '#description' => t('Adding prefix grids to this element will add padding to the left side of the element, creating spacing between the previous element.'),
+ );
+ $form['omega_regions']['postscript']['omega_postscript_fourth_suffix'] = array(
+ '#type' => 'select',
+ '#title' => t('Suffix Spacing for Postscript Fourth'),
+ '#default_value' => theme_get_setting('omega_postscript_fourth_suffix'),
+ '#options' => $spacing,
+ '#prefix' => '<div class="suffix_config">',
+ '#suffix' => '</div>',
+ '#description' => t('Adding suffix grids to this element will add padding to the right side of the element, creating spacing between the next element.'),
+ );
+
+ // Footer Blocks
+ $form['omega_regions']['footer'] = array(
+ '#type' => 'fieldset',
+ '#title' => t('Footer Configuration'),
+ '#description' => t('Grid configuration for footer zones. You can create both regions inline if the total of the grid elements are less than or equal to the container width defind above. You may stack these items easily by making the elements grid width be the full amount defined by the container.'),
+ '#collapsible' => TRUE,
+ '#collapsed' => TRUE,
+ );
+ $form['omega_regions']['footer']['omega_footer_container_width'] = array(
+ '#type' => 'select',
+ '#title' => t('Container width for footer regions'),
+ '#default_value' => theme_get_setting('omega_footer_container_width'),
+ '#options' => $containers,
+ '#description' => t('Container Grid width for the footer regions.'),
+ );
+ $form['omega_regions']['footer']['omega_footer_first_width'] = array(
+ '#type' => 'select',
+ '#title' => t('Contextual Width for Footer First'),
+ '#default_value' => theme_get_setting('omega_footer_first_width'),
+ '#options' => $grids,
+ '#description' => t('Grid width of the first footer region. This number should be less than or equal to the container width defined above.'),
+ );
+ $form['omega_regions']['footer']['omega_footer_second_width'] = array(
+ '#type' => 'select',
+ '#title' => t('Contextual Width for Footer Second'),
+ '#default_value' => theme_get_setting('omega_footer_second_width'),
+ '#options' => $grids,
+ '#description' => t('Grid width of the last footer region. This number should be less than or equal to the container width defined above.'),
+ );
+
+ // Administrative Settings
+ $form['omega_admin'] = array(
+ '#type' => 'vertical_tabs',
+ '#prefix' => t('<h2 class="omega-config-title">Administrative Omega 960 Settings</h2>'),
+ '#description' => t('Configure options for administration and development.'),
+ '#weight' => 11,
+ );
+ // overlay toggle options
+ $form['omega_admin']['grid_overlay'] = array(
+ '#type' => 'fieldset',
+ '#title' => t('Grid Overlay / Debugging'),
+ '#collapsible' => TRUE,
+ '#collapsed' => TRUE,
+ );
+ $form['omega_admin']['grid_overlay']['debug_grid_toggle'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Enable grid overlay/toggle for selected roles.'),
+ '#default_value' => theme_get_setting('debug_grid_toggle'),
+ );
+ $form['omega_admin']['grid_overlay']['debug_grid_toggle_state'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Turn on grid overlay on page load. (otherwise requires clicking to enable)'),
+ '#default_value' => theme_get_setting('debug_grid_toggle_state'),
+ );
+ $role_options = array_map('check_plain', user_roles());
+ unset($role_options[1]);
+ $form['omega_admin']['grid_overlay']['debug_grid_roles'] = array(
+ '#type' => 'checkboxes',
+ '#title' => t('Roles that may use the grid overlay/debugging tool. (User 1 Automatically has access.)'),
+ '#default_value' => theme_get_setting('debug_grid_roles'),
+ '#options' => $role_options,
+ );
} \ No newline at end of file