Skip to content
Snippets Groups Projects
Commit 3cb758ff authored by Eric Rasmussen's avatar Eric Rasmussen
Browse files

[gh-302] Merging test into staging -c1476

git-svn-id: file:///tmp/wdn_thm_drupal/branches/drupal-7.x/staging@1477 20a16fea-79d4-4915-8869-1ea9d5ebf173
parent 3c7b3a37
No related branches found
No related tags found
No related merge requests found
Showing
with 826 additions and 102 deletions
......@@ -46,49 +46,15 @@ $t->doctitle = '<title>'.$head_title.'</title>';
$html = $t->toHtml();
if (theme_get_setting('wdn_beta')) {
$html = str_replace(
array('/wdn/templates',
'css/all.css',
'scripts/all.js'),
array('/wdntemplates-dev/wdn/templates',
'css/debug.css',
'scripts/debug.js'),
$html);
}
if (module_exists('rdf')) {
$html = str_replace(
array('<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">',
'<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" 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,
'<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 = str_replace(
array('<body class="fixed">',
'<p class="skipnav">',
array('<body class="',
'<nav class="skipnav">',
'</body>'),
array('<body class="fixed '.$classes.'" '.$attributes.'>',
$page_top . PHP_EOL . '<p class="skipnav">',
$page_bottom . PHP_EOL . '</body>'),
array('<body '.$attributes.' class="'.$classes.' ',
$page_top . '<nav class="skipnav">',
$page_bottom . '</body>'),
$html);
// Replace the header logo (used by affiliates)
if (isset($t->logo)) {
$html = str_replace('<a href="http://www.unl.edu/" title="UNL website"><img src="/wdn/templates_3.0/images/logo.png" alt="UNL graphic identifier" id="logo" /></a>',
$t->logo,
$html);
$html = str_replace('<h1>University of Nebraska&ndash;Lincoln</h1>',
'<h1>An Affiliate of the University of Nebraska&ndash;Lincoln</h1>',
$html);
}
$format = filter_input(INPUT_GET, 'format', FILTER_SANITIZE_STRING);
if ($format == 'partial') {
echo $t->maincontentarea;
......
<!DOCTYPE html>
<!--[if IEMobile 7 ]><html class="ie iem7"><!-- InstanceBegin template="/Templates/debug.dwt" codeOutsideHTMLIsLocked="false" --><![endif]-->
<!--[if lt IE 7 ]><html class="ie ie6" lang="en"><!-- InstanceBegin template="/Templates/debug.dwt" codeOutsideHTMLIsLocked="false" --><![endif]-->
<!--[if IE 7 ]><html class="ie ie7" lang="en"><!-- InstanceBegin template="/Templates/debug.dwt" codeOutsideHTMLIsLocked="false" --><![endif]-->
<!--[if IE 8 ]><html class="ie ie8" lang="en"><!-- InstanceBegin template="/Templates/debug.dwt" codeOutsideHTMLIsLocked="false" --><![endif]-->
<!--[if (gte IE 9)|(gt IEMobile 7) ]><html class="ie" lang="en"><!-- InstanceBegin template="/Templates/debug.dwt" codeOutsideHTMLIsLocked="false" --><![endif]-->
<!--[if !(IEMobile)|!(IE)]><!--><html lang="en"><!-- InstanceBegin template="/Templates/debug.dwt" codeOutsideHTMLIsLocked="false" --><!--<![endif]-->
<head>
<!--#include virtual="/wdn/templates_3.1/includes/metanfavico.html" -->
<!--
Membership and regular participation in the UNL Web Developer Network
is required to use the UNL templates. Visit the WDN site at
http://wdn.unl.edu/. Click the WDN Registry link to log in and
register your unl.edu site.
All UNL template code is the property of the UNL Web Developer Network.
The code seen in a source code view is not, and may not be used as, a
template. You may not use this code, a reverse-engineered version of
this code, or its associated visual presentation in whole or in part to
create a derivative work.
This message may not be removed from any pages based on the UNL site template.
$Id$
-->
<!--#include virtual="/wdn/templates_3.1/includes/scriptsandstyles_debug.html" -->
<!-- InstanceBeginEditable name="doctitle" -->
<title>Use a descriptive page title | Optional Site Title (use for context) | University of Nebraska&ndash;Lincoln</title>
<!-- InstanceEndEditable -->
<!-- InstanceBeginEditable name="head" -->
<!-- Place optional header elements here -->
<!-- InstanceEndEditable -->
<!-- TemplateParam name="class" type="text" value="fixed debug" -->
</head>
<body class="@@(_document['class'])@@">
<nav class="skipnav">
<a class="skipnav" href="#maincontent">Skip Navigation</a>
</nav>
<div id="wdn_wrapper">
<header id="header" role="banner">
<a id="logo" href="http://www.unl.edu/" title="UNL website">UNL</a>
<span id="wdn_institution_title">University of Nebraska&ndash;Lincoln</span>
<span id="wdn_site_title">
<!-- InstanceBeginEditable name="titlegraphic" -->
The Title of My Site
<!-- InstanceEndEditable -->
</span>
<!--#include virtual="/wdn/templates_3.1/includes/idm.html" -->
<!--#include virtual="/wdn/templates_3.1/includes/wdnTools.html" -->
</header>
<div id="wdn_navigation_bar">
<nav id="breadcrumbs">
<!-- WDN: see glossary item 'breadcrumbs' -->
<h3 class="wdn_list_descriptor hidden">Breadcrumbs</h3>
<!-- InstanceBeginEditable name="breadcrumbs" -->
<ul>
<li><a href="http://www.unl.edu/" title="University of Nebraska&ndash;Lincoln">UNL</a></li>
<li class="selected"><a href="#" title="Site Title">Site Title</a></li>
<li>Page Title</li>
</ul>
<!-- InstanceEndEditable -->
</nav>
<div id="wdn_navigation_wrapper">
<nav id="navigation" role="navigation">
<h3 class="wdn_list_descriptor hidden">Navigation</h3>
<!-- InstanceBeginEditable name="navlinks" -->
<!--#include virtual="../sharedcode/navigation.html" -->
<!-- InstanceEndEditable -->
</nav>
</div>
</div>
<div id="wdn_content_wrapper">
<div id="pagetitle">
<!-- InstanceBeginEditable name="pagetitle" -->
<h1>This is your page title. It's now an &lt;h1&gt;, baby!</h1>
<!-- InstanceEndEditable -->
</div>
<div id="maincontent" role="main">
<!--THIS IS THE MAIN CONTENT AREA; WDN: see glossary item 'main content area' -->
<!-- InstanceBeginEditable name="maincontentarea" -->
<h2>This is a blank page</h2>
<p>Impress your audience with awesome content!</p>
<!-- InstanceEndEditable -->
<div class="clear"></div>
<!--#include virtual="/wdn/templates_3.1/includes/noscript.html" -->
<!--THIS IS THE END OF THE MAIN CONTENT AREA.-->
</div>
</div>
<footer id="footer">
<div id="footer_floater"></div>
<div class="footer_col" id="wdn_footer_feedback">
<!--#include virtual="/wdn/templates_3.1/includes/feedback.html" -->
</div>
<div class="footer_col" id="wdn_footer_related">
<!-- InstanceBeginEditable name="leftcollinks" -->
<!--#include virtual="../sharedcode/relatedLinks.html" -->
<!-- InstanceEndEditable -->
</div>
<div class="footer_col" id="wdn_footer_contact">
<!-- InstanceBeginEditable name="contactinfo" -->
<!--#include virtual="../sharedcode/footerContactInfo.html" -->
<!-- InstanceEndEditable -->
</div>
<div class="footer_col" id="wdn_footer_share">
<!--#include virtual="/wdn/templates_3.1/includes/socialmediashare.html" -->
</div>
<!-- InstanceBeginEditable name="optionalfooter" -->
<!-- InstanceEndEditable -->
<div id="wdn_copyright">
<div>
<!-- InstanceBeginEditable name="footercontent" -->
<!--#include virtual="../sharedcode/footer.html" -->
<!-- InstanceEndEditable -->
<!--#include virtual="/wdn/templates_3.1/includes/wdn.html" -->
</div>
<!--#include virtual="/wdn/templates_3.1/includes/logos.html" -->
</div>
</footer>
</div>
</body>
</html>
<!DOCTYPE html>
<!--[if IEMobile 7 ]><html class="ie iem7"><!-- InstanceBegin template="/Templates/fixed.dwt" codeOutsideHTMLIsLocked="false" --><![endif]-->
<!--[if lt IE 7 ]><html class="ie ie6" lang="en"><!-- InstanceBegin template="/Templates/fixed.dwt" codeOutsideHTMLIsLocked="false" --><![endif]-->
<!--[if IE 7 ]><html class="ie ie7" lang="en"><!-- InstanceBegin template="/Templates/fixed.dwt" codeOutsideHTMLIsLocked="false" --><![endif]-->
<!--[if IE 8 ]><html class="ie ie8" lang="en"><!-- InstanceBegin template="/Templates/fixed.dwt" codeOutsideHTMLIsLocked="false" --><![endif]-->
<!--[if (gte IE 9)|(gt IEMobile 7) ]><html class="ie" lang="en"><!-- InstanceBegin template="/Templates/fixed.dwt" codeOutsideHTMLIsLocked="false" --><![endif]-->
<!--[if !(IEMobile)|!(IE)]><!--><html lang="en"><!-- InstanceBegin template="/Templates/fixed.dwt" codeOutsideHTMLIsLocked="false" --><!--<![endif]-->
<head>
<!--#include virtual="/wdn/templates_3.1/includes/metanfavico.html" -->
<!--
Membership and regular participation in the UNL Web Developer Network
is required to use the UNL templates. Visit the WDN site at
http://wdn.unl.edu/. Click the WDN Registry link to log in and
register your unl.edu site.
All UNL template code is the property of the UNL Web Developer Network.
The code seen in a source code view is not, and may not be used as, a
template. You may not use this code, a reverse-engineered version of
this code, or its associated visual presentation in whole or in part to
create a derivative work.
This message may not be removed from any pages based on the UNL site template.
$Id$
-->
<!--#include virtual="/wdn/templates_3.1/includes/scriptsandstyles.html" -->
<!-- InstanceBeginEditable name="doctitle" -->
<title>Use a descriptive page title | Optional Site Title (use for context) | University of Nebraska&ndash;Lincoln</title>
<!-- InstanceEndEditable -->
<!-- InstanceBeginEditable name="head" -->
<!-- Place optional header elements here -->
<!-- InstanceEndEditable -->
<!-- TemplateParam name="class" type="text" value="fixed" -->
</head>
<body class="@@(_document['class'])@@">
<nav class="skipnav">
<a class="skipnav" href="#maincontent">Skip Navigation</a>
</nav>
<div id="wdn_wrapper">
<header id="header" role="banner">
<a id="logo" href="http://www.unl.edu/" title="UNL website">UNL</a>
<span id="wdn_institution_title">University of Nebraska&ndash;Lincoln</span>
<span id="wdn_site_title">
<!-- InstanceBeginEditable name="titlegraphic" -->
The Title of My Site
<!-- InstanceEndEditable -->
</span>
<!--#include virtual="/wdn/templates_3.1/includes/idm.html" -->
<!--#include virtual="/wdn/templates_3.1/includes/wdnTools.html" -->
</header>
<div id="wdn_navigation_bar">
<nav id="breadcrumbs">
<!-- WDN: see glossary item 'breadcrumbs' -->
<h3 class="wdn_list_descriptor hidden">Breadcrumbs</h3>
<!-- InstanceBeginEditable name="breadcrumbs" -->
<ul>
<li><a href="http://www.unl.edu/" title="University of Nebraska&ndash;Lincoln">UNL</a></li>
<li class="selected"><a href="#" title="Site Title">Site Title</a></li>
<li>Page Title</li>
</ul>
<!-- InstanceEndEditable -->
</nav>
<div id="wdn_navigation_wrapper">
<nav id="navigation" role="navigation">
<h3 class="wdn_list_descriptor hidden">Navigation</h3>
<!-- InstanceBeginEditable name="navlinks" -->
<!--#include virtual="../sharedcode/navigation.html" -->
<!-- InstanceEndEditable -->
</nav>
</div>
</div>
<div id="wdn_content_wrapper">
<div id="pagetitle">
<!-- InstanceBeginEditable name="pagetitle" -->
<h1>This is your page title. It's now an &lt;h1&gt;, baby!</h1>
<!-- InstanceEndEditable -->
</div>
<div id="maincontent" role="main">
<!--THIS IS THE MAIN CONTENT AREA; WDN: see glossary item 'main content area' -->
<!-- InstanceBeginEditable name="maincontentarea" -->
<h2>This is a blank page</h2>
<p>Impress your audience with awesome content!</p>
<!-- InstanceEndEditable -->
<div class="clear"></div>
<!--#include virtual="/wdn/templates_3.1/includes/noscript.html" -->
<!--THIS IS THE END OF THE MAIN CONTENT AREA.-->
</div>
</div>
<footer id="footer">
<div id="footer_floater"></div>
<div class="footer_col" id="wdn_footer_feedback">
<!--#include virtual="/wdn/templates_3.1/includes/feedback.html" -->
</div>
<div class="footer_col" id="wdn_footer_related">
<!-- InstanceBeginEditable name="leftcollinks" -->
<!--#include virtual="../sharedcode/relatedLinks.html" -->
<!-- InstanceEndEditable -->
</div>
<div class="footer_col" id="wdn_footer_contact">
<!-- InstanceBeginEditable name="contactinfo" -->
<!--#include virtual="../sharedcode/footerContactInfo.html" -->
<!-- InstanceEndEditable -->
</div>
<div class="footer_col" id="wdn_footer_share">
<!--#include virtual="/wdn/templates_3.1/includes/socialmediashare.html" -->
</div>
<!-- InstanceBeginEditable name="optionalfooter" -->
<!-- InstanceEndEditable -->
<div id="wdn_copyright">
<div>
<!-- InstanceBeginEditable name="footercontent" -->
<!--#include virtual="../sharedcode/footer.html" -->
<!-- InstanceEndEditable -->
<!--#include virtual="/wdn/templates_3.1/includes/wdn.html" -->
</div>
<!--#include virtual="/wdn/templates_3.1/includes/logos.html" -->
</div>
</footer>
</div>
</body>
</html>
<!DOCTYPE html>
<!--[if IEMobile 7 ]><html class="ie iem7"><!-- InstanceBegin template="/Templates/unlaffiliate.dwt" codeOutsideHTMLIsLocked="false" --><![endif]-->
<!--[if lt IE 7 ]><html class="ie ie6" lang="en"><!-- InstanceBegin template="/Templates/unlaffiliate.dwt" codeOutsideHTMLIsLocked="false" --><![endif]-->
<!--[if IE 7 ]><html class="ie ie7" lang="en"><!-- InstanceBegin template="/Templates/unlaffiliate.dwt" codeOutsideHTMLIsLocked="false" --><![endif]-->
<!--[if IE 8 ]><html class="ie ie8" lang="en"><!-- InstanceBegin template="/Templates/unlaffiliate.dwt" codeOutsideHTMLIsLocked="false" --><![endif]-->
<!--[if (gte IE 9)|(gt IEMobile 7) ]><html class="ie" lang="en"><!-- InstanceBegin template="/Templates/unlaffiliate.dwt" codeOutsideHTMLIsLocked="false" --><![endif]-->
<!--[if !(IEMobile)|!(IE)]><!--><html lang="en"><!-- InstanceBegin template="/Templates/unlaffiliate.dwt" codeOutsideHTMLIsLocked="false" --><!--<![endif]-->
<head>
<!--#include virtual="/wdn/templates_3.1/includes/metanfavico.html" -->
<!--
Membership and regular participation in the UNL Web Developer Network
is required to use the UNL templates. Visit the WDN site at
http://wdn.unl.edu/. Click the WDN Registry link to log in and
register your unl.edu site.
All UNL template code is the property of the UNL Web Developer Network.
The code seen in a source code view is not, and may not be used as, a
template. You may not use this code, a reverse-engineered version of
this code, or its associated visual presentation in whole or in part to
create a derivative work.
This message may not be removed from any pages based on the UNL site template.
$Id$
-->
<!--#include virtual="/wdn/templates_3.1/includes/scriptsandstyles.html" -->
<!-- InstanceBeginEditable name="doctitle" -->
<title>Use a descriptive page title | Optional Site Title (use for context) | UNL Affiliate</title>
<!-- InstanceEndEditable -->
<!-- InstanceBeginEditable name="head" -->
<!-- Place optional header elements here -->
<link rel="stylesheet" type="text/css" media="screen" href="../sharedcode/affiliate.css" />
<link href="../sharedcode/affiliate_imgs/favicon.ico" rel="shortcut icon" />
<!-- InstanceEndEditable -->
<!-- TemplateParam name="class" type="text" value="fixed" -->
</head>
<body class="@@(_document['class'])@@">
<nav class="skipnav">
<a class="skipnav" href="#maincontent">Skip Navigation</a>
</nav>
<div id="wdn_wrapper">
<header id="header" role="banner">
<!-- InstanceBeginEditable name="sitebranding_logo" -->
<a id="logo" href="http://www.throughtheeyes.org/" title="Through the Eyes of the Child Initiative">Through the Eyes of the Child Initiative</a>
<!-- InstanceEndEditable -->
<span id="wdn_institution_title"><!-- InstanceBeginEditable name="sitebranding_affiliate" --><a href="http://www.unl.edu" title="University of Nebraska&ndash;Lincoln">An affiliate of the University of Nebraska&ndash;Lincoln</a>
<!-- InstanceEndEditable -->
</span>
<span id="wdn_site_title">
<!-- InstanceBeginEditable name="titlegraphic" -->
Throught the Eyes of a Child Initiative<span>A Nebraska Supreme Court Initiative</span>
<!-- InstanceEndEditable -->
</span>
<!--#include virtual="/wdn/templates_3.1/includes/idm.html" -->
<!--#include virtual="/wdn/templates_3.1/includes/wdnTools.html" -->
</header>
<div id="wdn_navigation_bar">
<nav id="breadcrumbs">
<!-- WDN: see glossary item 'breadcrumbs' -->
<h3 class="wdn_list_descriptor hidden">Breadcrumbs</h3>
<!-- InstanceBeginEditable name="breadcrumbs" -->
<ul>
<li><a href="http://www.throughtheeyes.org/" title="Through the Eyes of the Child Initiative">Home</a></li>
</ul>
<!-- InstanceEndEditable -->
</nav>
<div id="wdn_navigation_wrapper">
<nav id="navigation" role="navigation">
<h3 class="wdn_list_descriptor hidden">Navigation</h3>
<!-- InstanceBeginEditable name="navlinks" -->
<!--#include virtual="../sharedcode/navigation.html" -->
<!-- InstanceEndEditable -->
</nav>
</div>
</div>
<div id="wdn_content_wrapper">
<div id="pagetitle">
<!-- InstanceBeginEditable name="pagetitle" -->
<h1>This is your page title. It's now an &lt;h1&gt;, baby!</h1>
<!-- InstanceEndEditable -->
</div>
<div id="maincontent" role="main">
<!--THIS IS THE MAIN CONTENT AREA; WDN: see glossary item 'main content area' -->
<!-- InstanceBeginEditable name="maincontentarea" -->
<h2>This is a blank page</h2>
<p>Impress your audience with awesome content!</p>
<!-- InstanceEndEditable -->
<div class="clear"></div>
<!--#include virtual="/wdn/templates_3.1/includes/noscript.html" -->
<!--THIS IS THE END OF THE MAIN CONTENT AREA.-->
</div>
</div>
<footer id="footer">
<div id="footer_floater"></div>
<div class="footer_col" id="wdn_footer_feedback">
<!--#include virtual="/wdn/templates_3.1/includes/feedback.html" -->
</div>
<div class="footer_col" id="wdn_footer_related">
<!-- InstanceBeginEditable name="leftcollinks" -->
<!--#include virtual="../sharedcode/relatedLinks.html" -->
<!-- InstanceEndEditable -->
</div>
<div class="footer_col" id="wdn_footer_contact">
<!-- InstanceBeginEditable name="contactinfo" -->
<!--#include virtual="../sharedcode/footerContactInfo.html" -->
<!-- InstanceEndEditable -->
</div>
<div class="footer_col" id="wdn_footer_share">
<!--#include virtual="/wdn/templates_3.1/includes/socialmediashare.html" -->
</div>
<!-- InstanceBeginEditable name="optionalfooter" -->
<!-- InstanceEndEditable -->
<div id="wdn_copyright">
<div>
<!-- InstanceBeginEditable name="footercontent" -->
<!--#include virtual="../sharedcode/footer.html" -->
<!-- InstanceEndEditable -->
<!--#include virtual="/wdn/templates_3.1/includes/wdn.html" -->
</div>
<!--#include virtual="/wdn/templates_3.1/includes/logos.html" -->
</div>
</footer>
</div>
</body>
</html>
<!DOCTYPE html>
<!--[if IEMobile 7 ]><html class="ie iem7"><!-- InstanceBegin template="/Templates/unlaffiliate_debug.dwt" codeOutsideHTMLIsLocked="false" --><![endif]-->
<!--[if lt IE 7 ]><html class="ie ie6" lang="en"><!-- InstanceBegin template="/Templates/unlaffiliate_debug.dwt" codeOutsideHTMLIsLocked="false" --><![endif]-->
<!--[if IE 7 ]><html class="ie ie7" lang="en"><!-- InstanceBegin template="/Templates/unlaffiliate_debug.dwt" codeOutsideHTMLIsLocked="false" --><![endif]-->
<!--[if IE 8 ]><html class="ie ie8" lang="en"><!-- InstanceBegin template="/Templates/unlaffiliate_debug.dwt" codeOutsideHTMLIsLocked="false" --><![endif]-->
<!--[if (gte IE 9)|(gt IEMobile 7) ]><html class="ie" lang="en"><!-- InstanceBegin template="/Templates/unlaffiliate_debug.dwt" codeOutsideHTMLIsLocked="false" --><![endif]-->
<!--[if !(IEMobile)|!(IE)]><!--><html lang="en"><!-- InstanceBegin template="/Templates/unlaffiliate_debug.dwt" codeOutsideHTMLIsLocked="false" --><!--<![endif]-->
<head>
<!--#include virtual="/wdn/templates_3.1/includes/metanfavico.html" -->
<!--
Membership and regular participation in the UNL Web Developer Network
is required to use the UNL templates. Visit the WDN site at
http://wdn.unl.edu/. Click the WDN Registry link to log in and
register your unl.edu site.
All UNL template code is the property of the UNL Web Developer Network.
The code seen in a source code view is not, and may not be used as, a
template. You may not use this code, a reverse-engineered version of
this code, or its associated visual presentation in whole or in part to
create a derivative work.
This message may not be removed from any pages based on the UNL site template.
$Id$
-->
<!--#include virtual="/wdn/templates_3.1/includes/scriptsandstyles_debug.html" -->
<!-- InstanceBeginEditable name="doctitle" -->
<title>Use a descriptive page title | Optional Site Title (use for context) | UNL Affiliate</title>
<!-- InstanceEndEditable -->
<!-- InstanceBeginEditable name="head" -->
<!-- Place optional header elements here -->
<link rel="stylesheet" type="text/css" media="screen" href="../sharedcode/affiliate.css" />
<link href="../sharedcode/affiliate_imgs/favicon.ico" rel="shortcut icon" />
<!-- InstanceEndEditable -->
<!-- TemplateParam name="class" type="text" value="fixed debug" -->
</head>
<body class="@@(_document['class'])@@">
<nav class="skipnav">
<a class="skipnav" href="#maincontent">Skip Navigation</a>
</nav>
<div id="wdn_wrapper">
<header id="header" role="banner">
<!-- InstanceBeginEditable name="sitebranding_logo" -->
<a id="logo" href="http://www.throughtheeyes.org/" title="Through the Eyes of the Child Initiative">Through the Eyes of the Child Initiative</a>
<!-- InstanceEndEditable -->
<span id="wdn_institution_title"><!-- InstanceBeginEditable name="sitebranding_affiliate" --><a href="http://www.unl.edu" title="University of Nebraska&ndash;Lincoln">An affiliate of the University of Nebraska&ndash;Lincoln</a>
<!-- InstanceEndEditable -->
</span>
<span id="wdn_site_title">
<!-- InstanceBeginEditable name="titlegraphic" -->
Throught the Eyes of a Child Initiative<span>A Nebraska Supreme Court Initiative</span>
<!-- InstanceEndEditable -->
</span>
<!--#include virtual="/wdn/templates_3.1/includes/idm.html" -->
<!--#include virtual="/wdn/templates_3.1/includes/wdnTools.html" -->
</header>
<div id="wdn_navigation_bar">
<nav id="breadcrumbs">
<!-- WDN: see glossary item 'breadcrumbs' -->
<h3 class="wdn_list_descriptor hidden">Breadcrumbs</h3>
<!-- InstanceBeginEditable name="breadcrumbs" -->
<ul>
<li><a href="http://www.throughtheeyes.org/" title="Through the Eyes of the Child Initiative">Home</a></li>
</ul>
<!-- InstanceEndEditable -->
</nav>
<div id="wdn_navigation_wrapper">
<nav id="navigation" role="navigation">
<h3 class="wdn_list_descriptor hidden">Navigation</h3>
<!-- InstanceBeginEditable name="navlinks" -->
<!--#include virtual="../sharedcode/navigation.html" -->
<!-- InstanceEndEditable -->
</nav>
</div>
</div>
<div id="wdn_content_wrapper">
<div id="pagetitle">
<!-- InstanceBeginEditable name="pagetitle" -->
<h1>This is your page title. It's now an &lt;h1&gt;, baby!</h1>
<!-- InstanceEndEditable -->
</div>
<div id="maincontent" role="main">
<!--THIS IS THE MAIN CONTENT AREA; WDN: see glossary item 'main content area' -->
<!-- InstanceBeginEditable name="maincontentarea" -->
<h2>This is a blank page</h2>
<p>Impress your audience with awesome content!</p>
<!-- InstanceEndEditable -->
<div class="clear"></div>
<!--#include virtual="/wdn/templates_3.1/includes/noscript.html" -->
<!--THIS IS THE END OF THE MAIN CONTENT AREA.-->
</div>
</div>
<footer id="footer">
<div id="footer_floater"></div>
<div class="footer_col" id="wdn_footer_feedback">
<!--#include virtual="/wdn/templates_3.1/includes/feedback.html" -->
</div>
<div class="footer_col" id="wdn_footer_related">
<!-- InstanceBeginEditable name="leftcollinks" -->
<!--#include virtual="../sharedcode/relatedLinks.html" -->
<!-- InstanceEndEditable -->
</div>
<div class="footer_col" id="wdn_footer_contact">
<!-- InstanceBeginEditable name="contactinfo" -->
<!--#include virtual="../sharedcode/footerContactInfo.html" -->
<!-- InstanceEndEditable -->
</div>
<div class="footer_col" id="wdn_footer_share">
<!--#include virtual="/wdn/templates_3.1/includes/socialmediashare.html" -->
</div>
<!-- InstanceBeginEditable name="optionalfooter" -->
<!-- InstanceEndEditable -->
<div id="wdn_copyright">
<div>
<!-- InstanceBeginEditable name="footercontent" -->
<!--#include virtual="../sharedcode/footer.html" -->
<!-- InstanceEndEditable -->
<!--#include virtual="/wdn/templates_3.1/includes/wdn.html" -->
</div>
<!--#include virtual="/wdn/templates_3.1/includes/logos.html" -->
</div>
</footer>
</div>
</body>
</html>
_notes
<?php
set_include_path(dirname(dirname(dirname(__DIR__))).'/src'.PATH_SEPARATOR.dirname(dirname(dirname(__DIR__))).'/vendor/php');
require_once 'UNL/Templates.php';
class CustomClass
......
......@@ -7,18 +7,21 @@
*/
ini_set('display_errors', true);
error_reporting(E_ALL);
set_include_path(realpath(dirname(__FILE__).'/../../').PATH_SEPARATOR.realpath(dirname(__FILE__).'/../../../../php'));
set_include_path(dirname(dirname(__DIR__)).'/src'.PATH_SEPARATOR.dirname(dirname(__DIR__)).'/vendor/php');
require_once 'UNL/Templates.php';
UNL_Templates::$options['version'] = 3;
// Optionally set the version you'd like to use
UNL_Templates::$options['version'] = 3.1;
$page = UNL_Templates::factory('Fixed', array('sharedcodepath' => 'sharedcode'));
$page->addScript('test.js');
$page->addScriptDeclaration('function sayHello(){alert("Hello!");}');
$page->addStylesheet('foo.css');
$page->addStyleDeclaration('.foo {font-weight:bold;}');
$page->titlegraphic = '<h1>Hello UNL Templates</h1>';
$page->titlegraphic = 'Hello UNL Templates';
$page->pagetitle = '<h1>This is my page title h1.</h1>';
$page->maincontentarea = '<p>This is my main content.</p>';
$page->navlinks = '<ul><li>Hello world!</li></ul>';
$page->navlinks = '<ul><li><a href="#">Hello world!</a></li></ul>';
$page->leftRandomPromo = '';
$page->maincontentarea .= highlight_file(__FILE__, true);
$page->loadSharedcodeFiles();
......
<?php
set_include_path(dirname(dirname(__DIR__)).'/src'.PATH_SEPARATOR.dirname(dirname(__DIR__)).'/vendor/php');
highlight_file(__FILE__);
require_once 'UNL/Templates/Scanner.php';
......
......@@ -48,6 +48,7 @@ class UNL_Templates extends UNL_DWT
{
const VERSION2 = 2;
const VERSION3 = 3;
const VERSION3x1 = '3.1';
/**
* Cache object for output caching
......@@ -61,7 +62,8 @@ class UNL_Templates extends UNL_DWT
'sharedcodepath' => 'sharedcode',
'templatedependentspath' => '',
'cache' => array(),
'version' => self::VERSION3
'version' => self::VERSION3,
'timeout' => 5
);
/**
......@@ -89,6 +91,7 @@ class UNL_Templates extends UNL_DWT
*/
public static function loadDefaultConfig()
{
self::$options['version'] = str_replace('.', 'x', self::$options['version']);
include_once 'UNL/Templates/Version'.self::$options['version'].'.php';
$class = 'UNL_Templates_Version'.self::$options['version'];
self::$template_version = new $class();
......@@ -356,9 +359,9 @@ class UNL_Templates extends UNL_DWT
return dirname(__FILE__).'/../../data/UNL_Templates/data';
}
if (file_exists(dirname(__FILE__).'/../data/tpl_cache')) {
if (file_exists(dirname(__FILE__).'/../../data/tpl_cache')) {
// svn checkout
return realpath(dirname(__FILE__).'/../data');
return realpath(dirname(__FILE__).'/../../data');
}
if (file_exists(dirname(__FILE__).'/../../data/pear.unl.edu/UNL_Templates/data')) {
......@@ -366,9 +369,9 @@ class UNL_Templates extends UNL_DWT
return dirname(__FILE__).'/../../data/pear.unl.edu/UNL_Templates/data';
}
if ('/Users/bbieber/Documents/workspace/wdn_thm_drupal/sites/all/themes/unl_wdn/lib/data' != '@DATA_DIR'.'@') {
if ('@DATA_DIR@' != '@DATA_DIR'.'@') {
// pear/pyrus installation
return '/Users/bbieber/Documents/workspace/wdn_thm_drupal/sites/all/themes/unl_wdn/lib/data/UNL_Templates/data/';
return '@DATA_DIR@/UNL_Templates/data/';
}
throw new Exception('Cannot determine data directory!');
......
......@@ -24,9 +24,12 @@ class UNL_Templates_Version2 implements UNL_Templates_Version
function getTemplate($template)
{
// Set a timeout for the HTTP download of the template file
$http_context = stream_context_create(array('http' => array('timeout' => UNL_Templates::$options['timeout'])));
// Always try and retrieve the latest
if (!(UNL_Templates::getCachingService() instanceof UNL_Templates_CachingService_Null)
&& $tpl = file_get_contents('http://pear.unl.edu/UNL/Templates/server.php?version=2&template='.$template)) {
&& $tpl = file_get_contents('http://pear.unl.edu/UNL/Templates/server.php?version=2&template='.$template, false, $http_context)) {
return $tpl;
}
......
......@@ -41,9 +41,12 @@ class UNL_Templates_Version3 implements UNL_Templates_Version
$template = 'Absolute.tpl';
}
// Set a timeout for the HTTP download of the template file
$http_context = stream_context_create(array('http' => array('timeout' => UNL_Templates::$options['timeout'])));
// Always try and retrieve the latest
if (!(UNL_Templates::getCachingService() instanceof UNL_Templates_CachingService_Null)
&& $tpl = file_get_contents('http://pear.unl.edu/UNL/Templates/server.php?version=3&template='.$template)) {
&& $tpl = file_get_contents('http://pear.unl.edu/UNL/Templates/server.php?version=3&template='.$template, false, $http_context)) {
return $tpl;
}
......
<?php
/**
* Base class for Version 3 (2009) template files.
*
* PHP version 5
*
* @category Templates
* @package UNL_Templates
* @author Brett Bieber <brett.bieber@gmail.com>
* @author Ned Hummel <nhummel2@unl.edu>
* @copyright 2009 Regents of the University of Nebraska
* @license http://www1.unl.edu/wdn/wiki/Software_License BSD License
* @link http://pear.unl.edu/
*/
require_once 'UNL/Templates/Version.php';
/**
* Base class for Version 3 (2009) template files.
*
* @category Templates
* @package UNL_Templates
* @author Brett Bieber <brett.bieber@gmail.com>
* @copyright 2009 Regents of the University of Nebraska
* @license http://www1.unl.edu/wdn/wiki/Software_License BSD License
* @link http://pear.unl.edu/
*/
class UNL_Templates_Version3x1 implements UNL_Templates_Version
{
function getConfig()
{
return array('class_location' => 'UNL/Templates/Version3x1/',
'class_prefix' => 'UNL_Templates_Version3x1_');
}
function getTemplate($template)
{
if (!file_exists(UNL_Templates::$options['templatedependentspath'].'/wdn/templates_3.1')) {
UNL_Templates::debug('ERROR You should have a local copy of wdn/templates_3.1!'
. ' Overriding your specified template to use absolute references' ,
'getTemplate', 1);
$template = 'Absolute.tpl';
}
// Always try and retrieve the latest
if (!(UNL_Templates::getCachingService() instanceof UNL_Templates_CachingService_Null)
&& $tpl = file_get_contents('http://pear.unl.edu/UNL/Templates/server.php?version=3x1&template='.$template)) {
return $tpl;
}
if (file_exists(UNL_Templates::getDataDir().'/tpl_cache/Version3x1/'.$template)) {
return file_get_contents(UNL_Templates::getDataDir().'/tpl_cache/Version3x1/'.$template);
}
throw new Exception('Could not get the template file!');
}
function makeIncludeReplacements($html)
{
UNL_Templates::debug('Now making template include replacements.',
'makeIncludeReplacements', 3);
$includes = array();
preg_match_all('<!--#include virtual="(/wdn/templates_3.1/[A-Za-z0-9\.\/_]+)" -->',
$html, $includes);
UNL_Templates::debug(print_r($includes, true), 'makeIncludeReplacements', 3);
foreach ($includes[1] as $include) {
UNL_Templates::debug('Replacing '.$include, 'makeIncludeReplacements', 3);
$file = UNL_Templates::$options['templatedependentspath'].$include;
if (!file_exists($file)) {
UNL_Templates::debug('File does not exist:'.$file,
'makeIncludeReplacements', 3);
$file = 'http://www.unl.edu'.$include;
}
$html = str_replace('<!--#include virtual="'.$include.'" -->',
file_get_contents($file), $html);
}
return $html;
}
}
<?php
/**
* Template Definition for debug.dwt
*/
require_once 'UNL/Templates.php';
class UNL_Templates_Version3x1_Debug extends UNL_Templates
{
###START_AUTOCODE
/* the code below is auto generated do not remove the above tag */
public $__template = 'Debug.tpl'; // template name
public $doctitle = "<title>Use a descriptive page title | Optional Site Title (use for context) | University of Nebraska&ndash;Lincoln</title>"; // string()
public $head = "<!-- Place optional header elements here -->"; // string()
public $titlegraphic = "The Title of My Site"; // string()
public $breadcrumbs = "<ul> <li><a href=\"http://www.unl.edu/\" title=\"University of Nebraska&ndash;Lincoln\">UNL</a></li> <li class=\"selected\"><a href=\"#\" title=\"Site Title\">Site Title</a></li> <li>Page Title</li> </ul>"; // string()
public $navlinks = "<!--#include virtual=\"../sharedcode/navigation.html\" -->"; // string()
public $pagetitle = "<h1>This is your page title. It\'s now an &lt;h1&gt;, baby!</h1>"; // string()
public $maincontentarea = "<h2>This is a blank page</h2> <p>Impress your audience with awesome content!</p>"; // string()
public $leftcollinks = "<!--#include virtual=\"../sharedcode/relatedLinks.html\" -->"; // string()
public $contactinfo = "<!--#include virtual=\"../sharedcode/footerContactInfo.html\" -->"; // string()
public $optionalfooter = ""; // string()
public $footercontent = "<!--#include virtual=\"../sharedcode/footer.html\" -->"; // string()
/* Static get */
function staticGet($k,$v=NULL) { return UNL_DWT::staticGet('UNL_Templates_Version3x1_Debug',$k,$v); }
/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE
}
<?php
/**
* Template Definition for fixed.dwt
*/
require_once 'UNL/Templates.php';
class UNL_Templates_Version3x1_Fixed extends UNL_Templates
{
###START_AUTOCODE
/* the code below is auto generated do not remove the above tag */
public $__template = 'Fixed.tpl'; // template name
public $doctitle = "<title>Use a descriptive page title | Optional Site Title (use for context) | University of Nebraska&ndash;Lincoln</title>"; // string()
public $head = "<!-- Place optional header elements here -->"; // string()
public $titlegraphic = "The Title of My Site"; // string()
public $breadcrumbs = "<ul> <li><a href=\"http://www.unl.edu/\" title=\"University of Nebraska&ndash;Lincoln\">UNL</a></li> <li class=\"selected\"><a href=\"#\" title=\"Site Title\">Site Title</a></li> <li>Page Title</li> </ul>"; // string()
public $navlinks = "<!--#include virtual=\"../sharedcode/navigation.html\" -->"; // string()
public $pagetitle = "<h1>This is your page title. It\'s now an &lt;h1&gt;, baby!</h1>"; // string()
public $maincontentarea = "<h2>This is a blank page</h2> <p>Impress your audience with awesome content!</p>"; // string()
public $leftcollinks = "<!--#include virtual=\"../sharedcode/relatedLinks.html\" -->"; // string()
public $contactinfo = "<!--#include virtual=\"../sharedcode/footerContactInfo.html\" -->"; // string()
public $optionalfooter = ""; // string()
public $footercontent = "<!--#include virtual=\"../sharedcode/footer.html\" -->"; // string()
/* Static get */
function staticGet($k,$v=NULL) { return UNL_DWT::staticGet('UNL_Templates_Version3x1_Fixed',$k,$v); }
/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE
}
<?php
/**
* Template Definition for unlaffiliate.dwt
*/
require_once 'UNL/Templates.php';
class UNL_Templates_Version3x1_Unlaffiliate extends UNL_Templates
{
###START_AUTOCODE
/* the code below is auto generated do not remove the above tag */
public $__template = 'Unlaffiliate.tpl'; // template name
public $doctitle = "<title>Use a descriptive page title | Optional Site Title (use for context) | UNL Affiliate</title>"; // string()
public $head = "<!-- Place optional header elements here --> <link rel=\"stylesheet\" type=\"text/css\" media=\"screen\" href=\"../sharedcode/affiliate.css\" /> <link href=\"../sharedcode/affiliate_imgs/favicon.ico\" rel=\"shortcut icon\" />"; // string()
public $titlegraphic = "Throught the Eyes of a Child Initiative<span>A Nebraska Supreme Court Initiative</span>"; // string()
public $breadcrumbs = "<ul> <li><a href=\"http://www.throughtheeyes.org/\" title=\"Through the Eyes of the Child Initiative\">Home</a></li> </ul>"; // string()
public $navlinks = "<!--#include virtual=\"../sharedcode/navigation.html\" -->"; // string()
public $pagetitle = "<h1>This is your page title. It\'s now an &lt;h1&gt;, baby!</h1>"; // string()
public $maincontentarea = "<h2>This is a blank page</h2> <p>Impress your audience with awesome content!</p>"; // string()
public $leftcollinks = "<!--#include virtual=\"../sharedcode/relatedLinks.html\" -->"; // string()
public $contactinfo = "<!--#include virtual=\"../sharedcode/footerContactInfo.html\" -->"; // string()
public $optionalfooter = ""; // string()
public $footercontent = "<!--#include virtual=\"../sharedcode/footer.html\" -->"; // string()
/* Static get */
function staticGet($k,$v=NULL) { return UNL_DWT::staticGet('UNL_Templates_Version3x1_Unlaffiliate',$k,$v); }
/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE
}
<?php
/**
* Template Definition for unlaffiliate_debug.dwt
*/
require_once 'UNL/Templates.php';
class UNL_Templates_Version3x1_Unlaffiliate_debug extends UNL_Templates
{
###START_AUTOCODE
/* the code below is auto generated do not remove the above tag */
public $__template = 'Unlaffiliate_debug.tpl'; // template name
public $doctitle = "<title>Use a descriptive page title | Optional Site Title (use for context) | UNL Affiliate</title>"; // string()
public $head = "<!-- Place optional header elements here --> <link rel=\"stylesheet\" type=\"text/css\" media=\"screen\" href=\"../sharedcode/affiliate.css\" /> <link href=\"../sharedcode/affiliate_imgs/favicon.ico\" rel=\"shortcut icon\" />"; // string()
public $titlegraphic = "Throught the Eyes of a Child Initiative<span>A Nebraska Supreme Court Initiative</span>"; // string()
public $breadcrumbs = "<ul> <li><a href=\"http://www.throughtheeyes.org/\" title=\"Through the Eyes of the Child Initiative\">Home</a></li> </ul>"; // string()
public $navlinks = "<!--#include virtual=\"../sharedcode/navigation.html\" -->"; // string()
public $pagetitle = "<h1>This is your page title. It\'s now an &lt;h1&gt;, baby!</h1>"; // string()
public $maincontentarea = "<h2>This is a blank page</h2> <p>Impress your audience with awesome content!</p>"; // string()
public $leftcollinks = "<!--#include virtual=\"../sharedcode/relatedLinks.html\" -->"; // string()
public $contactinfo = "<!--#include virtual=\"../sharedcode/footerContactInfo.html\" -->"; // string()
public $optionalfooter = ""; // string()
public $footercontent = "<!--#include virtual=\"../sharedcode/footer.html\" -->"; // string()
/* Static get */
function staticGet($k,$v=NULL) { return UNL_DWT::staticGet('UNL_Templates_Version3x1_Unlaffiliate_debug',$k,$v); }
/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE
}
......@@ -70,13 +70,6 @@ Any real output is being deferred to html.tpl.php
$t = unl_wdn_get_instance();
// Site Logo (for affiliates)
if (theme_get_setting('unl_affiliate') && $logo) {
$t->logo = '<a href="'.$front_page.'" title="Home">
<img src="'.$logo.'" alt="'.$site_name.' logo" id="logo" />
</a>';
}
// Breadcrumbs
if (isset($breadcrumb)) {
$t->breadcrumbs = PHP_EOL . $breadcrumb . PHP_EOL;
......@@ -87,14 +80,13 @@ $t->navlinks = PHP_EOL . render($page['navlinks']);
// Site Title and Page Title
if (isset($site_name) && $site_name) {
$t->titlegraphic = '<h1>' . $site_name;
$t->titlegraphic = $site_name;
if (!empty($site_slogan)) {
$t->titlegraphic .= '<span>' . $site_slogan . '</span>';
}
$t->titlegraphic .= '</h1>';
}
if (isset($title) && $title) {
$t->pagetitle = '<h2>' . render($title_prefix) . $title . render($title_suffix) . '</h2>';
$t->pagetitle = '<h1>' . render($title_prefix) . $title . render($title_suffix) . '</h1>';
}
// Main Content Area
......@@ -135,5 +127,4 @@ if ($page['optionalfooter']) {
if ($page['footercontent']) {
$t->footercontent = PHP_EOL.render($page['footercontent']);
}
$t->footercontent = preg_replace('/&copy;\s*[0-9]{4}/', '&copy; ' . 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 UNLcms website">UNLcms</a> powered by <a href="http://drupal.org/" title="Go to the Drupal website">Drupal</a></p>';
$t->footercontent = preg_replace(array('/©\s*[0-9]{4}/', '/&copy;\s*[0-9]{4}/'), '&copy; ' . date('Y'), $t->footercontent);
......@@ -15,17 +15,18 @@ body.fixed #maincontent {min-width: 960px;}
/* UNL css displays all ul in copyright area as inline, need to hide this */
#wdn_copyright ul.contextual-links {display: none;}
/* Overrides of system.menus.css due to conflicts with UNL navigation */
#navigation ul li.expanded, #navigation ul li.collapsed , #navigation ul li.leaf {list-style-image: none; list-style-type: none;}
#navigation li.expanded, #navigation li.collapsed, #navigation li.leaf {margin: 0; padding: 0;}
#navigation li {margin: 0; padding: 0; list-style-image: none; list-style-type: none;}
/* Override for unl #maincontent specificity */
ul.links.inline {padding-left: 0 !important;}
/* Overrides of system.theme.css */
/* Overrides of system.theme.css, form.css */
.zenform label {display: inline; font-weight: normal;}
#wdn_search_form fieldset {background: none; border: none; margin: 0; padding: 0; position: static;}
#wdn_search_form label {font-weight: normal;}
#wdn_search_form input {margin: 0; padding: 0;}
#wdn_feedback_comments fieldset {position: static; margin: 0; border: none;}
#wdn_feedback_comments legend {top: auto; left: auto; line-height:1.5em; text-indent: 0; border: none; background: none; color: #333; text-shadow: 0 1px 0 #F5F2EF;}
#wdn_feedback fieldset, #wdn_feedback_comments fieldset {position: static; padding: 0; margin: 0; border: none; background: none;}
#wdn_feedback legend, #wdn_feedback_comments legend {position: static; top: auto; left: auto; color: #333; line-height:1.7em; text-indent: 0; border: none; background: none; height: inherit; width: inherit;}
#wdn_copyright .block {margin: 0;}
#toolbarcontent fieldset {border: none; margin: 0; padding: 0;}
/* taxonomy
*********/
......
......@@ -44,12 +44,18 @@ function unl_wdn_preprocess_html(&$vars, $hook) {
}
}
// Affiliate Template
if (theme_get_setting('unl_affiliate')) {
if (theme_get_setting('toggle_logo') && !theme_get_setting('default_logo')) {
$logo_css = '#header #logo{background-image:url('.file_create_url(theme_get_setting('logo_path')).'); background-position:13px 10px;}
@media (max-width:1040px) {#header #logo{background-size:90%; background-position:2px 3px;}}';
drupal_add_css($logo_css, array('type' => 'inline', 'group' => CSS_THEME, 'every_page' => TRUE));
}
if (!theme_get_setting('toggle_unl_banner')) {
drupal_add_css('#header h1{display:none;}', array('type' => 'inline', 'group' => CSS_THEME, 'every_page' => TRUE));
drupal_add_css('#wdn_institution_title{visibility:hidden;}', array('type' => 'inline', 'group' => CSS_THEME, 'every_page' => TRUE));
}
if (!theme_get_setting('toggle_unl_branding')) {
drupal_add_css('#footer_floater,#wdn_logos{display:none;}', array('type' => 'inline', 'group' => CSS_THEME, 'every_page' => TRUE));
drupal_add_css('#footer_floater,#wdn_copyright #wdn_logos{display:none;}', array('type' => 'inline', 'group' => CSS_THEME, 'every_page' => TRUE));
}
if (!theme_get_setting('toggle_unl_breadcrumb')) {
drupal_add_css('#breadcrumbs > ul > li:first-child{display:none;}', array('type' => 'inline', 'group' => CSS_THEME, 'every_page' => TRUE));
......@@ -62,34 +68,14 @@ function unl_wdn_preprocess_html(&$vars, $hook) {
}
}
/**
* Change the <title> tag to UNL format: UNL | Department | Section | Page
*/
$head_title[] = 'Home';
$trail = menu_get_active_trail();
foreach ($trail as $item) {
if ($item['type'] & MENU_VISIBLE_IN_BREADCRUMB) {
if (isset($item['title']) && !empty($item['title'])) {
$head_title[] = $item['title'];
}
if (isset($item['page_arguments'],
$item['page_arguments'][0],
$item['page_arguments'][0]->title)) {
$head_title[] = $item['page_arguments'][0]->title;
}
}
// Set the <title> tag to UNL format: Page Title | Site Name | University of Nebraska–Lincoln
if ($vars['is_front']) {
unset($vars['head_title_array']['title']);
}
// Change 'Home' to be $site_name
array_unshift($head_title, str_replace( 'Home', variable_get('site_name', 'Department'), array_shift($head_title)));
// Prepend UNL
if (variable_get('site_name') != 'UNL') {
array_unshift($head_title, 'UNL');
if (variable_get('site_name') != 'University of Nebraska–Lincoln') {
$vars['head_title_array'] = array_merge($vars['head_title_array'], array('UNL' => 'University of Nebraska–Lincoln'));
}
$vars['head_title'] = check_plain(implode(' | ', $head_title));
$vars['head_title'] = check_plain(implode(' | ', $vars['head_title_array']));
}
/**
......@@ -213,7 +199,7 @@ function unl_wdn_get_instance() {
// Use NULL caching service so templates are pulled from local tpl_cache
UNL_Templates::setCachingService(new UNL_Templates_CachingService_Null());
UNL_Templates::$options['version'] = UNL_Templates::VERSION3;
UNL_Templates::$options['version'] = UNL_Templates::VERSION3x1;
// Set a default template
$template = 'Fixed';
......@@ -222,17 +208,24 @@ function unl_wdn_get_instance() {
$template = 'Document';
}
// Tell caches to cache mobile and non-mobile pages separately.
drupal_add_http_header('Vary', 'X-UNL-Mobile', TRUE);
if (isset($_GET['format']) && $_GET['format'] == 'mobile') {
$template = 'Mobile';
if (theme_get_setting('unl_affiliate')) {
$template = 'Unlaffiliate';
}
$instance = UNL_Templates::factory($template);
if (theme_get_setting('wdn_beta')) {
$template = 'Debug';
if (theme_get_setting('unl_affiliate')) {
$template = 'Unlaffiliate_debug';
}
UNL_Templates::$options['templatedependentspath'] = $_SERVER['DOCUMENT_ROOT'].'/wdntemplates-dev';
}
$instance = UNL_Templates::factory($template);
}
if (theme_get_setting('unl_affiliate')) {
$instance->sitebranding_logo = '<a id="logo" href="'.url('<front>', array('absolute')).'" title="'.variable_get('site_name').'">'.variable_get('site_name').'</a>';
$instance->sitebranding_affiliate = 'An Affiliate of the University of Nebraska&ndash;Lincoln';
}
return $instance;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment