From ae2ebbd13b5bc1279a9459c1a98baf1d2dbcd323 Mon Sep 17 00:00:00 2001 From: Tim Steiner <tsteiner2@unl.edu> Date: Mon, 13 Jun 2011 20:16:52 +0000 Subject: [PATCH] [gh-142] Merging from testing into staging git-svn-id: file:///tmp/wdn_thm_drupal/branches/drupal-7.x/staging@725 20a16fea-79d4-4915-8869-1ea9d5ebf173 --- sites/all/themes/unl_wdn/html.tpl.php | 34 +++++++------ sites/all/themes/unl_wdn/page.tpl.php | 73 +++++++++++++-------------- 2 files changed, 54 insertions(+), 53 deletions(-) diff --git a/sites/all/themes/unl_wdn/html.tpl.php b/sites/all/themes/unl_wdn/html.tpl.php index 3683a737..4fe77522 100644 --- a/sites/all/themes/unl_wdn/html.tpl.php +++ b/sites/all/themes/unl_wdn/html.tpl.php @@ -35,9 +35,9 @@ $t = unl_wdn_get_instance(); if (theme_get_setting('use_base')) { - $t->head = PHP_EOL - . '<base href="' . url('<front>', array('absolute' => TRUE)) . '" />' . PHP_EOL - . $t->head; + $t->head = PHP_EOL + . '<base href="' . url('<front>', array('absolute' => TRUE)) . '" />' . PHP_EOL + . $t->head; } $t->head .= PHP_EOL @@ -50,7 +50,6 @@ $t->head .= PHP_EOL . theme_get_setting('head_html') . PHP_EOL ; - $t->doctitle = '<title>'.$head_title.'</title>'; $html = $t->toHtml(); @@ -67,19 +66,24 @@ if (theme_get_setting('wdn_beta')) { } if (module_exists('rdf')) { - $html = strtr($html, array( - '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">' => '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="'.$language->language.'" version="XHTML+RDFa 1.0" dir="'.$language->dir.'" '.$rdf_namespaces.'>', - '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">', - '<head>' => '<head profile="'.$grddl_profile.'">', - )); + $html = str_replace( + array('<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">', + '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">', + '<head>'), + array('<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="'.$language->language.'" version="XHTML+RDFa 1.0" dir="'.$language->dir.'" '.$rdf_namespaces.'>'.PHP_EOL, + '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">', + '<head profile="'.$grddl_profile.'">'), + $html); } -$html = strtr($html, array( - '<body class="fixed">' => '<body class="fixed '.$classes.'" '.$attributes.'>', - '<p class="skipnav">' => $page_top . PHP_EOL . '<p class="skipnav">', - '</body>' => $page_bottom . PHP_EOL . '</body>', -)); - +$html = str_replace( + array('<body class="fixed">', + '<p class="skipnav">', + '</body>'), + array('<body class="fixed '.$classes.'" '.$attributes.'>', + $page_top . PHP_EOL . '<p class="skipnav">', + $page_bottom . PHP_EOL . '</body>'), + $html); $format = filter_input(INPUT_GET, 'format', FILTER_SANITIZE_STRING); if ($format == 'partial') { diff --git a/sites/all/themes/unl_wdn/page.tpl.php b/sites/all/themes/unl_wdn/page.tpl.php index f3c8660c..b3859162 100644 --- a/sites/all/themes/unl_wdn/page.tpl.php +++ b/sites/all/themes/unl_wdn/page.tpl.php @@ -1,11 +1,9 @@ We need to output something to make drupal think this file actually does something. Any real output is being deferred to html.tpl.php <?php -// $Id: page.tpl.php,v 1.43 2010/01/30 07:59:25 dries Exp $ - /** * @file - * Default theme implementation to display a single Drupal page. + * unl_wdn theme implementation to display a single Drupal page. * * Available variables: * @@ -72,25 +70,23 @@ Any real output is being deferred to html.tpl.php $t = unl_wdn_get_instance(); - +// Breadcrumbs if (isset($breadcrumb)) { - $t->breadcrumbs = $breadcrumb; + $t->breadcrumbs = PHP_EOL.$breadcrumb.PHP_EOL; } -$t->navlinks = render($page['navlinks']); - +// Navigation +$t->navlinks = PHP_EOL.render($page['navlinks']); +// Site Title and Page Title if (isset($site_name) && $site_name) { - $t->titlegraphic = '<h1>' . $site_name . '</h1>'; + $t->titlegraphic = '<h1>' . $site_name . '</h1>'; } if (isset($title) && $title) { - $t->pagetitle = '<h2>' . render($title_prefix) . $title . render($title_suffix) . '</h2>'; + $t->pagetitle = '<h2>' . render($title_prefix) . $title . render($title_suffix) . '</h2>'; } - - - - +// Main Content Area $format = filter_input(INPUT_GET, 'format', FILTER_SANITIZE_STRING); if ($format == 'partial') { $t->maincontentarea = ''; @@ -102,66 +98,67 @@ else { } if ($page['sidebar_first']) { - $t->maincontentarea .= '<div id="sidebar-first" class="sidebar col left">' . PHP_EOL - . render($page['sidebar_first']) . PHP_EOL - . '</div>'; + $t->maincontentarea .= '<div id="sidebar-first" class="sidebar col left">' . PHP_EOL + . render($page['sidebar_first']) . PHP_EOL + . '</div>'; } if ($page['sidebar_first'] && !$page['sidebar_second']) { - $t->maincontentarea .= '<div class="three_col right">' . PHP_EOL; -} else if ($page['sidebar_first'] && $page['sidebar_second']) { - $t->maincontentarea .= '<div class="two_col">' . PHP_EOL; -} else if (!$page['sidebar_first'] && $page['sidebar_second']) { - $t->maincontentarea .= '<div class="three_col left">' . PHP_EOL; + $t->maincontentarea .= '<div class="three_col right">' . PHP_EOL; +} +else if ($page['sidebar_first'] && $page['sidebar_second']) { + $t->maincontentarea .= '<div class="two_col">' . PHP_EOL; +} +else if (!$page['sidebar_first'] && $page['sidebar_second']) { + $t->maincontentarea .= '<div class="three_col left">' . PHP_EOL; } $t->maincontentarea .= strtr(render($page['content']), array('sticky-enabled' => 'zentable cool')) . PHP_EOL; if ($page['sidebar_second']) { - $t->maincontentarea .= '</div>' . PHP_EOL - . '<div id="sidebar-second" class="sidebar col right">' . PHP_EOL - . render($page['sidebar_second']) . PHP_EOL - . '</div>' . PHP_EOL; + $t->maincontentarea .= '</div>' . PHP_EOL + . '<div id="sidebar-second" class="sidebar col right">' . PHP_EOL + . render($page['sidebar_second']) . PHP_EOL + . '</div>' . PHP_EOL; } if ($page['sidebar_first'] && !$page['sidebar_second']) { - $t->maincontentarea .= '</div>' . PHP_EOL; + $t->maincontentarea .= '</div>' . PHP_EOL; } - - - +// Related Links $leftcollinks = ''; if ($page['leftcollinks']) { - $leftcollinks = render($page['leftcollinks']); + $leftcollinks = render($page['leftcollinks']); } $t->leftcollinks = <<<EOF + <h3>Related Links</h3> $leftcollinks EOF; - +// Contacting Us $contactinfo = ''; if ($page['contactinfo']) { - $contactinfo = render($page['contactinfo']); + $contactinfo = render($page['contactinfo']); } $t->contactinfo = <<<EOF + <h3>Contacting Us</h3> $contactinfo EOF; - +// Optional Footer if ($page['optionalfooter']) { - $t->optionalfooter = render($page['optionalfooter']); + $t->optionalfooter = render($page['optionalfooter']); } - - +// Copyright Area if ($page['footercontent']) { - $t->footercontent = render($page['footercontent']); + $t->footercontent = PHP_EOL.render($page['footercontent']); } $t->footercontent = preg_replace('/©\s*[0-9]{4}/', '© ' . date('Y'), $t->footercontent); -$t->footercontent .= '<p style="margin:0.5em 0 -1.4em 0">This site is an instance of <a href="http://unlcms.unl.edu/" title="Go to the UNL CMS website">UNL CMS</a> powered by <a href="http://drupal.org/" title="Go to the official website of Drupal">Drupal</a></p>'; +$t->footercontent .= '<p style="margin:0.5em 0 -1.4em 0">This site is an instance of <a href="http://unlcms.unl.edu/" title="Go to the UNLcms website">UNLcms</a> powered by <a href="http://drupal.org/" title="Go to the Drupal website">Drupal</a></p>'; -- GitLab