diff --git a/.buildpath b/.buildpath deleted file mode 100644 index 8bcb4b5fd612e3ad55fb07e4bed087c55afd0861..0000000000000000000000000000000000000000 --- a/.buildpath +++ /dev/null @@ -1,5 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<buildpath> - <buildpathentry kind="src" path=""/> - <buildpathentry kind="con" path="org.eclipse.php.core.LANGUAGE"/> -</buildpath> diff --git a/.gitignore b/.gitignore index aeee880aabf69736d06031d34b8fbfe9f805b0b0..4a9e65c468f9883e34e77d0a0e1a2be0673685c0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,8 @@ /config.inc.php /UNL_Search.esproj/ +/node_modules +/.project +/.settings +/www/css +/www/less/lib +/.buildpath diff --git a/.project b/.project deleted file mode 100644 index 1ad2079a6358004fa1c1bb271264cdf40921bb21..0000000000000000000000000000000000000000 --- a/.project +++ /dev/null @@ -1,11 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<projectDescription> - <name>UNL_Search</name> - <comment></comment> - <projects> - </projects> - <buildSpec> - </buildSpec> - <natures> - </natures> -</projectDescription> diff --git a/Makefile b/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..2b502d78bf7d6da7322b46b12896881baf2b48e3 --- /dev/null +++ b/Makefile @@ -0,0 +1,62 @@ +SHELL := /bin/bash +CURL := curl + +# NodeJS Find/Install +NODE_PATH = $(shell ./find-node-or-install) +PATH := $(NODE_PATH):$(shell echo $$PATH) + +# External Build Tools +NODE_DIR = node_modules +LESSC = $(NODE_DIR)/less/bin/lessc +UGLIFYJS = $(NODE_DIR)/uglify-js/bin/uglifyjs + +# Local Vars +LESS_LIB = www/less/lib + +# External Dependencies +LESSHAT := $(LESS_LIB)/lesshat.less +WDN_MIXINS := \ + $(LESS_LIB)/breakpoints.less \ + $(LESS_LIB)/colors.less \ + $(LESS_LIB)/fonts.less + +WDN_LIB_RAW = https://raw.githubusercontent.com/unl/wdntemplates/master/wdn/templates_4.0/less/_mixins/ +LESSHAT_RAW = https://raw.githubusercontent.com/csshat/lesshat/c8c211b2442734bfc1ae2509ff0ccebdc2e73664/build/lesshat.less + +# Built Files +CSS_OBJ = www/css/search.css +JS_OBJ = www/js/search.min.js + +all: less js + +less: $(CSS_OBJ) + +js: $(JS_OBJ) + +clean: + rm -r $(NODE_DIR) + rm -r $(LESS_LIB) + rm $(JS_OBJ) + rm $(CSS_OBJ) + +$(CSS_OBJ): www/less/search.less $(LESSC) $(LESSHAT) $(WDN_MIXINS) + $(LESSC) --clean-css $< $@ + +$(LESSC): + npm install less + +$(LESS_LIB)/%.less: + @mkdir -p $(@D) + $(CURL) -s $(WDN_LIB_RAW)$(@F) -o $@ + +$(LESSHAT): + @mkdir -p $(@D) + $(CURL) -s $(LESSHAT_RAW) -o $@ + +$(UGLIFYJS): + npm install uglify-js + +$(JS_OBJ): www/js/search.js $(UGLIFYJS) + $(UGLIFYJS) -c -m -o $@ -p 2 --source-map $(<).map --source-map-url $(<F).map $< + +.PHONY: all less js clean diff --git a/README b/README index d868533ea8dd5090ad67a179568518bcaa0dd477..44f04e7f46399239a815c22e6706785ada01179a 100644 --- a/README +++ b/README @@ -7,3 +7,8 @@ Querystring parameters: q The search term u Referring UNL template based site cx Google Custom Search engine to use for local site results + +To build and run this project: + +1. Copy/Update config.sample.php to config.inc.php (see in-file documentation) +2. Run `make` diff --git a/config.sample.php b/config.sample.php index e6959a99df0df11544bafa62af403bc8c6ad50bb..12bdcd12e088076837635788f35c5db383a90b8b 100644 --- a/config.sample.php +++ b/config.sample.php @@ -16,4 +16,4 @@ require_once 'UNL/Autoload.php'; // UNL_Search::$jsapiKeys[] = 'ABQIAAAAGAtSvF89-VbesSJ07TEeoBTpxXZziuBpIcFFfJO7Mm8wj1oQWRRwVSIfGRIEAC9DlOSQX7rAAWHjhA'; - +// UNL_Search::$mode = 'debug'; diff --git a/find-node-or-install b/find-node-or-install new file mode 100755 index 0000000000000000000000000000000000000000..37a3e86b04e3a9205f5c8d95ea9e40e4c32cbda5 --- /dev/null +++ b/find-node-or-install @@ -0,0 +1,58 @@ +#!/bin/bash +############################################################################## +# Finds the bin directory where node and npm are installed, or installs a +# local copy of them in a temp folder if not found. Then outputs where they +# are. +# +# Usage and install instructions: +# https://github.com/hugojosefson/find-node-or-install +############################################################################## + +# Creates temp dir which stays the same every time this script executes +function setTEMP_DIR() +{ + local NEW_OS_SUGGESTED_TEMP_FILE=$(mktemp -t asdXXXXX) + local OS_ROOT_TEMP_DIR=$(dirname ${NEW_OS_SUGGESTED_TEMP_FILE}) + rm ${NEW_OS_SUGGESTED_TEMP_FILE} + TEMP_DIR=${OS_ROOT_TEMP_DIR}/nvm + mkdir -p ${TEMP_DIR} +} + +# Break on error +set -e + +# Try to find node, but don't break if not found +NODE=$(which node || true) + +if [[ -n "${NODE}" ]]; then + # Good. We found it. + echo $(dirname ${NODE}) +else + # Did not find node. Better install it. + # Do it in a temp dir, which stays the same every time this script executes + setTEMP_DIR + cd ${TEMP_DIR} + + # Do we have nvm here? + if [[ ! -d "nvm" ]]; then + git clone git://github.com/creationix/nvm.git >/dev/null + fi + + # Clear and set NVM_* env variables to our installation + mkdir -p .nvm + export NVM_DIR=$( (cd .nvm && pwd) ) + unset NVM_PATH + unset NVM_BIN + + # Load nvm into current shell + . nvm/nvm.sh >/dev/null + + # Install and use latest 0.10.* node + nvm install 0.10 >/dev/null + nvm alias default 0.10 >/dev/null + nvm use default >/dev/null + + # Find and output node's bin directory + NODE=$(which node) + echo $(dirname ${NODE}) +fi diff --git a/lib/.configsnapshots/configsnapshot-2014-04-14 09-00-33.xml b/lib/.configsnapshots/configsnapshot-2014-04-14 09-00-33.xml new file mode 100644 index 0000000000000000000000000000000000000000..af55c0bc2f89d44f3c2b7859214409897c61c35c --- /dev/null +++ b/lib/.configsnapshots/configsnapshot-2014-04-14 09-00-33.xml @@ -0,0 +1,2 @@ +<?xml version="1.0"?> +<pearconfig version="1.0"><php_dir>/Users/kabel/Documents/workspace/UNL_Search/lib/php</php_dir><ext_dir>/usr/lib/php/extensions/no-debug-non-zts-20100525</ext_dir><cfg_dir>/Users/kabel/Documents/workspace/UNL_Search/lib/cfg</cfg_dir><doc_dir>/Users/kabel/Documents/workspace/UNL_Search/lib/docs</doc_dir><bin_dir>/usr/bin</bin_dir><data_dir>/Users/kabel/Documents/workspace/UNL_Search/lib/data</data_dir><www_dir>/Users/kabel/Documents/workspace/UNL_Search/lib/www</www_dir><test_dir>/Users/kabel/Documents/workspace/UNL_Search/lib/tests</test_dir><src_dir>/Users/kabel/Documents/workspace/UNL_Search/lib/src</src_dir><php_bin>/usr/bin/php</php_bin><php_ini>/etc/php.ini</php_ini><php_prefix></php_prefix><php_suffix></php_suffix></pearconfig> diff --git a/lib/.pear2registry b/lib/.pear2registry index b6b41758ff44c3a9de31a342d8dc7cdc9967ddb8..149ebb1b7140853237287420807cead8370ce07c 100644 Binary files a/lib/.pear2registry and b/lib/.pear2registry differ diff --git a/lib/.xmlregistry/packages/pear.unl.edu/UNL_DWT/0.7.2-info.xml b/lib/.xmlregistry/packages/pear.unl.edu/UNL_DWT/0.9.0-info.xml similarity index 75% rename from lib/.xmlregistry/packages/pear.unl.edu/UNL_DWT/0.7.2-info.xml rename to lib/.xmlregistry/packages/pear.unl.edu/UNL_DWT/0.9.0-info.xml index ff5886c6e36b5df1ace44a6dffed5c546ed1525a..5f33c0c70795ee002dcc7db4e848e5573b0904e6 100644 --- a/lib/.xmlregistry/packages/pear.unl.edu/UNL_DWT/0.7.2-info.xml +++ b/lib/.xmlregistry/packages/pear.unl.edu/UNL_DWT/0.9.0-info.xml @@ -13,10 +13,10 @@ This package generates php class files (objects) from Dreamweaver template files <email>brett.bieber@gmail.com</email> <active>yes</active> </lead> - <date>2012-03-26</date> - <time>14:17:30</time> + <date>2014-04-14</date> + <time>09:00:33</time> <version> - <release>0.7.2</release> + <release>0.9.0</release> <api>0.7.1</api> </version> <stability> @@ -24,21 +24,27 @@ This package generates php class files (objects) from Dreamweaver template files <api>beta</api> </stability> <license uri="http://www1.unl.edu/wdn/wiki/Software_License">BSD</license> - <notes>Scanner fix - do not replace newlines with spaces in scanned content</notes> + <notes>Feature Release +* Add support for immedaitely rendering a scanned DWT [saltybeagle] + +Bug Fixes + * Prevent greedy matching of template regions [spam38] +</notes> <contents> <dir name="/"> - <file role="php" name="src/UNL/DWT/Scanner.php" md5sum="80ab5854ed8c2ab159c53cd5adc757b2"/> - <file role="php" name="src/UNL/DWT/Region.php" md5sum="be81db10741075600fc87ebbc4c4ca53"/> - <file role="php" name="src/UNL/DWT/Generator.php" md5sum="aea406280cedf3a0e9b32ab7ee354b3f"/> - <file role="php" name="src/UNL/DWT/createTemplates.php" md5sum="8ccd77b7def177033c20128da938d1ff"/> - <file role="php" name="src/UNL/DWT.php" md5sum="c8b1f16f587798a1e37574477d2627bd"/> - <file role="doc" name="docs/examples/Template_style1.tpl" md5sum="b524ef4684be7dba47ed8c245577347a"/> - <file role="doc" name="docs/examples/Template_style1.php" md5sum="3f97c4a024dfed9210b14db5068ba7d0"/> - <file role="doc" name="docs/examples/template_style1.dwt" md5sum="0d5a4f5ca86e9c2a3c0050f39acbb034"/> - <file role="doc" name="docs/examples/scanner_example.php" md5sum="e29437d89b8193aede3fc400ef1f363d"/> - <file role="doc" name="docs/examples/example_style1.php" md5sum="8fc92f34a5d56e8664ae669bb39ba763"/> - <file role="doc" name="docs/examples/example.test.ini" md5sum="28a080af44b5db3f28c73fa91cdabe99"/> - <file role="doc" name="docs/examples/example.ini" md5sum="783c64aafb491c789fc71a5bf80d1755"/> + <file role="php" name="php/UNL/DWT/Scanner.php" md5sum="276e82e5db587c9c18a100e1e877082e"/> + <file role="php" name="php/UNL/DWT/Region.php" md5sum="858136d43bf29868dca876783e51d196"/> + <file role="php" name="php/UNL/DWT/Generator.php" md5sum="a3b933a0d7f8d81f72836bb2c5fb6914"/> + <file role="php" name="php/UNL/DWT/Exception.php" md5sum="5b99b44fbfde7349c6b9e6d9be78e9dc"/> + <file role="php" name="php/UNL/DWT/createTemplates.php" md5sum="9089565d275b52e0cd65c52edd50ef18"/> + <file role="php" name="php/UNL/DWT.php" md5sum="ca9d707c266ad9150e39d1a9a60c5643"/> + <file role="doc" name="doc/pear.unl.edu/UNL_DWT/examples/scanner_example.php" md5sum="2d16f0e62c4227aa28108bf78d74156a"/> + <file role="doc" name="doc/pear.unl.edu/UNL_DWT/examples/basic/Template_style1.tpl" md5sum="b524ef4684be7dba47ed8c245577347a"/> + <file role="doc" name="doc/pear.unl.edu/UNL_DWT/examples/basic/Template_style1.php" md5sum="096998b112a1e27bddc6c171380d590e"/> + <file role="doc" name="doc/pear.unl.edu/UNL_DWT/examples/basic/template_style1.dwt" md5sum="0d5a4f5ca86e9c2a3c0050f39acbb034"/> + <file role="doc" name="doc/pear.unl.edu/UNL_DWT/examples/basic/example_style1.php" md5sum="d3f43ac017b9bdf1819cf05a4c4a33a2"/> + <file role="doc" name="doc/pear.unl.edu/UNL_DWT/examples/basic/example.test.ini" md5sum="28a080af44b5db3f28c73fa91cdabe99"/> + <file role="doc" name="doc/pear.unl.edu/UNL_DWT/examples/basic/example.ini" md5sum="d5f99a1b621d226611d2fe93761db93d"/> </dir> </contents> <dependencies> @@ -47,7 +53,7 @@ This package generates php class files (objects) from Dreamweaver template files <min>5.0.0</min> </php> <pearinstaller> - <min>1.4.3</min> + <min>2.0.0a1</min> </pearinstaller> <package> <name>UNL_Templates</name> diff --git a/lib/.xmlregistry/packages/pear.unl.edu/UNL_Templates/1.3.0RC2-info.xml b/lib/.xmlregistry/packages/pear.unl.edu/UNL_Templates/1.4.0RC3-info.xml similarity index 90% rename from lib/.xmlregistry/packages/pear.unl.edu/UNL_Templates/1.3.0RC2-info.xml rename to lib/.xmlregistry/packages/pear.unl.edu/UNL_Templates/1.4.0RC3-info.xml index 7f4bc2dc5d4405d061f6cd06a3ffe93eed03c9b9..32d68255e8bfc0481669089faf95283dc0a1c385 100644 --- a/lib/.xmlregistry/packages/pear.unl.edu/UNL_Templates/1.3.0RC2-info.xml +++ b/lib/.xmlregistry/packages/pear.unl.edu/UNL_Templates/1.4.0RC3-info.xml @@ -19,10 +19,10 @@ This package allows you to render UNL Template styled pages using PHP Objects. <email>nhummel2@math.unl.edu</email> <active>yes</active> </lead> - <date>2012-03-26</date> - <time>14:36:31</time> + <date>2014-04-14</date> + <time>09:00:33</time> <version> - <release>1.3.0RC2</release> + <release>1.4.0RC3</release> <api>1.0.0</api> </version> <stability> @@ -30,19 +30,36 @@ This package allows you to render UNL Template styled pages using PHP Objects. <api>stable</api> </stability> <license uri="http://www1.unl.edu/wdn/wiki/Software_License">BSD License</license> - <notes>New features: - - - Add support for version 3.1 of the UNL Templates</notes> + <notes>Finalize support for version 4.0 of the templates + +Templates Supported: +* Fixed +* Debug +* Unlaffiliate +* Unlaffiliate_debug +* Unlaffiliate_local + +Fixed in this RC: +* Use local .tpl files instead of always pulling remotely +* Make HTML and DEP replacements when local files do not exist +</notes> <contents> <dir name="/"> <file role="test" name="test/pear.unl.edu/UNL_Templates/UNL_TemplatesTest.php" md5sum="12aa5989d1255dccc299a3dcdd6c6ba8"/> - <file role="php" name="php/UNL/Templates/Version3x1/Unlaffiliate_local.php" md5sum="9f3867901ad594901d11ffff07b36843"/> - <file role="php" name="php/UNL/Templates/Version3x1/Unlaffiliate_debug.php" md5sum="4e006ca79895e0f9676d0ac792d2376a"/> - <file role="php" name="php/UNL/Templates/Version3x1/Unlaffiliate.php" md5sum="d04b37bd1e8da510610b9ad66de26487"/> - <file role="php" name="php/UNL/Templates/Version3x1/Local.php" md5sum="bab0b09eabc5d2fe041c4379dfa0634c"/> - <file role="php" name="php/UNL/Templates/Version3x1/Fixed.php" md5sum="8800d08ea41dcd31b7f444924d0e96c6"/> - <file role="php" name="php/UNL/Templates/Version3x1/Debug.php" md5sum="53764519ccbb2cda9d35f77843d85a61"/> - <file role="php" name="php/UNL/Templates/Version3x1.php" md5sum="3db6efc4892a2b68869a27941673bb5a"/> + <file role="php" name="php/UNL/Templates/Version4/Unlaffiliate_local.php" md5sum="29aa6297ac4e0232b24ae1a8fe9f308b"/> + <file role="php" name="php/UNL/Templates/Version4/Unlaffiliate_debug.php" md5sum="6ea82eb59a907fd102be43ead8cbbaed"/> + <file role="php" name="php/UNL/Templates/Version4/Unlaffiliate.php" md5sum="484425e481e37630fa7751f9e11e094a"/> + <file role="php" name="php/UNL/Templates/Version4/Local.php" md5sum="3849a40fda6f284fa07b47984c77235f"/> + <file role="php" name="php/UNL/Templates/Version4/Fixed.php" md5sum="42734ab8643a005e1551a7613729177d"/> + <file role="php" name="php/UNL/Templates/Version4/Debug.php" md5sum="dd25adcf52c589bd099322231ca572e6"/> + <file role="php" name="php/UNL/Templates/Version4.php" md5sum="5b57e3495a1e6d946c5177d23c6565f1"/> + <file role="php" name="php/UNL/Templates/Version3x1/Unlaffiliate_local.php" md5sum="e3f4b2b27e5cbbd81f3a434fdcd949d4"/> + <file role="php" name="php/UNL/Templates/Version3x1/Unlaffiliate_debug.php" md5sum="0e7a53d410d00748c53cb9036d43a178"/> + <file role="php" name="php/UNL/Templates/Version3x1/Unlaffiliate.php" md5sum="c9e2423f1508286947525968dddd56cb"/> + <file role="php" name="php/UNL/Templates/Version3x1/Local.php" md5sum="b18901fcb9b7d59f0de947f649e0cba7"/> + <file role="php" name="php/UNL/Templates/Version3x1/Fixed.php" md5sum="1cdda4bc708879eaeb6052aa50980820"/> + <file role="php" name="php/UNL/Templates/Version3x1/Debug.php" md5sum="880a7ec565da26995e7fa4b21163e1d3"/> + <file role="php" name="php/UNL/Templates/Version3x1.php" md5sum="2b905fceee314ba84447bbaefdd86073"/> <file role="php" name="php/UNL/Templates/Version3/Unlaffiliate.php" md5sum="40eeca840e02c9e5b2b2b7846bd73397"/> <file role="php" name="php/UNL/Templates/Version3/Shared_column_right.php" md5sum="f9b3c237b7a6b8500ef0d18f4e1c9595"/> <file role="php" name="php/UNL/Templates/Version3/Shared_column_left.php" md5sum="c8e40b9ff760f0d6da578f6f52e85ab2"/> @@ -64,26 +81,32 @@ This package allows you to render UNL Template styled pages using PHP Objects. <file role="php" name="php/UNL/Templates/Version2/Liquid.php" md5sum="55c715aa91f18226f5be4c3f427b2dea"/> <file role="php" name="php/UNL/Templates/Version2/Fixed.php" md5sum="3fbccc1b6e7a0287577972b4c25a0d19"/> <file role="php" name="php/UNL/Templates/Version2/Document.php" md5sum="ef2068426bb8f73ac706b18a472df967"/> - <file role="php" name="php/UNL/Templates/Version2.php" md5sum="8472e8942eb062eb06568386c237f9c1"/> + <file role="php" name="php/UNL/Templates/Version2.php" md5sum="d8f5200292c4216e423fc7c5da502e44"/> <file role="php" name="php/UNL/Templates/Version.php" md5sum="c7df0501ec102431d7be6a6cfd133b5b"/> <file role="php" name="php/UNL/Templates/Scanner.php" md5sum="82740c1fadfd1160bb9c67006947ab3b"/> <file role="php" name="php/UNL/Templates/CachingService/UNLCacheLite.php" md5sum="4fa04418d0aa08834b4795caeae5b8c8"/> <file role="php" name="php/UNL/Templates/CachingService/Null.php" md5sum="47991f0e5cffed6d138725a3294f4e6a"/> <file role="php" name="php/UNL/Templates/CachingService/CacheLite.php" md5sum="5b09b184e7d59a2520e99c0b5c66428a"/> <file role="php" name="php/UNL/Templates/CachingService.php" md5sum="07884c3a9bf75657e54782423a088eb4"/> - <file role="php" name="php/UNL/Templates.php" md5sum="1f39ddc40f5a2b2ba0f68ca3367de923"/> + <file role="php" name="php/UNL/Templates.php" md5sum="6f844645177ff75a899210f3a29bfd04"/> <file role="doc" name="doc/pear.unl.edu/UNL_Templates/examples/scanner.php" md5sum="2b116cf09b8d73c439718217d83a32c2"/> - <file role="doc" name="doc/pear.unl.edu/UNL_Templates/examples/example1.php" md5sum="c3de6bfef1cee16be4135f310e5e601d"/> + <file role="doc" name="doc/pear.unl.edu/UNL_Templates/examples/example1.php" md5sum="a55812397a3979fdc939fc1942b8c23c"/> <file role="doc" name="doc/pear.unl.edu/UNL_Templates/examples/customization/customization_example.php" md5sum="e9769bdf0cf9ec36430b3f70ec687037"/> <file role="doc" name="doc/pear.unl.edu/UNL_Templates/examples/customization/customization_example.html" md5sum="26c8d867af8ffd4d8d60e348573f9c3d"/> <file role="doc" name="doc/pear.unl.edu/UNL_Templates/examples/customization/CustomClass.php" md5sum="43bc783b2215f9668800ce2e80ad457b"/> <file role="doc" name="doc/pear.unl.edu/UNL_Templates/examples/convert.php" md5sum="a7114a3868d0ba54d4ff76b370ea3201"/> - <file role="data" name="data/pear.unl.edu/UNL_Templates/tpl_cache/Version3x1/Unlaffiliate_local.tpl" md5sum="8801aaa43aaca9d820728f665ed6e64d"/> - <file role="data" name="data/pear.unl.edu/UNL_Templates/tpl_cache/Version3x1/Unlaffiliate_debug.tpl" md5sum="6c2891e91facb216e7f4c13d5be3c339"/> - <file role="data" name="data/pear.unl.edu/UNL_Templates/tpl_cache/Version3x1/Unlaffiliate.tpl" md5sum="26907bf294eba52039c49cbde60b2693"/> - <file role="data" name="data/pear.unl.edu/UNL_Templates/tpl_cache/Version3x1/Local.tpl" md5sum="278f3cefa48d8aca1b6f316909ed3a50"/> - <file role="data" name="data/pear.unl.edu/UNL_Templates/tpl_cache/Version3x1/Fixed.tpl" md5sum="1e00218790ec2552d5b02e7a1e83c1fd"/> - <file role="data" name="data/pear.unl.edu/UNL_Templates/tpl_cache/Version3x1/Debug.tpl" md5sum="8074ddde1770dd571bd8c21917cf3607"/> + <file role="data" name="data/pear.unl.edu/UNL_Templates/tpl_cache/Version4/Unlaffiliate_local.tpl" md5sum="c39c8c2553dd541cade23ed8f0031017"/> + <file role="data" name="data/pear.unl.edu/UNL_Templates/tpl_cache/Version4/Unlaffiliate_debug.tpl" md5sum="5013bd2410d9a9d962eec536fee0e855"/> + <file role="data" name="data/pear.unl.edu/UNL_Templates/tpl_cache/Version4/Unlaffiliate.tpl" md5sum="91d4b14e957142ceea9dd47e50924813"/> + <file role="data" name="data/pear.unl.edu/UNL_Templates/tpl_cache/Version4/Local.tpl" md5sum="90bd85043d58ecfd0d5a87f370aeea45"/> + <file role="data" name="data/pear.unl.edu/UNL_Templates/tpl_cache/Version4/Fixed.tpl" md5sum="2b2cc7f7d80c681700c434b5cbf55d2f"/> + <file role="data" name="data/pear.unl.edu/UNL_Templates/tpl_cache/Version4/Debug.tpl" md5sum="2e8f964c461d4c321b199c75b4a71f59"/> + <file role="data" name="data/pear.unl.edu/UNL_Templates/tpl_cache/Version3x1/Unlaffiliate_local.tpl" md5sum="0802ccd854dfe1d6a3f0a22ad7ff09c4"/> + <file role="data" name="data/pear.unl.edu/UNL_Templates/tpl_cache/Version3x1/Unlaffiliate_debug.tpl" md5sum="241be8cc9780847dece60b54358de9a3"/> + <file role="data" name="data/pear.unl.edu/UNL_Templates/tpl_cache/Version3x1/Unlaffiliate.tpl" md5sum="5b30670bdbd48ecf9eaa9d6f505693f2"/> + <file role="data" name="data/pear.unl.edu/UNL_Templates/tpl_cache/Version3x1/Local.tpl" md5sum="4eef418e9e527224b9347e635e95dfba"/> + <file role="data" name="data/pear.unl.edu/UNL_Templates/tpl_cache/Version3x1/Fixed.tpl" md5sum="a2151b63d3861496e785f4b10f3b44be"/> + <file role="data" name="data/pear.unl.edu/UNL_Templates/tpl_cache/Version3x1/Debug.tpl" md5sum="037f834d2e9cd17856d83a6fbd0465dc"/> <file role="data" name="data/pear.unl.edu/UNL_Templates/tpl_cache/Version3/Unlaffiliate.tpl" md5sum="6644923a681f49bfd425f5768d01e4a3"/> <file role="data" name="data/pear.unl.edu/UNL_Templates/tpl_cache/Version3/Shared_column_right.tpl" md5sum="84cc265b12115d9c2733a6d03f5a4d85"/> <file role="data" name="data/pear.unl.edu/UNL_Templates/tpl_cache/Version3/Shared_column_left.tpl" md5sum="6003b105b79241b8e001d0f375265747"/> @@ -104,7 +127,7 @@ This package allows you to render UNL Template styled pages using PHP Objects. <file role="data" name="data/pear.unl.edu/UNL_Templates/tpl_cache/Version2/Liquid.tpl" md5sum="1a936fdcd4d17383490bd5aef1219ce8"/> <file role="data" name="data/pear.unl.edu/UNL_Templates/tpl_cache/Version2/Fixed.tpl" md5sum="df5ce334e93b844794699f3cc62d20b9"/> <file role="data" name="data/pear.unl.edu/UNL_Templates/tpl_cache/Version2/Document.tpl" md5sum="61cc4ae92fac84a7d38131769c2298ba"/> - <file role="data" name="data/pear.unl.edu/UNL_Templates/cssUNLTemplates.ini" md5sum="a56a41abc8a324ef7029dd8b485204bf"/> + <file role="data" name="data/pear.unl.edu/UNL_Templates/cssUNLTemplates.ini" md5sum="e2360f35ff791e3566351d8baa955d5b"/> </dir> </contents> <dependencies> @@ -118,7 +141,7 @@ This package allows you to render UNL Template styled pages using PHP Objects. <package> <name>UNL_DWT</name> <channel>pear.unl.edu</channel> - <min>0.7.1</min> + <min>0.8.0</min> </package> </required> <optional> diff --git a/lib/data/pear.unl.edu/UNL_Templates/cssUNLTemplates.ini b/lib/data/pear.unl.edu/UNL_Templates/cssUNLTemplates.ini index b2223e4ce489bd1e63b0da5ccc208bae6363e6f1..17d132cdffd23d1d92d8c832642f43be346b93aa 100644 --- a/lib/data/pear.unl.edu/UNL_Templates/cssUNLTemplates.ini +++ b/lib/data/pear.unl.edu/UNL_Templates/cssUNLTemplates.ini @@ -1,9 +1,9 @@ -;php /usr/local/php5/lib/php/UNL/DWT/createTemplates.php cssUNLTemplates.ini +;php -d include_path=`pwd`/../vendor/php ../vendor/php/UNL/DWT/createTemplates.php cssUNLTemplates.ini [UNL_DWT] dwt_location = /Users/bbieber/Documents/workspace/wdntemplates/Templates/ -class_location = /Users/bbieber/Documents/workspace/UNL_Templates/src/UNL/Templates/Version3x1 -tpl_location = /Users/bbieber/Documents/workspace/UNL_Templates/data/tpl_cache/Version3x1 -class_prefix = UNL_Templates_Version3x1_ +class_location = /Users/bbieber/Documents/workspace/UNL_Templates/src/UNL/Templates/Version4 +tpl_location = /Users/bbieber/Documents/workspace/UNL_Templates/data/tpl_cache/Version4 +class_prefix = UNL_Templates_Version4_ generator_exclude_regex = "/^(asp|php)/i" extends = UNL_Templates extends_location = "UNL/Templates.php" \ No newline at end of file diff --git a/lib/data/pear.unl.edu/UNL_Templates/tpl_cache/Version3x1/Debug.tpl b/lib/data/pear.unl.edu/UNL_Templates/tpl_cache/Version3x1/Debug.tpl index 5427bfa87ed24b06434c2c0b983ae783d824cfff..ca90ca65ffd630c6c6a683b300dd97490b61668c 100644 --- a/lib/data/pear.unl.edu/UNL_Templates/tpl_cache/Version3x1/Debug.tpl +++ b/lib/data/pear.unl.edu/UNL_Templates/tpl_cache/Version3x1/Debug.tpl @@ -1,9 +1,9 @@ <!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 7 ]><html class="ie iem7"><![endif]--> +<!--[if lt IE 7 ]><html class="ie ie6" lang="en"><![endif]--> +<!--[if IE 7 ]><html class="ie ie7" lang="en"><![endif]--> +<!--[if IE 8 ]><html class="ie ie8" lang="en"><![endif]--> +<!--[if (gte IE 9)|(gt IEMobile 7) ]><html class="ie" lang="en"><![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" --> @@ -30,7 +30,7 @@ <!-- Place optional header elements here --> <!-- InstanceEndEditable --> -<!-- TemplateParam name="class" type="text" value="fixed debug" --> +<!-- InstanceParam name="class" type="text" value="fixed debug" --> </head> <body class="@@(_document['class'])@@" data-version="3.1"> <nav class="skipnav"> diff --git a/lib/data/pear.unl.edu/UNL_Templates/tpl_cache/Version3x1/Fixed.tpl b/lib/data/pear.unl.edu/UNL_Templates/tpl_cache/Version3x1/Fixed.tpl index 2ab5dd2792ca321bfcfa2413ea1150aea1e48f61..5c1a3daf5b20c6dc9a4dfa8a0920362b370a7eb6 100644 --- a/lib/data/pear.unl.edu/UNL_Templates/tpl_cache/Version3x1/Fixed.tpl +++ b/lib/data/pear.unl.edu/UNL_Templates/tpl_cache/Version3x1/Fixed.tpl @@ -1,9 +1,9 @@ <!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 7 ]><html class="ie iem7"><![endif]--> +<!--[if lt IE 7 ]><html class="ie ie6" lang="en"><![endif]--> +<!--[if IE 7 ]><html class="ie ie7" lang="en"><![endif]--> +<!--[if IE 8 ]><html class="ie ie8" lang="en"><![endif]--> +<!--[if (gte IE 9)|(gt IEMobile 7) ]><html class="ie" lang="en"><![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" --> @@ -30,7 +30,7 @@ <!-- Place optional header elements here --> <!-- InstanceEndEditable --> -<!-- TemplateParam name="class" type="text" value="fixed" --> +<!-- InstanceParam name="class" type="text" value="fixed" --> </head> <body class="@@(_document['class'])@@" data-version="3.1"> <nav class="skipnav"> diff --git a/lib/data/pear.unl.edu/UNL_Templates/tpl_cache/Version3x1/Local.tpl b/lib/data/pear.unl.edu/UNL_Templates/tpl_cache/Version3x1/Local.tpl index 2bd3f2525ae9b07ff75b113cf2f9207c5321a7a6..22fd3f28df7eaada632ea1c7bed6c53662347144 100644 --- a/lib/data/pear.unl.edu/UNL_Templates/tpl_cache/Version3x1/Local.tpl +++ b/lib/data/pear.unl.edu/UNL_Templates/tpl_cache/Version3x1/Local.tpl @@ -1,9 +1,9 @@ <!DOCTYPE html> -<!--[if IEMobile 7 ]><html class="ie iem7"><!-- InstanceBegin template="/Templates/local.dwt" codeOutsideHTMLIsLocked="false" --><![endif]--> -<!--[if lt IE 7 ]><html class="ie ie6" lang="en"><!-- InstanceBegin template="/Templates/local.dwt" codeOutsideHTMLIsLocked="false" --><![endif]--> -<!--[if IE 7 ]><html class="ie ie7" lang="en"><!-- InstanceBegin template="/Templates/local.dwt" codeOutsideHTMLIsLocked="false" --><![endif]--> -<!--[if IE 8 ]><html class="ie ie8" lang="en"><!-- InstanceBegin template="/Templates/local.dwt" codeOutsideHTMLIsLocked="false" --><![endif]--> -<!--[if (gte IE 9)|(gt IEMobile 7) ]><html class="ie" lang="en"><!-- InstanceBegin template="/Templates/local.dwt" codeOutsideHTMLIsLocked="false" --><![endif]--> +<!--[if IEMobile 7 ]><html class="ie iem7"><![endif]--> +<!--[if lt IE 7 ]><html class="ie ie6" lang="en"><![endif]--> +<!--[if IE 7 ]><html class="ie ie7" lang="en"><![endif]--> +<!--[if IE 8 ]><html class="ie ie8" lang="en"><![endif]--> +<!--[if (gte IE 9)|(gt IEMobile 7) ]><html class="ie" lang="en"><![endif]--> <!--[if !(IEMobile) | !(IE)]><!--><html lang="en"><!-- InstanceBegin template="/Templates/local.dwt" codeOutsideHTMLIsLocked="false" --><!--<![endif]--> <head> <!--#include virtual="/wdn/templates_3.1/includes/metanfavico.html" --> @@ -30,7 +30,7 @@ <!-- Place optional header elements here --> <!-- InstanceEndEditable --> -<!-- TemplateParam name="class" type="text" value="fixed" --> +<!-- InstanceParam name="class" type="text" value="fixed" --> </head> <body class="@@(_document['class'])@@" data-version="3.1"> <nav class="skipnav"> diff --git a/lib/data/pear.unl.edu/UNL_Templates/tpl_cache/Version3x1/Unlaffiliate.tpl b/lib/data/pear.unl.edu/UNL_Templates/tpl_cache/Version3x1/Unlaffiliate.tpl index e17a0b841a4eb7180ca46dd17999816a71ada354..ed7156d81c2d5cbe5174c867ff1a234f02bf8a62 100644 --- a/lib/data/pear.unl.edu/UNL_Templates/tpl_cache/Version3x1/Unlaffiliate.tpl +++ b/lib/data/pear.unl.edu/UNL_Templates/tpl_cache/Version3x1/Unlaffiliate.tpl @@ -1,9 +1,9 @@ <!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 7 ]><html class="ie iem7"><![endif]--> +<!--[if lt IE 7 ]><html class="ie ie6" lang="en"><![endif]--> +<!--[if IE 7 ]><html class="ie ie7" lang="en"><![endif]--> +<!--[if IE 8 ]><html class="ie ie8" lang="en"><![endif]--> +<!--[if (gte IE 9)|(gt IEMobile 7) ]><html class="ie" lang="en"><![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" --> @@ -31,7 +31,7 @@ <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" --> +<!-- InstanceParam name="class" type="text" value="fixed" --> </head> <body class="@@(_document['class'])@@" data-version="3.1"> <nav class="skipnav"> diff --git a/lib/data/pear.unl.edu/UNL_Templates/tpl_cache/Version3x1/Unlaffiliate_debug.tpl b/lib/data/pear.unl.edu/UNL_Templates/tpl_cache/Version3x1/Unlaffiliate_debug.tpl index e09fc843aa01c2fa4c3b5aa9fb6fbca4d8a130c1..112032443e093c022962c69544ac457cafc6b4fe 100644 --- a/lib/data/pear.unl.edu/UNL_Templates/tpl_cache/Version3x1/Unlaffiliate_debug.tpl +++ b/lib/data/pear.unl.edu/UNL_Templates/tpl_cache/Version3x1/Unlaffiliate_debug.tpl @@ -1,9 +1,9 @@ <!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 7 ]><html class="ie iem7"><![endif]--> +<!--[if lt IE 7 ]><html class="ie ie6" lang="en"><![endif]--> +<!--[if IE 7 ]><html class="ie ie7" lang="en"><![endif]--> +<!--[if IE 8 ]><html class="ie ie8" lang="en"><![endif]--> +<!--[if (gte IE 9)|(gt IEMobile 7) ]><html class="ie" lang="en"><![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" --> @@ -31,7 +31,7 @@ <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" --> +<!-- InstanceParam name="class" type="text" value="fixed debug" --> </head> <body class="@@(_document['class'])@@" data-version="3.1"> <nav class="skipnav"> diff --git a/lib/data/pear.unl.edu/UNL_Templates/tpl_cache/Version3x1/Unlaffiliate_local.tpl b/lib/data/pear.unl.edu/UNL_Templates/tpl_cache/Version3x1/Unlaffiliate_local.tpl index 865cee1f2020efac54b8aa65417fed32337f24da..09e83982249ffd96b9dc83474babaa3a0c567e72 100644 --- a/lib/data/pear.unl.edu/UNL_Templates/tpl_cache/Version3x1/Unlaffiliate_local.tpl +++ b/lib/data/pear.unl.edu/UNL_Templates/tpl_cache/Version3x1/Unlaffiliate_local.tpl @@ -1,9 +1,9 @@ <!DOCTYPE html> -<!--[if IEMobile 7 ]><html class="ie iem7"><!-- InstanceBegin template="/Templates/unlaffiliate_local.dwt" codeOutsideHTMLIsLocked="false" --><![endif]--> -<!--[if lt IE 7 ]><html class="ie ie6" lang="en"><!-- InstanceBegin template="/Templates/unlaffiliate_local.dwt" codeOutsideHTMLIsLocked="false" --><![endif]--> -<!--[if IE 7 ]><html class="ie ie7" lang="en"><!-- InstanceBegin template="/Templates/unlaffiliate_local.dwt" codeOutsideHTMLIsLocked="false" --><![endif]--> -<!--[if IE 8 ]><html class="ie ie8" lang="en"><!-- InstanceBegin template="/Templates/unlaffiliate_local.dwt" codeOutsideHTMLIsLocked="false" --><![endif]--> -<!--[if (gte IE 9)|(gt IEMobile 7) ]><html class="ie" lang="en"><!-- InstanceBegin template="/Templates/unlaffiliate_local.dwt" codeOutsideHTMLIsLocked="false" --><![endif]--> +<!--[if IEMobile 7 ]><html class="ie iem7"><![endif]--> +<!--[if lt IE 7 ]><html class="ie ie6" lang="en"><![endif]--> +<!--[if IE 7 ]><html class="ie ie7" lang="en"><![endif]--> +<!--[if IE 8 ]><html class="ie ie8" lang="en"><![endif]--> +<!--[if (gte IE 9)|(gt IEMobile 7) ]><html class="ie" lang="en"><![endif]--> <!--[if !(IEMobile) | !(IE)]><!--><html lang="en"><!-- InstanceBegin template="/Templates/unlaffiliate_local.dwt" codeOutsideHTMLIsLocked="false" --><!--<![endif]--> <head> <!--#include virtual="/wdn/templates_3.1/includes/metanfavico.html" --> @@ -31,7 +31,7 @@ <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" --> +<!-- InstanceParam name="class" type="text" value="fixed" --> </head> <body class="@@(_document['class'])@@" data-version="3.1"> <nav class="skipnav"> diff --git a/lib/data/pear.unl.edu/UNL_Templates/tpl_cache/Version4/Debug.tpl b/lib/data/pear.unl.edu/UNL_Templates/tpl_cache/Version4/Debug.tpl new file mode 100644 index 0000000000000000000000000000000000000000..da4455710d6d033be2441569fee84a6a0388e3bf --- /dev/null +++ b/lib/data/pear.unl.edu/UNL_Templates/tpl_cache/Version4/Debug.tpl @@ -0,0 +1,166 @@ +<!DOCTYPE html> +<!--[if IEMobile 7 ]><html class="ie iem7"><![endif]--> +<!--[if lt IE 7 ]><html class="ie ie6" lang="en"><![endif]--> +<!--[if IE 7 ]><html class="ie ie7" lang="en"><![endif]--> +<!--[if IE 8 ]><html class="ie ie8" lang="en"><![endif]--> +<!--[if (gte IE 9)|(gt IEMobile 7) ]><html class="ie" lang="en"><![endif]--> +<!--[if !(IEMobile) | !(IE)]><!--><html lang="en"><!-- InstanceBegin template="/Templates/debug.dwt" codeOutsideHTMLIsLocked="false" --><!--<![endif]--> +<head> +<!--#include virtual="/wdn/templates_4.0/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: debug.dwt | 1453c8fc0eafda458699fd5676379805da2368cc | Fri Oct 12 13:23:32 2012 -0500 | Seth Meranda $ +--> +<!--#include virtual="/wdn/templates_4.0/includes/scriptsandstyles_debug.html" --> +<!-- InstanceBeginEditable name="doctitle" --> +<title>Use a descriptive page title | Optional Site Title (use for context) | University of Nebraska–Lincoln</title> +<!-- InstanceEndEditable --> + +<!-- InstanceBeginEditable name="head" --> +<!-- Place optional header elements here --> + +<!-- InstanceEndEditable --> +<!-- InstanceParam name="class" type="text" value="debug" --> +</head> +<body class="@@(_document['class'])@@" data-version="4.0"> + <!--#include virtual="/wdn/templates_4.0/includes/skipnav.html" --> + <div id="wdn_wrapper"> + <input type="checkbox" id="wdn_menu_toggle" value="Show navigation menu" class="wdn-content-slide wdn-input-driver" /> + <!--#include virtual="/wdn/templates_4.0/includes/noscript-padding.html" --> + <header id="header" role="banner" class="wdn-content-slide wdn-band"> + <!--#include virtual="/wdn/templates_4.0/includes/wdnResources.html" --> + <div class="wdn-inner-wrapper"> + <!--#include virtual="/wdn/templates_4.0/includes/logo.html" --> + <div id="wdn_resources"> + <!--#include virtual="/wdn/templates_4.0/includes/idm.html" --> + <!--#include virtual="/wdn/templates_4.0/includes/wdnTools.html" --> + </div> + <span id="wdn_institution_title">University of Nebraska–Lincoln</span> + </div> + <!--#include virtual="/wdn/templates_4.0/includes/apps.html" --> + <div class="wdn-inner-wrapper"> + <div id="wdn_site_title"> + <span> +<!-- InstanceBeginEditable name="titlegraphic" --> +The Title of My Site +<!-- InstanceEndEditable --> +</span> + </div> + </div> + </header> + <div id="wdn_navigation_bar" role="navigation" class="wdn-band"> + <nav id="breadcrumbs" class="wdn-inner-wrapper"> + <!-- WDN: see glossary item 'breadcrumbs' --> + <h3 class="wdn_list_descriptor wdn-text-hidden">Breadcrumbs</h3> + +<!-- InstanceBeginEditable name="breadcrumbs" --> + <ul> + <li><a href="http://www.unl.edu/" title="University of Nebraska–Lincoln" class="wdn-icon-home">UNL</a></li> + <li><a href="#" title="Site Title">Site Title</a></li> + <li>Home</li> + </ul> + +<!-- InstanceEndEditable --> + </nav> + <div id="wdn_navigation_wrapper"> + <nav id="navigation" role="navigation" class="wdn-band"> + <h3 class="wdn_list_descriptor wdn-text-hidden">Navigation</h3> + +<!-- InstanceBeginEditable name="navlinks" --> + <!--#include virtual="../sharedcode/navigation.html" --> + +<!-- InstanceEndEditable --> + <label for="wdn_menu_toggle" class="wdn-icon-menu">Menu</label> + </nav> + </div> + </div> + <!-- Navigation Trigger --> + <div class="wdn-menu-trigger wdn-content-slide"> + <label for="wdn_menu_toggle" class="wdn-icon-menu">Menu</label> + </div> + <!-- End navigation trigger --> + <div id="wdn_content_wrapper" role="main" class="wdn-content-slide"> + <div class="wdn-band"> + <div class="wdn-inner-wrapper"> + <div id="pagetitle"> + +<!-- InstanceBeginEditable name="pagetitle" --> + <h1>Please Title Your Page Here</h1> + +<!-- InstanceEndEditable --> + </div> + </div> + </div> + <div id="maincontent" class="wdn-main"> + <!--THIS IS THE MAIN CONTENT AREA; WDN: see glossary item 'main content area' --> + +<!-- InstanceBeginEditable name="maincontentarea" --> + <div class="wdn-band"> + <div class="wdn-inner-wrapper"> + <p>Impress your audience with awesome content!</p> + </div> + </div> + +<!-- InstanceEndEditable --> + <!--THIS IS THE END OF THE MAIN CONTENT AREA.--> + </div> + </div> + <div class="wdn-band wdn-content-slide" id="wdn_optional_footer"> + <div class="wdn-inner-wrapper"> + +<!-- InstanceBeginEditable name="optionalfooter" --> + +<!-- InstanceEndEditable --> + </div> + </div> + <footer id="footer" role="contentinfo" class="wdn-content-slide"> + <div class="wdn-band" id="wdn_footer_related"> + <div class="wdn-inner-wrapper"> + +<!-- InstanceBeginEditable name="leftcollinks" --> + <!--#include virtual="../sharedcode/relatedLinks.html" --> + +<!-- InstanceEndEditable --> + </div> + </div> + <div class="wdn-band"> + <div class="wdn-inner-wrapper"> + <div class="footer_col" id="wdn_footer_contact"> + <h3>Contact Us</h3> + <div class="wdn-contact-wrapper"> + +<!-- InstanceBeginEditable name="contactinfo" --> + <!--#include virtual="../sharedcode/footerContactInfo.html" --> + +<!-- InstanceEndEditable --> + </div> + </div> + <div id="wdn_copyright"> + <div class="wdn-footer-text"> + +<!-- InstanceBeginEditable name="footercontent" --> + <!--#include virtual="../sharedcode/footer.html" --> + +<!-- InstanceEndEditable --> + <!--#include virtual="/wdn/templates_4.0/includes/wdn.html" --> + </div> + <!--#include virtual="/wdn/templates_4.0/includes/logos.html" --> + </div> + </div> + </div> + <!--#include virtual="/wdn/templates_4.0/includes/footer_floater.html" --> + </footer> + <!--#include virtual="/wdn/templates_4.0/includes/noscript.html" --> + </div> +</body> +</html> diff --git a/lib/data/pear.unl.edu/UNL_Templates/tpl_cache/Version4/Fixed.tpl b/lib/data/pear.unl.edu/UNL_Templates/tpl_cache/Version4/Fixed.tpl new file mode 100644 index 0000000000000000000000000000000000000000..5179f462554cdbb80086f6ed61ff0391b49c33e1 --- /dev/null +++ b/lib/data/pear.unl.edu/UNL_Templates/tpl_cache/Version4/Fixed.tpl @@ -0,0 +1,166 @@ +<!DOCTYPE html> +<!--[if IEMobile 7 ]><html class="ie iem7"><![endif]--> +<!--[if lt IE 7 ]><html class="ie ie6" lang="en"><![endif]--> +<!--[if IE 7 ]><html class="ie ie7" lang="en"><![endif]--> +<!--[if IE 8 ]><html class="ie ie8" lang="en"><![endif]--> +<!--[if (gte IE 9)|(gt IEMobile 7) ]><html class="ie" lang="en"><![endif]--> +<!--[if !(IEMobile) | !(IE)]><!--><html lang="en"><!-- InstanceBegin template="/Templates/fixed.dwt" codeOutsideHTMLIsLocked="false" --><!--<![endif]--> +<head> +<!--#include virtual="/wdn/templates_4.0/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: fixed.dwt | 1453c8fc0eafda458699fd5676379805da2368cc | Fri Oct 12 13:23:32 2012 -0500 | Seth Meranda $ +--> +<!--#include virtual="/wdn/templates_4.0/includes/scriptsandstyles.html" --> +<!-- InstanceBeginEditable name="doctitle" --> +<title>Use a descriptive page title | Optional Site Title (use for context) | University of Nebraska–Lincoln</title> +<!-- InstanceEndEditable --> + +<!-- InstanceBeginEditable name="head" --> +<!-- Place optional header elements here --> + +<!-- InstanceEndEditable --> +<!-- InstanceParam name="class" type="text" value="" --> +</head> +<body class="@@(_document['class'])@@" data-version="4.0"> + <!--#include virtual="/wdn/templates_4.0/includes/skipnav.html" --> + <div id="wdn_wrapper"> + <input type="checkbox" id="wdn_menu_toggle" value="Show navigation menu" class="wdn-content-slide wdn-input-driver" /> + <!--#include virtual="/wdn/templates_4.0/includes/noscript-padding.html" --> + <header id="header" role="banner" class="wdn-content-slide wdn-band"> + <!--#include virtual="/wdn/templates_4.0/includes/wdnResources.html" --> + <div class="wdn-inner-wrapper"> + <!--#include virtual="/wdn/templates_4.0/includes/logo.html" --> + <div id="wdn_resources"> + <!--#include virtual="/wdn/templates_4.0/includes/idm.html" --> + <!--#include virtual="/wdn/templates_4.0/includes/wdnTools.html" --> + </div> + <span id="wdn_institution_title">University of Nebraska–Lincoln</span> + </div> + <!--#include virtual="/wdn/templates_4.0/includes/apps.html" --> + <div class="wdn-inner-wrapper"> + <div id="wdn_site_title"> + <span> +<!-- InstanceBeginEditable name="titlegraphic" --> +The Title of My Site +<!-- InstanceEndEditable --> +</span> + </div> + </div> + </header> + <div id="wdn_navigation_bar" role="navigation" class="wdn-band"> + <nav id="breadcrumbs" class="wdn-inner-wrapper"> + <!-- WDN: see glossary item 'breadcrumbs' --> + <h3 class="wdn_list_descriptor wdn-text-hidden">Breadcrumbs</h3> + +<!-- InstanceBeginEditable name="breadcrumbs" --> + <ul> + <li><a href="http://www.unl.edu/" title="University of Nebraska–Lincoln" class="wdn-icon-home">UNL</a></li> + <li><a href="#" title="Site Title">Site Title</a></li> + <li>Home</li> + </ul> + +<!-- InstanceEndEditable --> + </nav> + <div id="wdn_navigation_wrapper"> + <nav id="navigation" role="navigation" class="wdn-band"> + <h3 class="wdn_list_descriptor wdn-text-hidden">Navigation</h3> + +<!-- InstanceBeginEditable name="navlinks" --> + <!--#include virtual="../sharedcode/navigation.html" --> + +<!-- InstanceEndEditable --> + <label for="wdn_menu_toggle" class="wdn-icon-menu">Menu</label> + </nav> + </div> + </div> + <!-- Navigation Trigger --> + <div class="wdn-menu-trigger wdn-content-slide"> + <label for="wdn_menu_toggle" class="wdn-icon-menu">Menu</label> + </div> + <!-- End navigation trigger --> + <div id="wdn_content_wrapper" role="main" class="wdn-content-slide"> + <div class="wdn-band"> + <div class="wdn-inner-wrapper"> + <div id="pagetitle"> + +<!-- InstanceBeginEditable name="pagetitle" --> + <h1>Please Title Your Page Here</h1> + +<!-- InstanceEndEditable --> + </div> + </div> + </div> + <div id="maincontent" class="wdn-main"> + <!--THIS IS THE MAIN CONTENT AREA; WDN: see glossary item 'main content area' --> + +<!-- InstanceBeginEditable name="maincontentarea" --> + <div class="wdn-band"> + <div class="wdn-inner-wrapper"> + <p>Impress your audience with awesome content!</p> + </div> + </div> + +<!-- InstanceEndEditable --> + <!--THIS IS THE END OF THE MAIN CONTENT AREA.--> + </div> + </div> + <div class="wdn-band wdn-content-slide" id="wdn_optional_footer"> + <div class="wdn-inner-wrapper"> + +<!-- InstanceBeginEditable name="optionalfooter" --> + +<!-- InstanceEndEditable --> + </div> + </div> + <footer id="footer" role="contentinfo" class="wdn-content-slide"> + <div class="wdn-band" id="wdn_footer_related"> + <div class="wdn-inner-wrapper"> + +<!-- InstanceBeginEditable name="leftcollinks" --> + <!--#include virtual="../sharedcode/relatedLinks.html" --> + +<!-- InstanceEndEditable --> + </div> + </div> + <div class="wdn-band"> + <div class="wdn-inner-wrapper"> + <div class="footer_col" id="wdn_footer_contact"> + <h3>Contact Us</h3> + <div class="wdn-contact-wrapper"> + +<!-- InstanceBeginEditable name="contactinfo" --> + <!--#include virtual="../sharedcode/footerContactInfo.html" --> + +<!-- InstanceEndEditable --> + </div> + </div> + <div id="wdn_copyright"> + <div class="wdn-footer-text"> + +<!-- InstanceBeginEditable name="footercontent" --> + <!--#include virtual="../sharedcode/footer.html" --> + +<!-- InstanceEndEditable --> + <!--#include virtual="/wdn/templates_4.0/includes/wdn.html" --> + </div> + <!--#include virtual="/wdn/templates_4.0/includes/logos.html" --> + </div> + </div> + </div> + <!--#include virtual="/wdn/templates_4.0/includes/footer_floater.html" --> + </footer> + <!--#include virtual="/wdn/templates_4.0/includes/noscript.html" --> + </div> +</body> +</html> diff --git a/lib/data/pear.unl.edu/UNL_Templates/tpl_cache/Version4/Local.tpl b/lib/data/pear.unl.edu/UNL_Templates/tpl_cache/Version4/Local.tpl new file mode 100644 index 0000000000000000000000000000000000000000..ecc46f57bfb32bcf9527e08f5e8b021288c167f3 --- /dev/null +++ b/lib/data/pear.unl.edu/UNL_Templates/tpl_cache/Version4/Local.tpl @@ -0,0 +1,166 @@ +<!DOCTYPE html> +<!--[if IEMobile 7 ]><html class="ie iem7"><![endif]--> +<!--[if lt IE 7 ]><html class="ie ie6" lang="en"><![endif]--> +<!--[if IE 7 ]><html class="ie ie7" lang="en"><![endif]--> +<!--[if IE 8 ]><html class="ie ie8" lang="en"><![endif]--> +<!--[if (gte IE 9)|(gt IEMobile 7) ]><html class="ie" lang="en"><![endif]--> +<!--[if !(IEMobile) | !(IE)]><!--><html lang="en"><!-- InstanceBegin template="/Templates/local.dwt" codeOutsideHTMLIsLocked="false" --><!--<![endif]--> +<head> +<!--#include virtual="/wdn/templates_4.0/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: local.dwt | 1453c8fc0eafda458699fd5676379805da2368cc | Fri Oct 12 13:23:32 2012 -0500 | Seth Meranda $ +--> +<!--#include virtual="/wdn/templates_4.0/includes/scriptsandstyles_local.html" --> +<!-- InstanceBeginEditable name="doctitle" --> +<title>Use a descriptive page title | Optional Site Title (use for context) | University of Nebraska–Lincoln</title> +<!-- InstanceEndEditable --> + +<!-- InstanceBeginEditable name="head" --> +<!-- Place optional header elements here --> + +<!-- InstanceEndEditable --> +<!-- InstanceParam name="class" type="text" value="" --> +</head> +<body class="@@(_document['class'])@@" data-version="4.0"> + <!--#include virtual="/wdn/templates_4.0/includes/skipnav.html" --> + <div id="wdn_wrapper"> + <input type="checkbox" id="wdn_menu_toggle" value="Show navigation menu" class="wdn-content-slide wdn-input-driver" /> + <!--#include virtual="/wdn/templates_4.0/includes/noscript-padding.html" --> + <header id="header" role="banner" class="wdn-content-slide wdn-band"> + <!--#include virtual="/wdn/templates_4.0/includes/wdnResources.html" --> + <div class="wdn-inner-wrapper"> + <!--#include virtual="/wdn/templates_4.0/includes/logo.html" --> + <div id="wdn_resources"> + <!--#include virtual="/wdn/templates_4.0/includes/idm.html" --> + <!--#include virtual="/wdn/templates_4.0/includes/wdnTools.html" --> + </div> + <span id="wdn_institution_title">University of Nebraska–Lincoln</span> + </div> + <!--#include virtual="/wdn/templates_4.0/includes/apps.html" --> + <div class="wdn-inner-wrapper"> + <div id="wdn_site_title"> + <span> +<!-- InstanceBeginEditable name="titlegraphic" --> +The Title of My Site +<!-- InstanceEndEditable --> +</span> + </div> + </div> + </header> + <div id="wdn_navigation_bar" role="navigation" class="wdn-band"> + <nav id="breadcrumbs" class="wdn-inner-wrapper"> + <!-- WDN: see glossary item 'breadcrumbs' --> + <h3 class="wdn_list_descriptor wdn-text-hidden">Breadcrumbs</h3> + +<!-- InstanceBeginEditable name="breadcrumbs" --> + <ul> + <li><a href="http://www.unl.edu/" title="University of Nebraska–Lincoln" class="wdn-icon-home">UNL</a></li> + <li><a href="#" title="Site Title">Site Title</a></li> + <li>Home</li> + </ul> + +<!-- InstanceEndEditable --> + </nav> + <div id="wdn_navigation_wrapper"> + <nav id="navigation" role="navigation" class="wdn-band"> + <h3 class="wdn_list_descriptor wdn-text-hidden">Navigation</h3> + +<!-- InstanceBeginEditable name="navlinks" --> + <!--#include virtual="../sharedcode/navigation.html" --> + +<!-- InstanceEndEditable --> + <label for="wdn_menu_toggle" class="wdn-icon-menu">Menu</label> + </nav> + </div> + </div> + <!-- Navigation Trigger --> + <div class="wdn-menu-trigger wdn-content-slide"> + <label for="wdn_menu_toggle" class="wdn-icon-menu">Menu</label> + </div> + <!-- End navigation trigger --> + <div id="wdn_content_wrapper" role="main" class="wdn-content-slide"> + <div class="wdn-band"> + <div class="wdn-inner-wrapper"> + <div id="pagetitle"> + +<!-- InstanceBeginEditable name="pagetitle" --> + <h1>Please Title Your Page Here</h1> + +<!-- InstanceEndEditable --> + </div> + </div> + </div> + <div id="maincontent" class="wdn-main"> + <!--THIS IS THE MAIN CONTENT AREA; WDN: see glossary item 'main content area' --> + +<!-- InstanceBeginEditable name="maincontentarea" --> + <div class="wdn-band"> + <div class="wdn-inner-wrapper"> + <p>Impress your audience with awesome content!</p> + </div> + </div> + +<!-- InstanceEndEditable --> + <!--THIS IS THE END OF THE MAIN CONTENT AREA.--> + </div> + </div> + <div class="wdn-band wdn-content-slide" id="wdn_optional_footer"> + <div class="wdn-inner-wrapper"> + +<!-- InstanceBeginEditable name="optionalfooter" --> + +<!-- InstanceEndEditable --> + </div> + </div> + <footer id="footer" role="contentinfo" class="wdn-content-slide"> + <div class="wdn-band" id="wdn_footer_related"> + <div class="wdn-inner-wrapper"> + +<!-- InstanceBeginEditable name="leftcollinks" --> + <!--#include virtual="../sharedcode/relatedLinks.html" --> + +<!-- InstanceEndEditable --> + </div> + </div> + <div class="wdn-band"> + <div class="wdn-inner-wrapper"> + <div class="footer_col" id="wdn_footer_contact"> + <h3>Contact Us</h3> + <div class="wdn-contact-wrapper"> + +<!-- InstanceBeginEditable name="contactinfo" --> + <!--#include virtual="../sharedcode/footerContactInfo.html" --> + +<!-- InstanceEndEditable --> + </div> + </div> + <div id="wdn_copyright"> + <div class="wdn-footer-text"> + +<!-- InstanceBeginEditable name="footercontent" --> + <!--#include virtual="../sharedcode/footer.html" --> + +<!-- InstanceEndEditable --> + <!--#include virtual="/wdn/templates_4.0/includes/wdn.html" --> + </div> + <!--#include virtual="/wdn/templates_4.0/includes/logos.html" --> + </div> + </div> + </div> + <!--#include virtual="/wdn/templates_4.0/includes/footer_floater.html" --> + </footer> + <!--#include virtual="/wdn/templates_4.0/includes/noscript.html" --> + </div> +</body> +</html> diff --git a/lib/data/pear.unl.edu/UNL_Templates/tpl_cache/Version4/Unlaffiliate.tpl b/lib/data/pear.unl.edu/UNL_Templates/tpl_cache/Version4/Unlaffiliate.tpl new file mode 100644 index 0000000000000000000000000000000000000000..d9d358631659857513eb985b2008445acdc63f25 --- /dev/null +++ b/lib/data/pear.unl.edu/UNL_Templates/tpl_cache/Version4/Unlaffiliate.tpl @@ -0,0 +1,172 @@ +<!DOCTYPE html> +<!--[if IEMobile 7 ]><html class="ie iem7"><![endif]--> +<!--[if lt IE 7 ]><html class="ie ie6" lang="en"><![endif]--> +<!--[if IE 7 ]><html class="ie ie7" lang="en"><![endif]--> +<!--[if IE 8 ]><html class="ie ie8" lang="en"><![endif]--> +<!--[if (gte IE 9)|(gt IEMobile 7) ]><html class="ie" lang="en"><![endif]--> +<!--[if !(IEMobile) | !(IE)]><!--><html lang="en"><!-- InstanceBegin template="/Templates/unlaffiliate.dwt" codeOutsideHTMLIsLocked="false" --><!--<![endif]--> +<head> +<!--#include virtual="/wdn/templates_4.0/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: unlaffiliate.dwt | 1453c8fc0eafda458699fd5676379805da2368cc | Fri Oct 12 13:23:32 2012 -0500 | Seth Meranda $ +--> +<!--#include virtual="/wdn/templates_4.0/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 --> +<!-- InstanceParam name="class" type="text" value="" --> +</head> +<body class="@@(_document['class'])@@" data-version="4.0"> + <!--#include virtual="/wdn/templates_4.0/includes/skipnav.html" --> + <div id="wdn_wrapper"> + <input type="checkbox" id="wdn_menu_toggle" value="Show navigation menu" class="wdn-content-slide wdn-input-driver" /> + <!--#include virtual="/wdn/templates_4.0/includes/noscript-padding.html" --> + <header id="header" role="banner" class="wdn-content-slide wdn-band"> + <!--#include virtual="/wdn/templates_4.0/includes/wdnResources.html" --> + <div class="wdn-inner-wrapper"> + <!-- InstanceBeginEditable name="sitebranding_logo" --> + <div id="logo"> + <a href="http://www.throughtheeyes.org/" title="Through the Eyes of the Child Initiative" id="wdn_logo_link">Through the Eyes of the Child Initiative</a> + </div> + +<!-- InstanceEndEditable --> + <div id="wdn_resources"> + <!--#include virtual="/wdn/templates_4.0/includes/idm.html" --> + <!--#include virtual="/wdn/templates_4.0/includes/wdnTools.html" --> + </div> + <span id="wdn_institution_title"><!-- InstanceBeginEditable name="sitebranding_affiliate" --><a href="http://www.unl.edu" title="University of Nebraska–Lincoln">An affiliate of the University of Nebraska–Lincoln</a> +<!-- InstanceEndEditable --> +</span> + </div> + <!--#include virtual="/wdn/templates_4.0/includes/apps.html" --> + <div class="wdn-inner-wrapper"> + <div id="wdn_site_title"> + <span> +<!-- InstanceBeginEditable name="titlegraphic" --> +The Title of My Site +<!-- InstanceEndEditable --> +</span> + </div> + </div> + </header> + <div id="wdn_navigation_bar" role="navigation" class="wdn-band"> + <nav id="breadcrumbs" class="wdn-inner-wrapper"> + <!-- WDN: see glossary item 'breadcrumbs' --> + <h3 class="wdn_list_descriptor wdn-text-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" class="wdn-band"> + <h3 class="wdn_list_descriptor wdn-text-hidden">Navigation</h3> + +<!-- InstanceBeginEditable name="navlinks" --> + <!--#include virtual="../sharedcode/navigation.html" --> + +<!-- InstanceEndEditable --> + <label for="wdn_menu_toggle" class="wdn-icon-menu">Menu</label> + </nav> + </div> + </div> + <!-- Navigation Trigger --> + <div class="wdn-menu-trigger wdn-content-slide"> + <label for="wdn_menu_toggle" class="wdn-icon-menu">Menu</label> + </div> + <!-- End navigation trigger --> + <div id="wdn_content_wrapper" role="main" class="wdn-content-slide"> + <div class="wdn-band"> + <div class="wdn-inner-wrapper"> + <div id="pagetitle"> + +<!-- InstanceBeginEditable name="pagetitle" --> + <h1>Please Title Your Page Here</h1> + +<!-- InstanceEndEditable --> + </div> + </div> + </div> + <div id="maincontent" class="wdn-main"> + <!--THIS IS THE MAIN CONTENT AREA; WDN: see glossary item 'main content area' --> + +<!-- InstanceBeginEditable name="maincontentarea" --> + <div class="wdn-band"> + <div class="wdn-inner-wrapper"> + <p>Impress your audience with awesome content!</p> + </div> + </div> + +<!-- InstanceEndEditable --> + <!--THIS IS THE END OF THE MAIN CONTENT AREA.--> + </div> + </div> + <div class="wdn-band wdn-content-slide" id="wdn_optional_footer"> + <div class="wdn-inner-wrapper"> + +<!-- InstanceBeginEditable name="optionalfooter" --> + +<!-- InstanceEndEditable --> + </div> + </div> + <footer id="footer" role="contentinfo" class="wdn-content-slide"> + <div class="wdn-band" id="wdn_footer_related"> + <div class="wdn-inner-wrapper"> + +<!-- InstanceBeginEditable name="leftcollinks" --> + <!--#include virtual="../sharedcode/relatedLinks.html" --> + +<!-- InstanceEndEditable --> + </div> + </div> + <div class="wdn-band"> + <div class="wdn-inner-wrapper"> + <div class="footer_col" id="wdn_footer_contact"> + <h3>Contact Us</h3> + <div class="wdn-contact-wrapper"> + +<!-- InstanceBeginEditable name="contactinfo" --> + <!--#include virtual="../sharedcode/footerContactInfo.html" --> + +<!-- InstanceEndEditable --> + </div> + </div> + <div id="wdn_copyright"> + <div class="wdn-footer-text"> + +<!-- InstanceBeginEditable name="footercontent" --> + <!--#include virtual="../sharedcode/footer.html" --> + +<!-- InstanceEndEditable --> + <!--#include virtual="/wdn/templates_4.0/includes/wdn.html" --> + </div> + <!--#include virtual="/wdn/templates_4.0/includes/logos.html" --> + </div> + </div> + </div> + <!--#include virtual="/wdn/templates_4.0/includes/footer_floater.html" --> + </footer> + <!--#include virtual="/wdn/templates_4.0/includes/noscript.html" --> + </div> +</body> +</html> diff --git a/lib/data/pear.unl.edu/UNL_Templates/tpl_cache/Version4/Unlaffiliate_debug.tpl b/lib/data/pear.unl.edu/UNL_Templates/tpl_cache/Version4/Unlaffiliate_debug.tpl new file mode 100644 index 0000000000000000000000000000000000000000..08371ae90ef51277e7e070cbb654711d240214c5 --- /dev/null +++ b/lib/data/pear.unl.edu/UNL_Templates/tpl_cache/Version4/Unlaffiliate_debug.tpl @@ -0,0 +1,172 @@ +<!DOCTYPE html> +<!--[if IEMobile 7 ]><html class="ie iem7"><![endif]--> +<!--[if lt IE 7 ]><html class="ie ie6" lang="en"><![endif]--> +<!--[if IE 7 ]><html class="ie ie7" lang="en"><![endif]--> +<!--[if IE 8 ]><html class="ie ie8" lang="en"><![endif]--> +<!--[if (gte IE 9)|(gt IEMobile 7) ]><html class="ie" lang="en"><![endif]--> +<!--[if !(IEMobile) | !(IE)]><!--><html lang="en"><!-- InstanceBegin template="/Templates/unlaffiliate_debug.dwt" codeOutsideHTMLIsLocked="false" --><!--<![endif]--> +<head> +<!--#include virtual="/wdn/templates_4.0/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: unlaffiliate_debug.dwt | 1453c8fc0eafda458699fd5676379805da2368cc | Fri Oct 12 13:23:32 2012 -0500 | Seth Meranda $ +--> +<!--#include virtual="/wdn/templates_4.0/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 --> +<!-- InstanceParam name="class" type="text" value="debug" --> +</head> +<body class="@@(_document['class'])@@" data-version="4.0"> + <!--#include virtual="/wdn/templates_4.0/includes/skipnav.html" --> + <div id="wdn_wrapper"> + <input type="checkbox" id="wdn_menu_toggle" value="Show navigation menu" class="wdn-content-slide wdn-input-driver" /> + <!--#include virtual="/wdn/templates_4.0/includes/noscript-padding.html" --> + <header id="header" role="banner" class="wdn-content-slide wdn-band"> + <!--#include virtual="/wdn/templates_4.0/includes/wdnResources.html" --> + <div class="wdn-inner-wrapper"> + <!-- InstanceBeginEditable name="sitebranding_logo" --> + <div id="logo"> + <a href="http://www.throughtheeyes.org/" title="Through the Eyes of the Child Initiative" id="wdn_logo_link">Through the Eyes of the Child Initiative</a> + </div> + +<!-- InstanceEndEditable --> + <div id="wdn_resources"> + <!--#include virtual="/wdn/templates_4.0/includes/idm.html" --> + <!--#include virtual="/wdn/templates_4.0/includes/wdnTools.html" --> + </div> + <span id="wdn_institution_title"><!-- InstanceBeginEditable name="sitebranding_affiliate" --><a href="http://www.unl.edu" title="University of Nebraska–Lincoln">An affiliate of the University of Nebraska–Lincoln</a> +<!-- InstanceEndEditable --> +</span> + </div> + <!--#include virtual="/wdn/templates_4.0/includes/apps.html" --> + <div class="wdn-inner-wrapper"> + <div id="wdn_site_title"> + <span> +<!-- InstanceBeginEditable name="titlegraphic" --> +The Title of My Site +<!-- InstanceEndEditable --> +</span> + </div> + </div> + </header> + <div id="wdn_navigation_bar" role="navigation" class="wdn-band"> + <nav id="breadcrumbs" class="wdn-inner-wrapper"> + <!-- WDN: see glossary item 'breadcrumbs' --> + <h3 class="wdn_list_descriptor wdn-text-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" class="wdn-band"> + <h3 class="wdn_list_descriptor wdn-text-hidden">Navigation</h3> + +<!-- InstanceBeginEditable name="navlinks" --> + <!--#include virtual="../sharedcode/navigation.html" --> + +<!-- InstanceEndEditable --> + <label for="wdn_menu_toggle" class="wdn-icon-menu">Menu</label> + </nav> + </div> + </div> + <!-- Navigation Trigger --> + <div class="wdn-menu-trigger wdn-content-slide"> + <label for="wdn_menu_toggle" class="wdn-icon-menu">Menu</label> + </div> + <!-- End navigation trigger --> + <div id="wdn_content_wrapper" role="main" class="wdn-content-slide"> + <div class="wdn-band"> + <div class="wdn-inner-wrapper"> + <div id="pagetitle"> + +<!-- InstanceBeginEditable name="pagetitle" --> + <h1>Please Title Your Page Here</h1> + +<!-- InstanceEndEditable --> + </div> + </div> + </div> + <div id="maincontent" class="wdn-main"> + <!--THIS IS THE MAIN CONTENT AREA; WDN: see glossary item 'main content area' --> + +<!-- InstanceBeginEditable name="maincontentarea" --> + <div class="wdn-band"> + <div class="wdn-inner-wrapper"> + <p>Impress your audience with awesome content!</p> + </div> + </div> + +<!-- InstanceEndEditable --> + <!--THIS IS THE END OF THE MAIN CONTENT AREA.--> + </div> + </div> + <div class="wdn-band wdn-content-slide" id="wdn_optional_footer"> + <div class="wdn-inner-wrapper"> + +<!-- InstanceBeginEditable name="optionalfooter" --> + +<!-- InstanceEndEditable --> + </div> + </div> + <footer id="footer" role="contentinfo" class="wdn-content-slide"> + <div class="wdn-band" id="wdn_footer_related"> + <div class="wdn-inner-wrapper"> + +<!-- InstanceBeginEditable name="leftcollinks" --> + <!--#include virtual="../sharedcode/relatedLinks.html" --> + +<!-- InstanceEndEditable --> + </div> + </div> + <div class="wdn-band"> + <div class="wdn-inner-wrapper"> + <div class="footer_col" id="wdn_footer_contact"> + <h3>Contact Us</h3> + <div class="wdn-contact-wrapper"> + +<!-- InstanceBeginEditable name="contactinfo" --> + <!--#include virtual="../sharedcode/footerContactInfo.html" --> + +<!-- InstanceEndEditable --> + </div> + </div> + <div id="wdn_copyright"> + <div class="wdn-footer-text"> + +<!-- InstanceBeginEditable name="footercontent" --> + <!--#include virtual="../sharedcode/footer.html" --> + +<!-- InstanceEndEditable --> + <!--#include virtual="/wdn/templates_4.0/includes/wdn.html" --> + </div> + <!--#include virtual="/wdn/templates_4.0/includes/logos.html" --> + </div> + </div> + </div> + <!--#include virtual="/wdn/templates_4.0/includes/footer_floater.html" --> + </footer> + <!--#include virtual="/wdn/templates_4.0/includes/noscript.html" --> + </div> +</body> +</html> diff --git a/lib/data/pear.unl.edu/UNL_Templates/tpl_cache/Version4/Unlaffiliate_local.tpl b/lib/data/pear.unl.edu/UNL_Templates/tpl_cache/Version4/Unlaffiliate_local.tpl new file mode 100644 index 0000000000000000000000000000000000000000..2328632d3a0d8449110e9c575ec3628de832fd4b --- /dev/null +++ b/lib/data/pear.unl.edu/UNL_Templates/tpl_cache/Version4/Unlaffiliate_local.tpl @@ -0,0 +1,172 @@ +<!DOCTYPE html> +<!--[if IEMobile 7 ]><html class="ie iem7"><![endif]--> +<!--[if lt IE 7 ]><html class="ie ie6" lang="en"><![endif]--> +<!--[if IE 7 ]><html class="ie ie7" lang="en"><![endif]--> +<!--[if IE 8 ]><html class="ie ie8" lang="en"><![endif]--> +<!--[if (gte IE 9)|(gt IEMobile 7) ]><html class="ie" lang="en"><![endif]--> +<!--[if !(IEMobile) | !(IE)]><!--><html lang="en"><!-- InstanceBegin template="/Templates/unlaffiliate_local.dwt" codeOutsideHTMLIsLocked="false" --><!--<![endif]--> +<head> +<!--#include virtual="/wdn/templates_4.0/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: unlaffiliate_local.dwt | 1453c8fc0eafda458699fd5676379805da2368cc | Fri Oct 12 13:23:32 2012 -0500 | Seth Meranda $ +--> +<!--#include virtual="/wdn/templates_4.0/includes/scriptsandstyles_local.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 --> +<!-- InstanceParam name="class" type="text" value="" --> +</head> +<body class="@@(_document['class'])@@" data-version="4.0"> + <!--#include virtual="/wdn/templates_4.0/includes/skipnav.html" --> + <div id="wdn_wrapper"> + <input type="checkbox" id="wdn_menu_toggle" value="Show navigation menu" class="wdn-content-slide wdn-input-driver" /> + <!--#include virtual="/wdn/templates_4.0/includes/noscript-padding.html" --> + <header id="header" role="banner" class="wdn-content-slide wdn-band"> + <!--#include virtual="/wdn/templates_4.0/includes/wdnResources.html" --> + <div class="wdn-inner-wrapper"> + <!-- InstanceBeginEditable name="sitebranding_logo" --> + <div id="logo"> + <a href="http://www.throughtheeyes.org/" title="Through the Eyes of the Child Initiative" id="wdn_logo_link">Through the Eyes of the Child Initiative</a> + </div> + +<!-- InstanceEndEditable --> + <div id="wdn_resources"> + <!--#include virtual="/wdn/templates_4.0/includes/idm.html" --> + <!--#include virtual="/wdn/templates_4.0/includes/wdnTools.html" --> + </div> + <span id="wdn_institution_title"><!-- InstanceBeginEditable name="sitebranding_affiliate" --><a href="http://www.unl.edu" title="University of Nebraska–Lincoln">An affiliate of the University of Nebraska–Lincoln</a> +<!-- InstanceEndEditable --> +</span> + </div> + <!--#include virtual="/wdn/templates_4.0/includes/apps.html" --> + <div class="wdn-inner-wrapper"> + <div id="wdn_site_title"> + <span> +<!-- InstanceBeginEditable name="titlegraphic" --> +The Title of My Site +<!-- InstanceEndEditable --> +</span> + </div> + </div> + </header> + <div id="wdn_navigation_bar" role="navigation" class="wdn-band"> + <nav id="breadcrumbs" class="wdn-inner-wrapper"> + <!-- WDN: see glossary item 'breadcrumbs' --> + <h3 class="wdn_list_descriptor wdn-text-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" class="wdn-band"> + <h3 class="wdn_list_descriptor wdn-text-hidden">Navigation</h3> + +<!-- InstanceBeginEditable name="navlinks" --> + <!--#include virtual="../sharedcode/navigation.html" --> + +<!-- InstanceEndEditable --> + <label for="wdn_menu_toggle" class="wdn-icon-menu">Menu</label> + </nav> + </div> + </div> + <!-- Navigation Trigger --> + <div class="wdn-menu-trigger wdn-content-slide"> + <label for="wdn_menu_toggle" class="wdn-icon-menu">Menu</label> + </div> + <!-- End navigation trigger --> + <div id="wdn_content_wrapper" role="main" class="wdn-content-slide"> + <div class="wdn-band"> + <div class="wdn-inner-wrapper"> + <div id="pagetitle"> + +<!-- InstanceBeginEditable name="pagetitle" --> + <h1>Please Title Your Page Here</h1> + +<!-- InstanceEndEditable --> + </div> + </div> + </div> + <div id="maincontent" class="wdn-main"> + <!--THIS IS THE MAIN CONTENT AREA; WDN: see glossary item 'main content area' --> + +<!-- InstanceBeginEditable name="maincontentarea" --> + <div class="wdn-band"> + <div class="wdn-inner-wrapper"> + <p>Impress your audience with awesome content!</p> + </div> + </div> + +<!-- InstanceEndEditable --> + <!--THIS IS THE END OF THE MAIN CONTENT AREA.--> + </div> + </div> + <div class="wdn-band wdn-content-slide" id="wdn_optional_footer"> + <div class="wdn-inner-wrapper"> + +<!-- InstanceBeginEditable name="optionalfooter" --> + +<!-- InstanceEndEditable --> + </div> + </div> + <footer id="footer" role="contentinfo" class="wdn-content-slide"> + <div class="wdn-band" id="wdn_footer_related"> + <div class="wdn-inner-wrapper"> + +<!-- InstanceBeginEditable name="leftcollinks" --> + <!--#include virtual="../sharedcode/relatedLinks.html" --> + +<!-- InstanceEndEditable --> + </div> + </div> + <div class="wdn-band"> + <div class="wdn-inner-wrapper"> + <div class="footer_col" id="wdn_footer_contact"> + <h3>Contact Us</h3> + <div class="wdn-contact-wrapper"> + +<!-- InstanceBeginEditable name="contactinfo" --> + <!--#include virtual="../sharedcode/footerContactInfo.html" --> + +<!-- InstanceEndEditable --> + </div> + </div> + <div id="wdn_copyright"> + <div class="wdn-footer-text"> + +<!-- InstanceBeginEditable name="footercontent" --> + <!--#include virtual="../sharedcode/footer.html" --> + +<!-- InstanceEndEditable --> + <!--#include virtual="/wdn/templates_4.0/includes/wdn.html" --> + </div> + <!--#include virtual="/wdn/templates_4.0/includes/logos.html" --> + </div> + </div> + </div> + <!--#include virtual="/wdn/templates_4.0/includes/footer_floater.html" --> + </footer> + <!--#include virtual="/wdn/templates_4.0/includes/noscript.html" --> + </div> +</body> +</html> diff --git a/lib/docs/pear.unl.edu/UNL_DWT/examples/basic/Template_style1.php b/lib/docs/pear.unl.edu/UNL_DWT/examples/basic/Template_style1.php new file mode 100644 index 0000000000000000000000000000000000000000..539fb44c98acddb65482a39a24383eba3a2de80f --- /dev/null +++ b/lib/docs/pear.unl.edu/UNL_DWT/examples/basic/Template_style1.php @@ -0,0 +1,28 @@ +<?php +/** + * Template Definition for template_style1.dwt + */ +require_once 'UNL/DWT.php'; + +class UNL_DWT_Template_style1 extends UNL_DWT +{ + ###START_AUTOCODE + /* the code below is auto generated do not remove the above tag */ + + public $__template = 'Template_style1.tpl'; // template name + public $doctitle = "<title>Sample Template Style 1</title>"; // string() + public $head = ""; // string() + public $header = "Header"; // string() + public $leftnav = "<p> Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut. </p>"; // string() + public $content = "<h2>Subheading</h2> <p> Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. </p> <p> Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. </p>"; // string() + public $footer = "Footer"; // string() + + public $__params = array ( +); + + /* Static get */ + function staticGet($k,$v=NULL) { return UNL_DWT::staticGet('UNL_DWT_Template_style1',$k,$v); } + + /* the code above is auto generated do not remove the tag below */ + ###END_AUTOCODE +} diff --git a/lib/docs/pear.unl.edu/UNL_DWT/examples/basic/Template_style1.tpl b/lib/docs/pear.unl.edu/UNL_DWT/examples/basic/Template_style1.tpl new file mode 100644 index 0000000000000000000000000000000000000000..bd63d0408c2fdc1289ca180fdf4a09a0b64c069b --- /dev/null +++ b/lib/docs/pear.unl.edu/UNL_DWT/examples/basic/Template_style1.tpl @@ -0,0 +1,86 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/template_style1.dwt" codeOutsideHTMLIsLocked="false" --> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> +<!-- InstanceBeginEditable name="doctitle" --> +<title>Sample Template Style 1</title> +<!-- InstanceEndEditable --> +<style type="text/css"> +#container +{ +width: 90%; +margin: 10px auto; +background-color: #fff; +color: #333; +border: 1px solid gray; +line-height: 130%; +} +#top +{ +padding: .5em; +background-color: #ddd; +border-bottom: 1px solid gray; +} +#top h1 +{ +padding: 0; +margin: 0; +} +#leftnav +{ +float: left; +width: 160px; +margin: 0; +padding: 1em; +} +#content +{ +margin-left: 200px; +border-left: 1px solid gray; +padding: 1em; +max-width: 36em; +} +#footer +{ +clear: both; +margin: 0; +padding: .5em; +color: #333; +background-color: #ddd; +border-top: 1px solid gray; +} +#leftnav p { margin: 0 0 1em 0; } +#content h2 { margin: 0 0 .5em 0; } +</style> +<!-- InstanceBeginEditable name="head" --> +<!-- InstanceEndEditable --> +</head> +<body> +<div id="container"> +<div id="top"> +<h1> +<!-- InstanceBeginEditable name="header" --> +Header +<!-- InstanceEndEditable --> +</h1> +</div> +<div id="leftnav"> +<!-- InstanceBeginEditable name="leftnav" --> + <p> Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut. </p> +<!-- InstanceEndEditable --> +</div> +<div id="content"> +<!-- InstanceBeginEditable name="content" --> + <h2>Subheading</h2> + <p> Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. </p> + <p> Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. </p> +<!-- InstanceEndEditable --> +</div> +<div id="footer"> +<!-- InstanceBeginEditable name="footer" --> +Footer +<!-- InstanceEndEditable --> +</div> +</div> +</body> +</html> diff --git a/lib/docs/pear.unl.edu/UNL_DWT/examples/basic/example.ini b/lib/docs/pear.unl.edu/UNL_DWT/examples/basic/example.ini new file mode 100644 index 0000000000000000000000000000000000000000..7c1426b6362ac73fbf4fd9e084c6022bd378308d --- /dev/null +++ b/lib/docs/pear.unl.edu/UNL_DWT/examples/basic/example.ini @@ -0,0 +1,5 @@ +[UNL_DWT] +dwt_location = @DOC_DIR@/UNL_DWT/docs/examples/basic +class_location = @DOC_DIR@/UNL_DWT/docs/examples/basic +tpl_location = @DOC_DIR@/UNL_DWT/docs/examples/basic +class_prefix = UNL_DWT_ diff --git a/lib/docs/pear.unl.edu/UNL_DWT/examples/basic/example.test.ini b/lib/docs/pear.unl.edu/UNL_DWT/examples/basic/example.test.ini new file mode 100644 index 0000000000000000000000000000000000000000..6f24a0b77b8e13197c9649c42aa2139a647de3fc --- /dev/null +++ b/lib/docs/pear.unl.edu/UNL_DWT/examples/basic/example.test.ini @@ -0,0 +1,5 @@ +[UNL_DWT] +dwt_location = ./ +class_location = ./ +tpl_location = ./ +class_prefix = UNL_DWT_ \ No newline at end of file diff --git a/lib/docs/pear.unl.edu/UNL_DWT/examples/basic/example_style1.php b/lib/docs/pear.unl.edu/UNL_DWT/examples/basic/example_style1.php new file mode 100644 index 0000000000000000000000000000000000000000..30f50bc36d93c19b73962d666abeab6c78b0e1dc --- /dev/null +++ b/lib/docs/pear.unl.edu/UNL_DWT/examples/basic/example_style1.php @@ -0,0 +1,30 @@ +<?php +/** + * This example uses the DWT object generated by: '@PHP_BIN@ @PHP_DIR@/UNL/DWT/createTemplates.php @DOC_DIR@/UNL_DWT/docs/examples/basic/example.ini' + * + */ +ini_set('display_errors',true); +error_reporting(E_ALL|E_STRICT); + +set_include_path(dirname(__DIR__).'/../../src'); + +require_once 'UNL/DWT.php'; +if ('@DATA_DIR@' == '@'.'DATA_DIR@') { + $configfile = 'example.test.ini'; +} else { + $configfile = '@DOC_DIR@/UNL_DWT/docs/examples/example.ini'; +} +$config = parse_ini_file($configfile, true); +foreach($config as $class=>$values) { + UNL_DWT::$options = $values; +} +$page = UNL_DWT::factory('Template_style1'); +$page->header = "Example Using Template Style 1"; +$page->leftnav = "<ul><li><a href='http://pear.unl.edu/'>UNL PEAR Channel</a></li></ul>"; +$page->content = "<p>This example demonstrates the usefulness of the DWT object generator for Dreamweaver Templates.</p>"; +$page->content .= "<p>Included with the DWT package is a Dreamweaver template with 4 editable regions [template_style1.dwt]. This page is rendered using the DWT class created from that template.</p>"; +$page->content .= "<p>To create classes for your Templates, create a .ini file with the location of your Dreamweaver templates (dwt's) and then run the createTemplates.php script to generate objects for each of your template files.</p>"; +$page->content .= "<p>Here is the ini file used to create the Template_style1:<pre><code>".file_get_contents($configfile)."</code></pre></p>"; +$page->content .= "<p>And the command used to create the template classes:<pre><code>@PHP_BIN@ @PHP_DIR@/UNL/DWT/createTemplates.php @DOC_DIR@/UNL_DWT/docs/examples/example.ini</code></pre></p>"; +$page->footer = "<a href='mailto:brett.bieber@gmail.com'>Brett Bieber</a>"; +echo $page->toHtml(); diff --git a/lib/docs/pear.unl.edu/UNL_DWT/examples/basic/template_style1.dwt b/lib/docs/pear.unl.edu/UNL_DWT/examples/basic/template_style1.dwt new file mode 100644 index 0000000000000000000000000000000000000000..f22ce6abf12031903536a83ed335547cd9044b28 --- /dev/null +++ b/lib/docs/pear.unl.edu/UNL_DWT/examples/basic/template_style1.dwt @@ -0,0 +1,80 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> +<!-- TemplateBeginEditable name="doctitle" --> +<title>Sample Template Style 1</title> +<!-- TemplateEndEditable --> +<style type="text/css"> +#container +{ +width: 90%; +margin: 10px auto; +background-color: #fff; +color: #333; +border: 1px solid gray; +line-height: 130%; +} + +#top +{ +padding: .5em; +background-color: #ddd; +border-bottom: 1px solid gray; +} + +#top h1 +{ +padding: 0; +margin: 0; +} + +#leftnav +{ +float: left; +width: 160px; +margin: 0; +padding: 1em; +} + +#content +{ +margin-left: 200px; +border-left: 1px solid gray; +padding: 1em; +max-width: 36em; +} + +#footer +{ +clear: both; +margin: 0; +padding: .5em; +color: #333; +background-color: #ddd; +border-top: 1px solid gray; +} + +#leftnav p { margin: 0 0 1em 0; } +#content h2 { margin: 0 0 .5em 0; } +</style> +<!-- TemplateBeginEditable name="head" --><!-- TemplateEndEditable --> +</head> + +<body> +<div id="container"> +<div id="top"> +<h1><!-- TemplateBeginEditable name="header" -->Header<!-- TemplateEndEditable --></h1> +</div> +<div id="leftnav"><!-- TemplateBeginEditable name="leftnav" --> + <p> Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut. </p> +<!-- TemplateEndEditable --></div> +<div id="content"><!-- TemplateBeginEditable name="content" --> + <h2>Subheading</h2> + <p> Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. </p> + <p> Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. </p> +<!-- TemplateEndEditable --></div> +<div id="footer"><!-- TemplateBeginEditable name="footer" -->Footer<!-- TemplateEndEditable --></div> +</div> +</body> +</html> diff --git a/lib/docs/pear.unl.edu/UNL_DWT/examples/scanner_example.php b/lib/docs/pear.unl.edu/UNL_DWT/examples/scanner_example.php index 52d9629a66e5a7c0988f73631b5920833e8e833f..00184321118c0efda8e8b714c02ca742b04efb3c 100644 --- a/lib/docs/pear.unl.edu/UNL_DWT/examples/scanner_example.php +++ b/lib/docs/pear.unl.edu/UNL_DWT/examples/scanner_example.php @@ -1,14 +1,19 @@ <?php set_include_path(dirname(__DIR__).'/../src'); +error_reporting(E_ALL); +ini_set('display_errors', true); require_once 'UNL/DWT/Scanner.php'; -$file = file_get_contents(dirname(__FILE__).'/'.'template_style1.dwt'); +$file = file_get_contents(dirname(__FILE__).'/basic/'.'template_style1.dwt'); $scanned = new UNL_DWT_Scanner($file); -echo $scanned->leftnav; -echo $scanned->content; +// Modify the scanned content +$scanned->content .= '<h3>Scanned content from the left nav:</h3>'; -?> \ No newline at end of file +// Also, access the content that was scanned in +$scanned->content .= '<pre>'.$scanned->leftnav.'</pre>'; + +echo $scanned; diff --git a/lib/docs/pear.unl.edu/UNL_Templates/examples/example1.php b/lib/docs/pear.unl.edu/UNL_Templates/examples/example1.php index 94fa01578df1883635adf95f86e4b193973e7387..be1a633f401c33e971949a60114d1e7a8ef81fbe 100644 --- a/lib/docs/pear.unl.edu/UNL_Templates/examples/example1.php +++ b/lib/docs/pear.unl.edu/UNL_Templates/examples/example1.php @@ -7,11 +7,12 @@ */ ini_set('display_errors', true); error_reporting(E_ALL); -set_include_path(dirname(dirname(__DIR__)).'/src'.PATH_SEPARATOR.dirname(dirname(__DIR__)).'/vendor/php'); +set_include_path(dirname(dirname(__DIR__)).'/src'.PATH_SEPARATOR.dirname(dirname(__DIR__)).'/../UNL_DWT/src'); require_once 'UNL/Templates.php'; // Optionally set the version you'd like to use -UNL_Templates::$options['version'] = 3.1; +UNL_Templates::$options['version'] = 4; +UNL_Templates::$options['templatedependentspath'] = 'https://raw.github.com/unl/wdntemplates/4.0'; $page = UNL_Templates::factory('Fixed', array('sharedcodepath' => 'sharedcode')); $page->addScript('test.js'); @@ -25,4 +26,4 @@ $page->navlinks = '<ul><li><a href="#">Hello world!</a></li></ul>'; $page->leftRandomPromo = ''; $page->maincontentarea .= highlight_file(__FILE__, true); $page->loadSharedcodeFiles(); -echo $page; +echo $page->toHTML(); diff --git a/lib/downloads/UNL_DWT-0.9.0.phar b/lib/downloads/UNL_DWT-0.9.0.phar new file mode 100644 index 0000000000000000000000000000000000000000..83cc3ffc2464f8d67ba54421cc71fe157320c8b7 --- /dev/null +++ b/lib/downloads/UNL_DWT-0.9.0.phar @@ -0,0 +1,239 @@ +<!DOCTYPE html> +<!--[if IEMobile 7 ]><html class="ie iem7"><![endif]--> +<!--[if lt IE 7 ]><html class="ie ie6" lang="en"><![endif]--> +<!--[if IE 7 ]><html class="ie ie7" lang="en"><![endif]--> +<!--[if IE 8 ]><html class="ie ie8" lang="en"><![endif]--> +<!--[if (gte IE 9)|(gt IEMobile 7) ]><html class="ie" lang="en"><![endif]--> +<!--[if !(IEMobile) | !(IE)]><!--><html lang="en"><!-- InstanceBegin template="/Templates/fixed.dwt" codeOutsideHTMLIsLocked="false" --><!--<![endif]--> +<head> +<meta http-equiv="content-type" content="text/html;charset=UTF-8" /> +<meta name="author" content="University of Nebraska-Lincoln | Web Developer Network" /> +<meta name="viewport" content="initial-scale=1.0, width=device-width" /> + +<!-- For Microsoft --> +<!--[if IE]> +<meta http-equiv="cleartype" content="on"> +<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> +<![endif]--> + +<!-- For iPhone 4 --> +<link rel="apple-touch-icon-precomposed" sizes="114x114" href="/wdn/templates_3.1/images/h-apple-touch-icon-precomposed.png"> +<!-- For iPad 1--> +<link rel="apple-touch-icon-precomposed" sizes="72x72" href="/wdn/templates_3.1/images/m-apple-touch-icon-precomposed.png"> +<!-- For iPhone 3G, iPod Touch and Android --> +<link rel="apple-touch-icon-precomposed" href="/wdn/templates_3.1/images/l-apple-touch-icon-precomposed.png"> +<!-- For everything else --> +<link rel="shortcut icon" href="/wdn/templates_3.1/images/favicon.ico" /> +<!-- + 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: fixed.dwt | ea2608181e2b6604db76106fd982b39218ddcb8b | Fri Mar 9 12:20:43 2012 -0600 | Kevin Abel $ +--> +<!-- Load our base CSS file --> + <link rel="stylesheet" type="text/css" media="all" href="http://www.unl.edu/wdn/templates_3.1/css/compressed/base.css"> +<!-- Then load the various media queries (use 'only' to force non CSS3 compliant browser to ignore) --> +<!-- Since this file is media query imports, IE 7 & 8 will not parse it --> +<!--[if gt IE 8]><!--> + <link rel="stylesheet" type="text/css" media="all and (min-width: 320px)" href="http://www.unl.edu/wdn/templates_3.1/css/variations/media_queries.css"> +<!--<![endif]--> + +<!-- Load the template JS file --> + <script type="text/javascript" src="http://www.unl.edu/wdn/templates_3.1/scripts/compressed/all.js?dep=3.1.19" id="wdn_dependents"></script> + +<!-- For old IE, bring in all the styles w/o media queries --> +<!--[if lt IE 9]> + <link rel="stylesheet" type="text/css" media="all" href="http://www.unl.edu/wdn/templates_3.1/css/compressed/combined_widths.css" /> + <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> +<![endif]--> + +<!-- For all IE versions, bring in the tweaks --> +<!--[if IE]> + <link rel="stylesheet" type="text/css" media="all" href="http://www.unl.edu/wdn/templates_3.1/css/variations/ie.css" /> +<![endif]--> + +<!-- Load the print styles --> + <link rel="stylesheet" type="text/css" media="print" href="http://www.unl.edu/wdn/templates_3.1/css/variations/print.css" /> +<!-- InstanceBeginEditable name="doctitle" --> +<title>{page_title}</title> +<!-- InstanceEndEditable --><!-- InstanceBeginEditable name="head" --> +<link rel="alternate" href="/?view=latest&format=rss" title="Latest Releases" type="application/atom+xml" /> +<!-- Place optional header elements here --> +<link rel="stylesheet" href="/css/all.css" /> +<!-- InstanceEndEditable --> +<!-- InstanceParam name="class" type="text" value="fixed" --> +</head> +<body class="fixed" data-version="3.1"> + <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–Lincoln</span> + <span id="wdn_site_title"><!-- InstanceBeginEditable name="titlegraphic" --> + UNL PHP Extension and Application Repository <!-- InstanceEndEditable --></span> + <div id="wdn_identity_management" role="navigation" aria-labelledby="wdn_idm_username"> + <a class="wdn_idm_user_profile" id="wdn_idm_login" href="https://login.unl.edu/cas/login" title="Log in to UNL"> + <img id="wdn_idm_userpic" src="/wdn/templates_3.1/images/wdn_idm_defaulttopbar.gif" alt="User Profile Photo"> + <span id="wdn_idm_username">UNL Login</span> + </a> + <h3 class="wdn_list_descriptor hidden">Account Links</h3> + <ul id="wdn_idm_user_options"> + <li id="wdn_idm_logout"> + <a title="Logout" href="https://login.unl.edu/cas/logout?url=http%3A//www.unl.edu/">Logout</a> + </li> + </ul> +</div> <div id="wdn_search"> + <form id="wdn_search_form" action="http://www.google.com/u/UNL1?sa=Google+Search&q=" method="get" role="search"> + <fieldset> + <legend class="hidden">Search</legend> + <label for="q">Search this site, all UNL or for a person</label> + <input accesskey="f" id="q" name="q" type="search" placeholder="Search this site, all UNL or for a person" /> + <input class="search" type="submit" value="Go" name="submit" /> + </fieldset> + </form> +</div> +<h3 class="wdn_list_descriptor hidden">UNL Tools</h3> +<menu id="wdn_tool_links"> + <li><a href="http://www1.unl.edu/feeds/" class="feeds tooltip" data-title="RSS Feeds: View and Subscribe to News Feeds">Feeds</a></li> + <li><a href="http://forecast.weather.gov/MapClick.php?CityName=Lincoln&state=NE&site=OAX" class="weather tooltip" data-title="Weather: Local Forecast and Radar">Weather</a></li> + <li><a href="http://events.unl.edu/" class="events tooltip" data-title="UNL Events: Calendar of Upcoming Events">Events</a></li> + <li><a href="http://directory.unl.edu/" class="directory tooltip" data-title="UNL Directory: Search for Faculty, Staff, Students and Departments">Directory</a></li> +</menu> +<span class="corner-fix-top-right"></span> +<span class="corner-fix-bottom-left"></span> + </header> + <div id="wdn_navigation_bar" role="navigation"> + <nav id="breadcrumbs"> + <!-- InstanceBeginEditable name="breadcrumbs" --> + <ul> + <li><a href="http://www.unl.edu/" title="University of Nebraska–Lincoln">UNL</a></li> + <li>pear.unl.edu</li> + </ul> + <!-- TemplateEndEditable --> + </nav> + <div id="wdn_navigation_wrapper"> + <nav id="navigation" role="navigation"> + <h3 class="wdn_list_descriptor hidden">Navigation</h3> + <!-- InstanceBeginEditable name="navlinks" --> + <ul class="navigation"> + <li><a href="/">Home</a></li> + <li><a href="/?view=packages">Packages</a></li> + <li><a href="/?view=categories">Categories</a></li> + <li><a href="/docs/">Documentation</a></li> + <li><a href="/?view=support">Support</a></li> + </ul> + <!-- InstanceEndEditable --> + </nav> + </div> + </div> + <div id="wdn_content_wrapper" role="main"> + <div id="pagetitle"> + <!-- InstanceBeginEditable name="pagetitle" --> + <!-- InstanceEndEditable --> + </div> + <div id="maincontent"> + <!--THIS IS THE MAIN CONTENT AREA; WDN: see glossary item 'main content area' --> + <!-- InstanceBeginEditable name="maincontentarea" --> + <h1>WHOAH Nelly.</h1> +<p>That view doesn't exist!</p> + <!-- InstanceEndEditable --> + <div class="clear"></div> + <noscript> + <p> + Your browser does not appear to support JavaScript, or you have turned JavaScript off. You may use unl.edu without enabling JavaScript, but certain functions may not be available. + </p> +</noscript> <!--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"> + <h3><a href="http://www1.unl.edu/comments/">Your Feedback</a></h3> +<form action="http://www1.unl.edu/comments/" method="post" id="wdn_feedback" title="WDN Feedback Form:4" class="rating"> + <fieldset class="rating"> + <legend>Please rate this page:</legend> + <input type="radio" id="star5" name="rating" value="5" /> + <label for="star5" title="Rocks!">5 stars</label> + <input type="radio" id="star4" name="rating" value="4" /> + <label for="star4" title="Pretty good">4 stars</label> + <input type="radio" id="star3" name="rating" value="3" /> + <label for="star3" title="Meh">3 stars</label> + <input type="radio" id="star2" name="rating" value="2" /> + <label for="star2" title="Kinda bad">2 stars</label> + <input type="radio" id="star1" name="rating" value="1" /> + <label for="star1" title="Not so hot">1 star</label> + <input type="submit" value="Submit" name="submit" /> + </fieldset> +</form> +<form action="http://www1.unl.edu/comments/" method="post" id="wdn_feedback_comments" title="WDN Feedback Form" class="comments"> + <fieldset><legend>Comments for this page</legend> + <ol> + <li class="wdn_comment_name"> + <label for="wdn_comment_name">Name (optional)</label> + <input type="text" name="name" id="wdn_comment_name" placeholder="Your Name" /> + </li> + <li class="wdn_comment_email"> + <label for="wdn_comment_email">Email (optional)</label> + <input type="text" name="email" id="wdn_comment_email" placeholder="Your Email" /> + </li> + <li><label for="wdn_comments">Comments</label> + <textarea rows="2" cols="20" name="comment" id="wdn_comments" placeholder="Your Comment"></textarea> + </li> + </ol> + <input type="submit" value="Submit" name="submit" class="wdn_comment_submit" /></fieldset> +</form> + </div> + <div class="footer_col" id="wdn_footer_related"> + <!-- InstanceBeginEditable name="leftcollinks" --> + <h3>Related Links</h3> + <ul> + <li><a href="http://wdn.unl.edu/">UNL Web Developer Network</a></li> + <li><a href="http://pear.php.net/">PEAR</a></li> + </ul> + <!-- InstanceEndEditable --></div> + <div class="footer_col" id="wdn_footer_contact"> + <!-- InstanceBeginEditable name="contactinfo" --> + <h3>Contacting Us</h3> + <p> + This PEAR channel is maintained by:<br /> + <strong>Brett Bieber<br /> + University Communications</strong><br /> + Internet and Interactive Media<br /> + bbieber2@unl.edu + </p> + <!-- InstanceEndEditable --></div> + <div class="footer_col" id="wdn_footer_share"> + <h3>Share This Page</h3> +<ul class="socialmedia"> + <li><a href="http://go.unl.edu/?url=referer" id="wdn_createGoURL" rel="nofollow">Get a G<span>o</span>URL</a></li> + <li class="outpost" id="wdn_emailthis"><a href="mailto:" title="Share this page through email" rel="nofollow">Share this page through email</a></li> + <li class="outpost" id="wdn_facebook"><a href="https://www.facebook.com/" title="Share this page on Facebook" rel="nofollow">Share this page on Facebook</a></li> + <li class="outpost" id="wdn_twitter"><a href="https://twitter.com/" title="Share this page on Twitter" rel="nofollow">Share this page on Twitter</a></li> +</ul> </div> + <!-- InstanceBeginEditable name="optionalfooter" --> + <!-- InstanceEndEditable --> + <div id="wdn_copyright"> + <div> + <!-- InstanceBeginEditable name="footercontent" --> + © 2014 University of Nebraska-Lincoln | Lincoln, NE 68588 | 402-472-7211 | <a href="http://www1.unl.edu/comments/" title="Click here to direct your comments and questions">comments?</a> + <!-- InstanceEndEditable --> + <span id="wdn_attribution"><br/>UNL web templates and quality assurance provided by the <a href="http://wdn.unl.edu/" title="UNL Web Developer Network">Web Developer Network</a> | <a href="http://www1.unl.edu/wdn/qa/" id="wdn_qa_link">QA Test</a></span> </div> + <div id="wdn_logos"> + <a href="http://www.unl.edu/" title="UNL Home" id="unl_wordmark">UNL Home</a> + <a href="http://www.cic.net/home" title="CIC Website" id="cic_wordmark">CIC Website</a> + <a href="http://www.bigten.org/" title="Big Ten Website" id="b1g_wordmark">Big Ten Website</a> +</div> </div> + </footer> + </div> +</body> +<!-- InstanceEnd --></html> diff --git a/lib/downloads/UNL_DWT-0.9.0.tgz b/lib/downloads/UNL_DWT-0.9.0.tgz new file mode 100644 index 0000000000000000000000000000000000000000..b772b63bbc347a17300565ce89c3152dccae60e4 Binary files /dev/null and b/lib/downloads/UNL_DWT-0.9.0.tgz differ diff --git a/lib/downloads/UNL_Templates-1.4.0RC3.phar b/lib/downloads/UNL_Templates-1.4.0RC3.phar new file mode 100644 index 0000000000000000000000000000000000000000..83cc3ffc2464f8d67ba54421cc71fe157320c8b7 --- /dev/null +++ b/lib/downloads/UNL_Templates-1.4.0RC3.phar @@ -0,0 +1,239 @@ +<!DOCTYPE html> +<!--[if IEMobile 7 ]><html class="ie iem7"><![endif]--> +<!--[if lt IE 7 ]><html class="ie ie6" lang="en"><![endif]--> +<!--[if IE 7 ]><html class="ie ie7" lang="en"><![endif]--> +<!--[if IE 8 ]><html class="ie ie8" lang="en"><![endif]--> +<!--[if (gte IE 9)|(gt IEMobile 7) ]><html class="ie" lang="en"><![endif]--> +<!--[if !(IEMobile) | !(IE)]><!--><html lang="en"><!-- InstanceBegin template="/Templates/fixed.dwt" codeOutsideHTMLIsLocked="false" --><!--<![endif]--> +<head> +<meta http-equiv="content-type" content="text/html;charset=UTF-8" /> +<meta name="author" content="University of Nebraska-Lincoln | Web Developer Network" /> +<meta name="viewport" content="initial-scale=1.0, width=device-width" /> + +<!-- For Microsoft --> +<!--[if IE]> +<meta http-equiv="cleartype" content="on"> +<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> +<![endif]--> + +<!-- For iPhone 4 --> +<link rel="apple-touch-icon-precomposed" sizes="114x114" href="/wdn/templates_3.1/images/h-apple-touch-icon-precomposed.png"> +<!-- For iPad 1--> +<link rel="apple-touch-icon-precomposed" sizes="72x72" href="/wdn/templates_3.1/images/m-apple-touch-icon-precomposed.png"> +<!-- For iPhone 3G, iPod Touch and Android --> +<link rel="apple-touch-icon-precomposed" href="/wdn/templates_3.1/images/l-apple-touch-icon-precomposed.png"> +<!-- For everything else --> +<link rel="shortcut icon" href="/wdn/templates_3.1/images/favicon.ico" /> +<!-- + 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: fixed.dwt | ea2608181e2b6604db76106fd982b39218ddcb8b | Fri Mar 9 12:20:43 2012 -0600 | Kevin Abel $ +--> +<!-- Load our base CSS file --> + <link rel="stylesheet" type="text/css" media="all" href="http://www.unl.edu/wdn/templates_3.1/css/compressed/base.css"> +<!-- Then load the various media queries (use 'only' to force non CSS3 compliant browser to ignore) --> +<!-- Since this file is media query imports, IE 7 & 8 will not parse it --> +<!--[if gt IE 8]><!--> + <link rel="stylesheet" type="text/css" media="all and (min-width: 320px)" href="http://www.unl.edu/wdn/templates_3.1/css/variations/media_queries.css"> +<!--<![endif]--> + +<!-- Load the template JS file --> + <script type="text/javascript" src="http://www.unl.edu/wdn/templates_3.1/scripts/compressed/all.js?dep=3.1.19" id="wdn_dependents"></script> + +<!-- For old IE, bring in all the styles w/o media queries --> +<!--[if lt IE 9]> + <link rel="stylesheet" type="text/css" media="all" href="http://www.unl.edu/wdn/templates_3.1/css/compressed/combined_widths.css" /> + <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> +<![endif]--> + +<!-- For all IE versions, bring in the tweaks --> +<!--[if IE]> + <link rel="stylesheet" type="text/css" media="all" href="http://www.unl.edu/wdn/templates_3.1/css/variations/ie.css" /> +<![endif]--> + +<!-- Load the print styles --> + <link rel="stylesheet" type="text/css" media="print" href="http://www.unl.edu/wdn/templates_3.1/css/variations/print.css" /> +<!-- InstanceBeginEditable name="doctitle" --> +<title>{page_title}</title> +<!-- InstanceEndEditable --><!-- InstanceBeginEditable name="head" --> +<link rel="alternate" href="/?view=latest&format=rss" title="Latest Releases" type="application/atom+xml" /> +<!-- Place optional header elements here --> +<link rel="stylesheet" href="/css/all.css" /> +<!-- InstanceEndEditable --> +<!-- InstanceParam name="class" type="text" value="fixed" --> +</head> +<body class="fixed" data-version="3.1"> + <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–Lincoln</span> + <span id="wdn_site_title"><!-- InstanceBeginEditable name="titlegraphic" --> + UNL PHP Extension and Application Repository <!-- InstanceEndEditable --></span> + <div id="wdn_identity_management" role="navigation" aria-labelledby="wdn_idm_username"> + <a class="wdn_idm_user_profile" id="wdn_idm_login" href="https://login.unl.edu/cas/login" title="Log in to UNL"> + <img id="wdn_idm_userpic" src="/wdn/templates_3.1/images/wdn_idm_defaulttopbar.gif" alt="User Profile Photo"> + <span id="wdn_idm_username">UNL Login</span> + </a> + <h3 class="wdn_list_descriptor hidden">Account Links</h3> + <ul id="wdn_idm_user_options"> + <li id="wdn_idm_logout"> + <a title="Logout" href="https://login.unl.edu/cas/logout?url=http%3A//www.unl.edu/">Logout</a> + </li> + </ul> +</div> <div id="wdn_search"> + <form id="wdn_search_form" action="http://www.google.com/u/UNL1?sa=Google+Search&q=" method="get" role="search"> + <fieldset> + <legend class="hidden">Search</legend> + <label for="q">Search this site, all UNL or for a person</label> + <input accesskey="f" id="q" name="q" type="search" placeholder="Search this site, all UNL or for a person" /> + <input class="search" type="submit" value="Go" name="submit" /> + </fieldset> + </form> +</div> +<h3 class="wdn_list_descriptor hidden">UNL Tools</h3> +<menu id="wdn_tool_links"> + <li><a href="http://www1.unl.edu/feeds/" class="feeds tooltip" data-title="RSS Feeds: View and Subscribe to News Feeds">Feeds</a></li> + <li><a href="http://forecast.weather.gov/MapClick.php?CityName=Lincoln&state=NE&site=OAX" class="weather tooltip" data-title="Weather: Local Forecast and Radar">Weather</a></li> + <li><a href="http://events.unl.edu/" class="events tooltip" data-title="UNL Events: Calendar of Upcoming Events">Events</a></li> + <li><a href="http://directory.unl.edu/" class="directory tooltip" data-title="UNL Directory: Search for Faculty, Staff, Students and Departments">Directory</a></li> +</menu> +<span class="corner-fix-top-right"></span> +<span class="corner-fix-bottom-left"></span> + </header> + <div id="wdn_navigation_bar" role="navigation"> + <nav id="breadcrumbs"> + <!-- InstanceBeginEditable name="breadcrumbs" --> + <ul> + <li><a href="http://www.unl.edu/" title="University of Nebraska–Lincoln">UNL</a></li> + <li>pear.unl.edu</li> + </ul> + <!-- TemplateEndEditable --> + </nav> + <div id="wdn_navigation_wrapper"> + <nav id="navigation" role="navigation"> + <h3 class="wdn_list_descriptor hidden">Navigation</h3> + <!-- InstanceBeginEditable name="navlinks" --> + <ul class="navigation"> + <li><a href="/">Home</a></li> + <li><a href="/?view=packages">Packages</a></li> + <li><a href="/?view=categories">Categories</a></li> + <li><a href="/docs/">Documentation</a></li> + <li><a href="/?view=support">Support</a></li> + </ul> + <!-- InstanceEndEditable --> + </nav> + </div> + </div> + <div id="wdn_content_wrapper" role="main"> + <div id="pagetitle"> + <!-- InstanceBeginEditable name="pagetitle" --> + <!-- InstanceEndEditable --> + </div> + <div id="maincontent"> + <!--THIS IS THE MAIN CONTENT AREA; WDN: see glossary item 'main content area' --> + <!-- InstanceBeginEditable name="maincontentarea" --> + <h1>WHOAH Nelly.</h1> +<p>That view doesn't exist!</p> + <!-- InstanceEndEditable --> + <div class="clear"></div> + <noscript> + <p> + Your browser does not appear to support JavaScript, or you have turned JavaScript off. You may use unl.edu without enabling JavaScript, but certain functions may not be available. + </p> +</noscript> <!--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"> + <h3><a href="http://www1.unl.edu/comments/">Your Feedback</a></h3> +<form action="http://www1.unl.edu/comments/" method="post" id="wdn_feedback" title="WDN Feedback Form:4" class="rating"> + <fieldset class="rating"> + <legend>Please rate this page:</legend> + <input type="radio" id="star5" name="rating" value="5" /> + <label for="star5" title="Rocks!">5 stars</label> + <input type="radio" id="star4" name="rating" value="4" /> + <label for="star4" title="Pretty good">4 stars</label> + <input type="radio" id="star3" name="rating" value="3" /> + <label for="star3" title="Meh">3 stars</label> + <input type="radio" id="star2" name="rating" value="2" /> + <label for="star2" title="Kinda bad">2 stars</label> + <input type="radio" id="star1" name="rating" value="1" /> + <label for="star1" title="Not so hot">1 star</label> + <input type="submit" value="Submit" name="submit" /> + </fieldset> +</form> +<form action="http://www1.unl.edu/comments/" method="post" id="wdn_feedback_comments" title="WDN Feedback Form" class="comments"> + <fieldset><legend>Comments for this page</legend> + <ol> + <li class="wdn_comment_name"> + <label for="wdn_comment_name">Name (optional)</label> + <input type="text" name="name" id="wdn_comment_name" placeholder="Your Name" /> + </li> + <li class="wdn_comment_email"> + <label for="wdn_comment_email">Email (optional)</label> + <input type="text" name="email" id="wdn_comment_email" placeholder="Your Email" /> + </li> + <li><label for="wdn_comments">Comments</label> + <textarea rows="2" cols="20" name="comment" id="wdn_comments" placeholder="Your Comment"></textarea> + </li> + </ol> + <input type="submit" value="Submit" name="submit" class="wdn_comment_submit" /></fieldset> +</form> + </div> + <div class="footer_col" id="wdn_footer_related"> + <!-- InstanceBeginEditable name="leftcollinks" --> + <h3>Related Links</h3> + <ul> + <li><a href="http://wdn.unl.edu/">UNL Web Developer Network</a></li> + <li><a href="http://pear.php.net/">PEAR</a></li> + </ul> + <!-- InstanceEndEditable --></div> + <div class="footer_col" id="wdn_footer_contact"> + <!-- InstanceBeginEditable name="contactinfo" --> + <h3>Contacting Us</h3> + <p> + This PEAR channel is maintained by:<br /> + <strong>Brett Bieber<br /> + University Communications</strong><br /> + Internet and Interactive Media<br /> + bbieber2@unl.edu + </p> + <!-- InstanceEndEditable --></div> + <div class="footer_col" id="wdn_footer_share"> + <h3>Share This Page</h3> +<ul class="socialmedia"> + <li><a href="http://go.unl.edu/?url=referer" id="wdn_createGoURL" rel="nofollow">Get a G<span>o</span>URL</a></li> + <li class="outpost" id="wdn_emailthis"><a href="mailto:" title="Share this page through email" rel="nofollow">Share this page through email</a></li> + <li class="outpost" id="wdn_facebook"><a href="https://www.facebook.com/" title="Share this page on Facebook" rel="nofollow">Share this page on Facebook</a></li> + <li class="outpost" id="wdn_twitter"><a href="https://twitter.com/" title="Share this page on Twitter" rel="nofollow">Share this page on Twitter</a></li> +</ul> </div> + <!-- InstanceBeginEditable name="optionalfooter" --> + <!-- InstanceEndEditable --> + <div id="wdn_copyright"> + <div> + <!-- InstanceBeginEditable name="footercontent" --> + © 2014 University of Nebraska-Lincoln | Lincoln, NE 68588 | 402-472-7211 | <a href="http://www1.unl.edu/comments/" title="Click here to direct your comments and questions">comments?</a> + <!-- InstanceEndEditable --> + <span id="wdn_attribution"><br/>UNL web templates and quality assurance provided by the <a href="http://wdn.unl.edu/" title="UNL Web Developer Network">Web Developer Network</a> | <a href="http://www1.unl.edu/wdn/qa/" id="wdn_qa_link">QA Test</a></span> </div> + <div id="wdn_logos"> + <a href="http://www.unl.edu/" title="UNL Home" id="unl_wordmark">UNL Home</a> + <a href="http://www.cic.net/home" title="CIC Website" id="cic_wordmark">CIC Website</a> + <a href="http://www.bigten.org/" title="Big Ten Website" id="b1g_wordmark">Big Ten Website</a> +</div> </div> + </footer> + </div> +</body> +<!-- InstanceEnd --></html> diff --git a/lib/downloads/UNL_Templates-1.4.0RC3.tgz b/lib/downloads/UNL_Templates-1.4.0RC3.tgz new file mode 100644 index 0000000000000000000000000000000000000000..23a82f185e1687fd012b1285d63a4290f7f6e67d Binary files /dev/null and b/lib/downloads/UNL_Templates-1.4.0RC3.tgz differ diff --git a/lib/php/UNL/DWT.php b/lib/php/UNL/DWT.php index 43aac0a311532abae9bb8f3e81cd18d4ea71e70a..696e79ad1244dde3c1bfcf2845b88575a22195c4 100644 --- a/lib/php/UNL/DWT.php +++ b/lib/php/UNL/DWT.php @@ -1,28 +1,28 @@ <?php /** - * This package is intended to create PHP Class files (Objects) from + * This package is intended to create PHP Class files (Objects) from * Dreamweaver template (.dwt) files. It allows designers to create a * standalone Dreamweaver template for the website design, and developers * to use that design in php pages without interference. * - * Similar to the way DB_DataObject works, the DWT package uses a - * Generator to scan a .dwt file for editable regions and creates an + * Similar to the way DB_DataObject works, the DWT package uses a + * Generator to scan a .dwt file for editable regions and creates an * appropriately named class for that .dwt file with member variables for * each region. * - * Once the objects have been generated, you can render a html page from + * Once the objects have been generated, you can render a html page from * the template. - * + * * $page = new UNL_DWT::factory('Template_style1'); * $page->pagetitle = "Contact Information"; * $page->maincontent = "Contact us by telephone at 111-222-3333."; * echo $page->toHtml(); * - * Parts of this package are modeled on (borrowed from) the PEAR package + * Parts of this package are modeled on (borrowed from) the PEAR package * DB_DataObject. - * + * * PHP version 5 - * + * * @category Templates * @package UNL_DWT * @author Brett Bieber <brett.bieber@gmail.com> @@ -34,7 +34,7 @@ /** * Base class which understands Dreamweaver Templates. - * + * * @category Templates * @package UNL_DWT * @author Brett Bieber <brett.bieber@gmail.com> @@ -45,9 +45,18 @@ */ class UNL_DWT { - + const TEMPLATE_TOKEN = 'Template'; + const INSTANCE_TOKEN = 'Instance'; + + const REGION_BEGIN_TOKEN = '<!-- %sBeginEditable name="%s" -->'; + const REGION_END_TOKEN = '<!-- %sEndEditable -->'; + + const PARAM_DEF_TOKEN = '<!-- %sParam name="%s" type="%s" value="%s" -->'; + const PARAM_REPLACE_TOKEN = '@@(%s)@@'; + const PARAM_REPLACE_TOKEN_ALT = '@@(_document[\'%s\'])@@'; + public $__template; - + /** * Run-time configuration options * @@ -57,125 +66,178 @@ class UNL_DWT static public $options = array( 'debug' => 0, ); - + /** - * Constructor + * Returns a string that contains the template file. + * + * @return string */ - function __construct() + public function getTemplateFile() { - + if (!isset($this->__template) || empty(self::$options['tpl_location'])) { + return ''; + } + + return file_get_contents(self::$options['tpl_location'].$this->__template); } - + /** * Returns the given DWT with all regions replaced with their assigned * content. - * + * * @return string */ public function toHtml() { - $options = &UNL_DWT::$options; - if (!isset($this->__template)) { - return ''; - } - /* - More Options for this method: - Extend this to automatically generate the .tpl files and cache. - Check for a cached copy of the template file. - Connect to a template server and get the latest template copy. - - Ex: $p = file_get_contents("http://pear.unl.edu/UNL/Templates/server.php?template=".$this->__template); - */ - $p = file_get_contents($options['tpl_location'].$this->__template); - + $p = $this->getTemplateFile(); $regions = get_object_vars($this); - return $this->replaceRegions($p, $regions); + + unset($regions['__template']); + + $params = array(); + if (isset($regions['__params'])) { + $params = $regions['__params']; + unset($regions['__params']); + } + + $p = $this->replaceRegions($p, $regions); + $p = $this->replaceParams($p, $params); + + return $p; } - + + public function getRegionBeginMarker($type, $region) + { + return sprintf(self::REGION_BEGIN_TOKEN, $type, $region); + } + + public function getRegionEndMarker($type) + { + return sprintf(self::REGION_END_TOKEN, $type); + } + + public function getParamDefMarker($type, $name, $paramType, $value) + { + return sprintf(self::PARAM_DEF_TOKEN, $type, $name, $paramType, $value); + } + + public function getParamReplacePattern($name) + { + return '/' . sprintf(self::PARAM_DEF_TOKEN, '(' . self::TEMPLATE_TOKEN . '|' . self::INSTANCE_TOKEN . ')', + $name, '([^"]*)', '[^"]*') . '/'; + } + + public function getParamNeedle($name) + { + return array( + sprintf(self::PARAM_REPLACE_TOKEN, $name), + sprintf(self::PARAM_REPLACE_TOKEN_ALT, $name) + ); + } + /** - * Replaces region tags within a template file wth their contents. - * - * @param string $p Page with DW Region tags. - * @param array $regions Associative array with content to replace. - * - * @return string page with replaced regions - */ + * Replaces region tags within a template file wth their contents. + * + * @param string $p Page with DW Region tags. + * @param array $regions Associative array with content to replace. + * + * @return string page with replaced regions + */ function replaceRegions($p, $regions) { - UNL_DWT::debug('Replacing regions.', 'replaceRegions', 5); - foreach ($regions as $region=>$value) { + self::debug('Replacing regions.', 'replaceRegions', 5); + + foreach ($regions as $region => $value) { /* Replace the region with the replacement text */ - if (strpos($p, "<!--"." TemplateBeginEditable name=\"{$region}\" -->")) { - $p = str_replace(UNL_DWT_between("<!--"." TemplateBeginEditable name=\"{$region}\" -->", - "<!--"." TemplateEndEditable -->", $p), - $value, $p); - UNL_DWT::debug("$region is replaced with $value.", - 'replaceRegions', 5); - } elseif (strpos($p, "<!--"." InstanceBeginEditable name=\"{$region}\" -->")) { - $p = str_replace("<!--"." InstanceBeginEditable name=\"{$region}\" -->". - UNL_DWT_between("<!--"." InstanceBeginEditable name=\"{$region}\" -->", "<!--"." InstanceEndEditable -->", $p). - "<!--"." InstanceEndEditable -->", "<!--"." InstanceBeginEditable name=\"{$region}\" -->".$value."<!--"." InstanceEndEditable -->", $p); - UNL_DWT::debug("$region is replaced with $value.", 'replaceRegions', 5); + $startMarker = $this->getRegionBeginMarker(self::TEMPLATE_TOKEN, $region); + $endMarker = $this->getRegionEndMarker(self::TEMPLATE_TOKEN); + $p = str_replace( + self::strBetween($startMarker, $endMarker, $p, true), + $startMarker . $value . $endMarker, + $p, + $count + ); + + if (!$count) { + $startMarker = $this->getRegionBeginMarker(self::INSTANCE_TOKEN, $region); + $endMarker = $this->getRegionEndMarker(self::INSTANCE_TOKEN); + $p = str_replace( + self::strBetween($startMarker, $endMarker, $p, true), + $startMarker . $value . $endMarker, + $p, + $count + ); + } + + if (!$count) { + self::debug("Counld not find region $region!", 'replaceRegions', 3); } else { - UNL_DWT::debug("Could not find region $region!", 'replaceRegions', 3); - } + self::debug("$region is replaced with $value.", 'replaceRegions', 5); + } } return $p; } - - - /** - * Create a new UNL_DWT object for the specified layout type - * - * @param string $type the template type (eg "fixed") - * @param array $coptions an associative array of option names and values - * - * @return object a new UNL_DWT. A UNL_DWT_Error object on failure. - * - * @see UNL_DWT::setOption() - */ - static function &factory($type, $coptions = false) + + function replaceParams($p, $params) { - $options =& UNL_DWT::$options; - - include_once $options['class_location']."{$type}.php"; - - if (!is_array($coptions)) { - $coptions = array(); + self::debug('Replacing params.', 'replaceRegions', 5); + + foreach ($params as $name => $config) { + $value = isset($config['value']) ? $config['value'] : ''; + $p = preg_replace($this->getParamReplacePattern($name), $this->getParamDefMarker('$1', $name, '$2', $value), + $p, 1, $count); + + if ($count) { + $p = str_replace($this->getParamNeedle($name), $value, $p); + } } - - $classname = $options['class_prefix'].$type; - + + return $p; + } + + /** + * Create a new UNL_DWT object for the specified layout type + * + * @param string $type the template type (eg "fixed") + * @param array $coptions an associative array of option names and values + * + * @return object a new UNL_DWT. A UNL_DWT_Error object on failure. + * + * @see UNL_DWT::setOption() + */ + static function &factory($type) + { + include_once self::$options['class_location']."{$type}.php"; + + $classname = self::$options['class_prefix'].$type; + if (!class_exists($classname)) { - throw new UNL_DWT_Exception("Unable to include the {$options['class_location']}{$type}.php file."); + require_once 'UNL/DWT/Exception.php'; + throw new UNL_DWT_Exception('Unable to include the ' . self::$options['class_location'] . $type . '.php file.'); } - + @$obj = new $classname; - - foreach ($coptions as $option => $value) { - $test = $obj->setOption($option, $value); - } - + return $obj; } - + /** - * Sets options. - * - * @param string $option Option to set - * @param mixed $value Value to set for this option - * - * @return void - */ - function setOption($option, $value) + * Sets options. + * + * @param string $option Option to set + * @param mixed $value Value to set for this option + * + * @return void + */ + static function setOption($option, $value) { self::$options[$option] = $value; } - + /* ----------------------- Debugger ------------------ */ /** - * Debugger. - use this in your extended classes to output debugging + * Debugger. - use this in your extended classes to output debugging * information. * * Uses UNL_DWT::debugLevel(x) to turn it on @@ -183,26 +245,26 @@ class UNL_DWT * @param string $message message to output * @param string $logtype bold at start * @param string $level output level - * + * * @return none */ static function debug($message, $logtype = 0, $level = 1) { - if (empty(self::$options['debug']) || + if (empty(self::$options['debug']) || (is_numeric(self::$options['debug']) && self::$options['debug'] < $level)) { return; } // this is a bit flaky due to php's wonderfull class passing around crap.. // but it's about as good as it gets.. $class = (isset($this) && ($this instanceof UNL_DWT)) ? get_class($this) : 'UNL_DWT'; - + if (!is_string($message)) { $message = print_r($message, true); } if (!is_numeric(self::$options['debug']) && is_callable(self::$options['debug'])) { return call_user_func(self::$options['debug'], $class, $message, $logtype, $level); } - + if (!ini_get('html_errors')) { echo "$class : $logtype : $message\n"; flush(); @@ -221,10 +283,10 @@ class UNL_DWT * eg. UNL_DWT::debugLevel(4); * * @param int $v level - * + * * @return void */ - function debugLevel($v = null) + static function debugLevel($v = null) { if ($v !== null) { $r = isset(self::$options['debug']) ? self::$options['debug'] : 0; @@ -234,41 +296,28 @@ class UNL_DWT return isset(self::$options['debug']) ? self::$options['debug'] : 0; } -} - -/** - * exception used by the UNL_DWT class - * - * @category Templates - * @package UNL_DWT - * @author Brett Bieber <brett.bieber@gmail.com> - * @copyright 2008 Regents of the University of Nebraska - * @license http://www1.unl.edu/wdn/wiki/Software_License BSD License - * @link http://pear.unl.edu/package/UNL_DWT - */ -class UNL_DWT_Exception extends Exception -{ - -} - -if (!function_exists('UNL_DWT_between')) { /** * Returns content between two strings * * @param string $start String which bounds the start * @param string $end end collecting content when you see this * @param string $p larger body of content to search - * + * * @return string */ - function UNL_DWT_between($start, $end, $p) + static function strBetween($start, $end, $p, $inclusive = false) { - if (!empty($start) && strpos($p, $start)!=false) { - $p = substr($p, strpos($p, $start)+strlen($start)); + if (!empty($start) && strpos($p, $start) !== false) { + $p = substr($p, strpos($p, $start)+($inclusive ? 0 : strlen($start))); + } else { + return ''; } - if (strpos($p, $end)!=false) { - $p = substr($p, 0, strpos($p, $end)); + + if (strpos($p, $end) !==false) { + $p = substr($p, 0, strpos($p, $end)+($inclusive ? strlen($end) : 0)); + } else { + return ''; } return $p; } -} \ No newline at end of file +} diff --git a/lib/php/UNL/DWT/Exception.php b/lib/php/UNL/DWT/Exception.php new file mode 100644 index 0000000000000000000000000000000000000000..8d20483598c40134eee71383ab6eff6375e70e2b --- /dev/null +++ b/lib/php/UNL/DWT/Exception.php @@ -0,0 +1,15 @@ +<?php +/** + * Exception used by the UNL_DWT class. + * + * @category Templates + * @package UNL_DWT + * @author Brett Bieber <brett.bieber@gmail.com> + * @copyright 2008 Regents of the University of Nebraska + * @license http://www1.unl.edu/wdn/wiki/Software_License BSD License + * @link http://pear.unl.edu/package/UNL_DWT + */ +class UNL_DWT_Exception extends Exception +{ + +} diff --git a/lib/php/UNL/DWT/Generator.php b/lib/php/UNL/DWT/Generator.php index 172ac6a885d4d1edcd16764e6fed87c530d3bb4d..81f4f5bd8f732e84d5ff3c85d6bd26da12749f9a 100644 --- a/lib/php/UNL/DWT/Generator.php +++ b/lib/php/UNL/DWT/Generator.php @@ -4,7 +4,7 @@ * Dreamweaver Template files. * * PHP version 5 - * + * * @category Templates * @package UNL_DWT * @author Brett Bieber <brett.bieber@gmail.com> @@ -15,12 +15,13 @@ */ require_once 'UNL/DWT.php'; +require_once 'UNL/DWT/Exception.php'; require_once 'UNL/DWT/Region.php'; /** * The generator parses actual .dwt Dreamweaver Template files to create object relationship * files which have member variables for editable regions within the dreamweaver templates. - * + * * @category Templates * @package UNL_DWT * @author Brett Bieber <brett.bieber@gmail.com> @@ -36,18 +37,24 @@ class UNL_DWT_Generator extends UNL_DWT * Array of template names. */ var $templates; - + /** * Current template being output */ var $template; - + /** * Assoc array of template region names. * $_regions[$template] = array(); */ var $_regions; - + + /** + * Assoc array of template params + * $_params[$template] = array(); + */ + var $_params; + /** * class being extended (can be overridden by * [UNL_DWT_Generator] extends=xxxx @@ -56,7 +63,7 @@ class UNL_DWT_Generator extends UNL_DWT * @access private */ var $_extends = 'UNL_DWT'; - + /** * line to use for require_once 'UNL/DWT.php'; * @@ -64,7 +71,7 @@ class UNL_DWT_Generator extends UNL_DWT * @access private */ var $_extendsFile = 'UNL/DWT.php'; - + /** * begins generation of template files * @@ -77,10 +84,10 @@ class UNL_DWT_Generator extends UNL_DWT $this->generateTemplates(); $this->generateClasses(); } - + /** * Generates .tpl files from .dwt - * + * * @return void */ function generateTemplates() @@ -90,14 +97,14 @@ class UNL_DWT_Generator extends UNL_DWT include_once 'System.php'; System::mkdir(array('-p', UNL_DWT::$options['dwt_location'])); } - if (!file_exists($options['tpl_location'])) { + if (!file_exists(UNL_DWT::$options['tpl_location'])) { include_once 'System.php'; System::mkdir(array('-p', UNL_DWT::$options['tpl_location'])); } foreach ($this->templates as $this->template) { $dwt = file_get_contents($dwt_location.$this->template); $dwt = $this->scanRegions($dwt); - + $sanitizedName = $this->sanitizeTemplateName($this->template); //Write out the .tpl file? if (strpos(UNL_DWT::$options['tpl_location'], '%s') !== false) { @@ -105,23 +112,23 @@ class UNL_DWT_Generator extends UNL_DWT } else { $outfilename = UNL_DWT::$options['tpl_location']."/{$sanitizedName}.tpl"; } - $this->debug("Writing {$sanitizedName} to {$outfilename}", + $this->debug("Writing {$sanitizedName} to {$outfilename}", 'generateTemplates'); $fh = fopen($outfilename, "w"); fputs($fh, $dwt); fclose($fh); } } - + /** * Create a list of dwts - * + * * @return void */ function createTemplateList() { $this->templates = array(); - + $dwt_location = UNL_DWT::$options['dwt_location']; if (is_dir($dwt_location)) { $handle = opendir($dwt_location); @@ -143,19 +150,19 @@ class UNL_DWT_Generator extends UNL_DWT throw new UNL_DWT_Exception("dwt_location is incorrect\n"); } } - + /** * Generate the classes for templates in $this->templates * * @return void */ function generateClasses() - { + { if ($extends = @UNL_DWT::$options['extends']) { $this->_extends = $extends; $this->_extendsFile = UNL_DWT::$options['extends_location']; } - + foreach ($this->templates as $this->template) { $this->classname = $this->generateClassName($this->template); if (strpos(UNL_DWT::$options['class_location'], '%s') !== false) { @@ -170,19 +177,19 @@ class UNL_DWT_Generator extends UNL_DWT $oldcontents = implode('', file($outfilename)); } $out = $this->_generateClassTemplate($oldcontents); - $this->debug("Writing {$this->classname} to {$outfilename}", + $this->debug("Writing {$this->classname} to {$outfilename}", 'generateClasses'); $fh = fopen($outfilename, "w"); fputs($fh, $out); fclose($fh); } } - + /** * Generates the class name from a filename. - * + * * @param string $filename The filename of the template. - * + * * @return string Sanitized filename prefixed with the class_prefix * defined in the ini. */ @@ -193,40 +200,41 @@ class UNL_DWT_Generator extends UNL_DWT } return $class_prefix.$this->sanitizeTemplateName($filename);; } - + /** * Cleans the template filename. * * @param string $filename Filename of the template - * + * * @return string Sanitized template name */ function sanitizeTemplateName($filename) { - return preg_replace('/[^A-Z0-9]/i', '_', + return preg_replace('/[^A-Z0-9]/i', '_', ucfirst(str_replace('.dwt', '', $filename))); } - + /** * Scans the .dwt for regions - all found are loaded into assoc array * $this->_regions[$template]. * * @param string $dwt Dreamweaver template file to scan. - * + * * @return string derived template file. */ function scanRegions($dwt) { $this->_regions[$this->template] = array(); - + $this->_params[$this->template] = array(); + $dwt = str_replace("\r", "\n", $dwt); $dwt = preg_replace("/(\<\!-- InstanceBeginEditable name=\"([A-Za-z0-9]*)\" -->)/i", "\n\\0\n", $dwt); $dwt = preg_replace("/(\<\!-- TemplateBeginEditable name=\"([A-Za-z0-9]*)\" -->)/i", "\n\\0\n", $dwt); $dwt = preg_replace("/\<\!-- InstanceEndEditable -->/", "\n\\0\n", $dwt); $dwt = preg_replace("/\<\!-- TemplateEndEditable -->/", "\n\\0\n", $dwt); $dwt = explode("\n", $dwt); - + $newRegion = false; $region = new UNL_DWT_Region(); $this->debug("Checking {$this->template}", 'scanRegions', 0); @@ -267,27 +275,42 @@ class UNL_DWT_Generator extends UNL_DWT } } $dwt = implode("\n", $dwt); - $dwt = preg_replace("/<!--"." InstanceParam name=\"([\w]*)\" type=\"([\w]*)\" value=\"([\w]*)\" -->/", '', $dwt); + + preg_match_all("/<!-- (?:Instance|Template)Param name=\"([^\"]*)\" type=\"([^\"]*)\" value=\"([^\"]*)\" -->/", $dwt, $matches, PREG_SET_ORDER); + foreach ($matches as $match) { + if (!empty($match[1])) { + $this->_params[$this->template][$match[1]] = array( + 'name' => $match[1], + 'type' => $match[2], + 'value' => $match[3] + ); + } + } $dwt = str_replace(array( "<!--"." TemplateBeginEditable ", "<!--"." TemplateEndEditable -->", + "<!-- TemplateParam ", "\n\n"), array( "<!--"." InstanceBeginEditable ", "<!--"." InstanceEndEditable -->", + "<!-- InstanceParam ", "\n"), $dwt); if (preg_match("<!--"." InstanceBegin template=\"([\/\w\d\.]+)\" codeOutsideHTMLIsLocked=\"([\w]+)\" -->", $dwt)) { $dwt = preg_replace("/<!--"." InstanceBegin template=\"([\/\w\d\.]+)\" codeOutsideHTMLIsLocked=\"([\w]+)\" -->/", "<!--"." InstanceBegin template=\"/Templates/{$this->template}\" codeOutsideHTMLIsLocked=\"\\2\" -->", $dwt); } else { - $dwt = preg_replace("/<html[^>]*>/", "\\0<!--"." InstanceBegin template=\"/Templates/{$this->template}\" codeOutsideHTMLIsLocked=\"false\" -->", $dwt); + $pos = strpos($dwt, ">", strripos($dwt, "<html") + 5) + 1; + $dwt = substr($dwt, 0, $pos) . + "<!--"." InstanceBegin template=\"/Templates/{$this->template}\" codeOutsideHTMLIsLocked=\"false\" -->" . + substr($dwt, $pos); } $dwt = str_replace('@@(" ")@@', '', $dwt); return $dwt; } - + /** * The template class geneation part - single file. * * @param string $input file to generate a class for. - * + * * @return updated .php file */ private function _generateClassTemplate($input = '') @@ -308,13 +331,13 @@ class UNL_DWT_Generator extends UNL_DWT if ($padding < 2) { $padding =2; } - $p = str_repeat(' ', $padding); - + $p = str_repeat(' ', $padding); + $var = (substr(phpversion(), 0, 1) > 4) ? 'public' : 'var'; $body .= " {$var} \$__template = '".$this->sanitizeTemplateName($this->template).".tpl'; {$p}// template name\n"; - + $regions = $this->_regions[$this->template]; - + foreach ($regions as $t) { if (!strlen(trim($t->name))) { continue; @@ -322,25 +345,28 @@ class UNL_DWT_Generator extends UNL_DWT $padding = (30 - strlen($t->name)); if ($padding < 2) $padding =2; $p = str_repeat(' ', $padding); - + $body .=" {$var} \${$t->name} = \"".addslashes($t->value)."\"; {$p}// {$t->type}({$t->len}) {$t->flags}\n"; } - + + $body .= "\n"; + $body .= " {$var} \$__params = " . var_export($this->_params[$this->template], true) . ";\n"; + // simple creation tools ! (static stuff!) $body .= "\n"; $body .= " /* Static get */\n"; $body .= " function staticGet(\$k,\$v=NULL) { return UNL_DWT::staticGet('{$this->classname}',\$k,\$v); }\n"; - + // generate getter and setter methods $body .= $this->_generateGetters($input); $body .= $this->_generateSetters($input); - + $body .= "\n /* the code above is auto generated do not remove the tag below */"; $body .= "\n ###END_AUTOCODE\n"; - + $foot .= "}\n"; $full = $head . $body . $foot; - + if (!$input) { return $full; } @@ -350,7 +376,7 @@ class UNL_DWT_Generator extends UNL_DWT if (!preg_match('/(\n|\r\n)\s*###END_AUTOCODE(\n|\r\n)/s', $input)) { return $full; } - + $class_rewrite = 'UNL_DWT'; if (!($class_rewrite = @UNL_DWT::$options['generator_class_rewrite'])) { $class_rewrite = 'UNL_DWT'; @@ -361,17 +387,17 @@ class UNL_DWT_Generator extends UNL_DWT $input = preg_replace('/(\n|\r\n)class\s*[a-z0-9_]+\s*extends\s*' .$class_rewrite . '\s*\{(\n|\r\n)/si', "\nclass {$this->classname} extends {$this->_extends} \n{\n", $input); - + return preg_replace('/(\n|\r\n)\s*###START_AUTOCODE(\n|\r\n).*(\n|\r\n)\s*###END_AUTOCODE(\n|\r\n)/s', $body, $input); - + } - + /** * Generate getter methods for class definition * * @param string $input Existing class contents - * + * * @return string */ function _generateGetters($input) @@ -416,7 +442,7 @@ class UNL_DWT_Generator extends UNL_DWT $getters .= " return \$this->{$t->name};\n"; $getters .= " }\n\n"; } - + return $getters; } @@ -424,12 +450,11 @@ class UNL_DWT_Generator extends UNL_DWT * Generate setter methods for class definition * * @param string $input Existing class contents - * + * * @return string */ function _generateSetters($input) { - $setters = ''; // only generate if option is set to true @@ -469,8 +494,7 @@ class UNL_DWT_Generator extends UNL_DWT $setters .= " \$this->{$t->name} = \$value;\n"; $setters .= " }\n\n"; } - - return $setters; - } + return $setters; + } } diff --git a/lib/php/UNL/DWT/Region.php b/lib/php/UNL/DWT/Region.php index b0963a1d9f4046c6ff6c322915ab6c1548b06bef..e8376a073089d7ea636edb123f7d42990d2b46a8 100644 --- a/lib/php/UNL/DWT/Region.php +++ b/lib/php/UNL/DWT/Region.php @@ -1,7 +1,7 @@ <?php /** * Object representing a Dreamweaver template region - * + * * @category Templates * @package UNL_DWT * @author Brett Bieber <brett.bieber@gmail.com> @@ -19,4 +19,3 @@ class UNL_DWT_Region var $flags; var $value; } -?> \ No newline at end of file diff --git a/lib/php/UNL/DWT/Scanner.php b/lib/php/UNL/DWT/Scanner.php index 4ee274753d5e6d9a395087afb7fcaee612eda768..e4a2a29bfa2816146e046a5e1a6861d7e0e8a722 100644 --- a/lib/php/UNL/DWT/Scanner.php +++ b/lib/php/UNL/DWT/Scanner.php @@ -1,9 +1,9 @@ <?php /** - * Handles scanning a dwt file for regions. - * + * Handles scanning a dwt file for regions and rendering. + * * PHP version 5 - * + * * @category Templates * @package UNL_DWT * @author Brett Bieber <brett.bieber@gmail.com> @@ -12,6 +12,7 @@ * @license http://www1.unl.edu/wdn/wiki/Software_License BSD License * @link http://pear.unl.edu/package/UNL_DWT */ +require_once 'UNL/DWT.php'; require_once 'UNL/DWT/Region.php'; /** @@ -23,10 +24,10 @@ require_once 'UNL/DWT/Region.php'; * @license http://www1.unl.edu/wdn/wiki/Software_License BSD License * @link http://pear.unl.edu/package/UNL_DWT */ -class UNL_DWT_Scanner +class UNL_DWT_Scanner extends UNL_DWT { protected $_regions; - + /** * The contents of the .dwt file you wish to scan. * @@ -34,20 +35,31 @@ class UNL_DWT_Scanner */ function __construct($dwt) { + $this->__template = $dwt; $this->scanRegions($dwt); } - + + /** + * Return the template markup + * + * @return string + */ + function getTemplateFile() + { + return $this->__template; + } + function scanRegions($dwt) { $this->_regions[] = array(); - + $dwt = str_replace("\r", "\n", $dwt); $dwt = preg_replace("/(\<\!-- InstanceBeginEditable name=\"([A-Za-z0-9]*)\" -->)/i", "\n\\0\n", $dwt); $dwt = preg_replace("/(\<\!-- TemplateBeginEditable name=\"([A-Za-z0-9]*)\" -->)/i", "\n\\0\n", $dwt); $dwt = preg_replace("/\<\!-- InstanceEndEditable -->/", "\n\\0\n", $dwt); $dwt = preg_replace("/\<\!-- TemplateEndEditable -->/", "\n\\0\n", $dwt); $dwt = explode("\n", $dwt); - + $newRegion = false; $region = new UNL_DWT_Region(); foreach ($dwt as $key=>$fileregion) { @@ -87,12 +99,12 @@ class UNL_DWT_Scanner } } } - + /** * returns the region object * * @param string $region - * + * * @return UNL_DWT_Region */ public function getRegion($region) @@ -102,7 +114,7 @@ class UNL_DWT_Scanner } return null; } - + /** * returns array of all the regions found * @@ -112,18 +124,18 @@ class UNL_DWT_Scanner { return $this->_regions; } - + public function __isset($region) { return isset($this->_regions[$region]); } - + public function __get($region) { if (isset($this->_regions[$region])) { return $this->_regions[$region]->value; } - + $trace = debug_backtrace(); trigger_error( 'Undefined property: ' . $region . @@ -132,7 +144,15 @@ class UNL_DWT_Scanner E_USER_NOTICE); return null; } - -} -?> + /** + * Allow directly rendering + * + * @return string + */ + function __toString() + { + return $this->toHtml(); + } + +} diff --git a/lib/php/UNL/DWT/createTemplates.php b/lib/php/UNL/DWT/createTemplates.php index df87cc257c420ce1f7aa665cec00d73422baa512..f501baf5ba587c80353a00f4260471475e1baf08 100644 --- a/lib/php/UNL/DWT/createTemplates.php +++ b/lib/php/UNL/DWT/createTemplates.php @@ -2,9 +2,9 @@ <?php /** * Tool to generate objects for dreamweaver template files. - * + * * PHP version 5 - * + * * @package UNL_DWT * @author Brett Bieber <brett.bieber@gmail.com> * @created 01/18/2006 @@ -13,10 +13,12 @@ * @link http://pear.unl.edu/package/UNL_DWT */ -// since this version doesnt use overload, +// since this version doesnt use overload, // and I assume anyone using custom generators should add this.. define('UNL_DWT_NO_OVERLOAD',1); ini_set('display_errors',true); + +set_include_path(dirname(__DIR__).'/../../src'); require_once 'UNL/DWT/Generator.php'; if (!ini_get('register_argc_argv')) { @@ -24,7 +26,7 @@ if (!ini_get('register_argc_argv')) { } if (!@$_SERVER['argv'][1]) { - throw new Exception("\nERROR: createTemplates.php usage:\n\nC:\php\pear\UNL\DWT\createTemplates.php example.ini\n\n"); + throw new Exception("\nERROR: createTemplates.php usage: 'php phpdwtparser/src/UNL/DWT/createTemplates.php example.ini'\n\n"); } $config = parse_ini_file($_SERVER['argv'][1], true); @@ -41,4 +43,3 @@ set_time_limit(0); //UNL_DWT::debugLevel(1); $generator = new UNL_DWT_Generator; $generator->start(); - diff --git a/lib/php/UNL/Templates.php b/lib/php/UNL/Templates.php index 2f0015cd027c6fc42310f59b44c4f28d1fa53e0a..63917217378a3d98938ab74867fdf9d60edb59dc 100644 --- a/lib/php/UNL/Templates.php +++ b/lib/php/UNL/Templates.php @@ -1,9 +1,9 @@ <?php /** * Object oriented interface to create UNL Template based HTML pages. - * + * * PHP version 5 - * + * * @category Templates * @package UNL_Templates * @author Brett Bieber <brett.bieber@gmail.com> @@ -19,13 +19,13 @@ require_once 'UNL/DWT.php'; /** - * Allows you to create UNL Template based HTML pages through an object + * Allows you to create UNL Template based HTML pages through an object * oriented interface. - * + * * Install on your PHP server with: * pear channel-discover pear.unl.edu * pear install unl/UNL_Templates - * + * * <code> * <?php * require_once 'UNL/Templates.php'; @@ -35,7 +35,7 @@ require_once 'UNL/DWT.php'; * $page->loadSharedcodeFiles(); * echo $page; * </code> - * + * * @category Templates * @package UNL_Templates * @author Brett Bieber <brett.bieber@gmail.com> @@ -49,14 +49,14 @@ class UNL_Templates extends UNL_DWT const VERSION2 = 2; const VERSION3 = 3; const VERSION3x1 = '3.1'; - + /** * Cache object for output caching - * + * * @var UNL_Templates_CachingService */ static protected $cache; - + static public $options = array( 'debug' => 0, 'sharedcodepath' => 'sharedcode', @@ -65,14 +65,14 @@ class UNL_Templates extends UNL_DWT 'version' => self::VERSION3, 'timeout' => 5 ); - + /** * The version of the templates we're using. - * + * * @var UNL_Templates_Version */ static public $template_version; - + /** * Construct a UNL_Templates object */ @@ -83,21 +83,21 @@ class UNL_Templates extends UNL_DWT self::$options['templatedependentspath'] = $_SERVER['DOCUMENT_ROOT']; } } - + /** * Initialize the configuration for the UNL_DWT class - * + * * @return void */ 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']; + $version = str_replace('.', 'x', self::$options['version']); + include_once 'UNL/Templates/Version'.$version.'.php'; + $class = 'UNL_Templates_Version'.$version; self::$template_version = new $class(); UNL_DWT::$options = array_merge(UNL_DWT::$options, self::$template_version->getConfig()); } - + /** * The factory returns a template object for any UNL Template style requested: * * Fixed @@ -106,26 +106,30 @@ class UNL_Templates extends UNL_DWT * * Document * * Secure * * Unlaffiliate - * + * * <code> * $page = UNL_Templates::factory('Fixed'); * </code> * * @param string $type Type of template to get, Fixed, Liquid, Doc, Popup - * @param mixed $coptions Options for the constructor - * + * * @return UNL_Templates */ - static function &factory($type, $coptions = false) + static function &factory($type) { UNL_Templates::loadDefaultConfig(); - return parent::factory($type, $coptions); + return parent::factory($type); } - + + public function getTemplateFile() + { + return $this->getCache(); + } + /** * Attempts to connect to the template server and grabs the latest cache of the * template (.tpl) file. Set options for Cache_Lite in self::$options['cache'] - * + * * @return string */ function getCache() @@ -152,14 +156,14 @@ class UNL_Templates extends UNL_DWT } return $data; } - + /** * Loads standard customized content (sharedcode) files from the filesystem. - * + * * @return void */ function loadSharedcodeFiles() - { + { $includes = array( 'footercontent' => 'footer.html', 'contactinfo' => 'footerContactInfo.html', @@ -178,12 +182,12 @@ class UNL_Templates extends UNL_DWT /** * Add a link within the head of the page. - * + * * @param string $href URI to the resource * @param string $relation Relation of this link element (alternate) * @param string $relType The type of relation (rel) * @param array $attributes Any additional attribute=>value combinations - * + * * @return void */ function addHeadLink($href, $relation, $relType = 'rel', array $attributes = array()) @@ -191,10 +195,10 @@ class UNL_Templates extends UNL_DWT $attributeString = ''; foreach ($attributes as $name=>$value) { $attributeString .= $name.'="'.$value.'" '; - } - + } + $this->head .= '<link '.$relType.'="'.$relation.'" href="'.$href.'" '.$attributeString.' />'.PHP_EOL; - + } /** @@ -202,7 +206,7 @@ class UNL_Templates extends UNL_DWT * * @param string $url URL to the script * @param string $type Type of script text/javascript - * + * * @return void */ function addScript($url, $type = 'text/javascript') @@ -215,7 +219,7 @@ class UNL_Templates extends UNL_DWT * * @param string $content The javascript you wish to add. * @param string $type Type of script tag. - * + * * @return void */ function addScriptDeclaration($content, $type = 'text/javascript') @@ -231,20 +235,20 @@ class UNL_Templates extends UNL_DWT * * @param string $content CSS content to add * @param string $type type attribute for the style element - * + * * @return void */ function addStyleDeclaration($content, $type = 'text/css') { $this->head .= '<style type="'.$type.'">'.$content.'</style>'.PHP_EOL; } - + /** * Add a link to a stylesheet. * * @param string $url Address of the stylesheet, absolute or relative * @param string $media Media target (screen/print/projector etc) - * + * * @return void */ function addStyleSheet($url, $media = 'all') @@ -252,18 +256,6 @@ class UNL_Templates extends UNL_DWT $this->addHeadLink($url, 'stylesheet', 'rel', array('media'=>$media, 'type'=>'text/css')); } - /** - * Returns the page in HTML form. - * - * @return string THe full HTML of the page. - */ - function toHtml() - { - $p = $this->getCache(); - $regions = get_object_vars($this); - return $this->replaceRegions($p, $regions); - } - /** * returns this template as a string. * @@ -273,33 +265,33 @@ class UNL_Templates extends UNL_DWT { return $this->toHtml(); } - - + + /** * Populates templatedependents files - * - * Replaces the template dependent include statements with the corresponding + * + * Replaces the template dependent include statements with the corresponding * files from the /ucomm/templatedependents/ directory. To specify the location * of your templatedependents directory, use something like * $page->options['templatedependentspath'] = '/var/www/'; * and set the path to the directory containing /ucomm/templatedependents/ * * @param string $p Page to make replacements in - * + * * @return string */ function makeIncludeReplacements($p) { return self::$template_version->makeIncludeReplacements($p); } - + /** * Debug handler for messages. * * @param string $message Message to send to debug output * @param int $logtype Which log to send this to * @param int $level The threshold to send this message or not. - * + * * @return void */ static function debug($message, $logtype = 0, $level = 1) @@ -307,7 +299,7 @@ class UNL_Templates extends UNL_DWT UNL_DWT::$options['debug'] = self::$options['debug']; parent::debug($message, $logtype, $level); } - + /** * Cleans the cache. * @@ -319,12 +311,12 @@ class UNL_Templates extends UNL_DWT { return self::getCachingService()->clean($object); } - + static public function setCachingService(UNL_Templates_CachingService $cache) { self::$cache = $cache; } - + static public function getCachingService() { if (!isset(self::$cache)) { diff --git a/lib/php/UNL/Templates/Version2.php b/lib/php/UNL/Templates/Version2.php index 7142f9f1833227d5f0c956168a91b5a000c2131f..e4aad342d3bdeffb3fa4eabec12c53ad8d35848a 100644 --- a/lib/php/UNL/Templates/Version2.php +++ b/lib/php/UNL/Templates/Version2.php @@ -34,7 +34,7 @@ class UNL_Templates_Version2 implements UNL_Templates_Version } if (file_exists(UNL_Templates::getDataDir().'/tpl_cache/Version2/'.$template)) { - return file_get_contents($template); + return file_get_contents(UNL_Templates::getDataDir().'/tpl_cache/Version2/'.$template); } throw new Exception('Could not get the template file!'); diff --git a/lib/php/UNL/Templates/Version3x1.php b/lib/php/UNL/Templates/Version3x1.php index baf4a00c4b07f731528d41bd28a75d42d42b217b..3aacf6bc7f81e04f51be33ffdcd58a9ac165c46c 100644 --- a/lib/php/UNL/Templates/Version3x1.php +++ b/lib/php/UNL/Templates/Version3x1.php @@ -38,7 +38,7 @@ class UNL_Templates_Version3x1 implements UNL_Templates_Version 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'; + $template = 'Local.tpl'; } // Always try and retrieve the latest diff --git a/lib/php/UNL/Templates/Version3x1/Debug.php b/lib/php/UNL/Templates/Version3x1/Debug.php index aa8ac7858d236c3c6965282e78f73aa09a722880..03474443b3165ffee3ca8bb8e96e0891bbeea1a3 100644 --- a/lib/php/UNL/Templates/Version3x1/Debug.php +++ b/lib/php/UNL/Templates/Version3x1/Debug.php @@ -22,6 +22,14 @@ class UNL_Templates_Version3x1_Debug extends UNL_Templates public $optionalfooter = ""; // string() public $footercontent = "<!--#include virtual=\"../sharedcode/footer.html\" -->"; // string() + public $__params = array ( + 'class' => + array ( + 'name' => 'class', + 'type' => 'text', + 'value' => 'fixed debug', + ), +); /* Static get */ function staticGet($k,$v=NULL) { return UNL_DWT::staticGet('UNL_Templates_Version3x1_Debug',$k,$v); } diff --git a/lib/php/UNL/Templates/Version3x1/Fixed.php b/lib/php/UNL/Templates/Version3x1/Fixed.php index a396fd3c5e60ae4dd9625897227e7802d52e6b90..792cb987e9155c93b2cfbe11f483e869314bc44e 100644 --- a/lib/php/UNL/Templates/Version3x1/Fixed.php +++ b/lib/php/UNL/Templates/Version3x1/Fixed.php @@ -22,6 +22,14 @@ class UNL_Templates_Version3x1_Fixed extends UNL_Templates public $optionalfooter = ""; // string() public $footercontent = "<!--#include virtual=\"../sharedcode/footer.html\" -->"; // string() + public $__params = array ( + 'class' => + array ( + 'name' => 'class', + 'type' => 'text', + 'value' => 'fixed', + ), +); /* Static get */ function staticGet($k,$v=NULL) { return UNL_DWT::staticGet('UNL_Templates_Version3x1_Fixed',$k,$v); } diff --git a/lib/php/UNL/Templates/Version3x1/Local.php b/lib/php/UNL/Templates/Version3x1/Local.php index d120aff26038fc094efbd5764560d23b25feb8c4..77fed187638d0cf187efb1aa98cd9323926001f0 100644 --- a/lib/php/UNL/Templates/Version3x1/Local.php +++ b/lib/php/UNL/Templates/Version3x1/Local.php @@ -22,6 +22,14 @@ class UNL_Templates_Version3x1_Local extends UNL_Templates public $optionalfooter = ""; // string() public $footercontent = "<!--#include virtual=\"../sharedcode/footer.html\" -->"; // string() + public $__params = array ( + 'class' => + array ( + 'name' => 'class', + 'type' => 'text', + 'value' => 'fixed', + ), +); /* Static get */ function staticGet($k,$v=NULL) { return UNL_DWT::staticGet('UNL_Templates_Version3x1_Local',$k,$v); } diff --git a/lib/php/UNL/Templates/Version3x1/Unlaffiliate.php b/lib/php/UNL/Templates/Version3x1/Unlaffiliate.php index 37da6f4216d01d8ece6a07e1973cf0391b2cb068..5eb78990d65075dcb5253a34d0796c51ed2a34a2 100644 --- a/lib/php/UNL/Templates/Version3x1/Unlaffiliate.php +++ b/lib/php/UNL/Templates/Version3x1/Unlaffiliate.php @@ -22,6 +22,14 @@ class UNL_Templates_Version3x1_Unlaffiliate extends UNL_Templates public $optionalfooter = ""; // string() public $footercontent = "<!--#include virtual=\"../sharedcode/footer.html\" -->"; // string() + public $__params = array ( + 'class' => + array ( + 'name' => 'class', + 'type' => 'text', + 'value' => 'fixed', + ), +); /* Static get */ function staticGet($k,$v=NULL) { return UNL_DWT::staticGet('UNL_Templates_Version3x1_Unlaffiliate',$k,$v); } diff --git a/lib/php/UNL/Templates/Version3x1/Unlaffiliate_debug.php b/lib/php/UNL/Templates/Version3x1/Unlaffiliate_debug.php index baa01f04c441989267e919a2489c679f88c109d7..1804ad91082a962072655a46da0684571168ee3b 100644 --- a/lib/php/UNL/Templates/Version3x1/Unlaffiliate_debug.php +++ b/lib/php/UNL/Templates/Version3x1/Unlaffiliate_debug.php @@ -22,6 +22,14 @@ class UNL_Templates_Version3x1_Unlaffiliate_debug extends UNL_Templates public $optionalfooter = ""; // string() public $footercontent = "<!--#include virtual=\"../sharedcode/footer.html\" -->"; // string() + public $__params = array ( + 'class' => + array ( + 'name' => 'class', + 'type' => 'text', + 'value' => 'fixed debug', + ), +); /* Static get */ function staticGet($k,$v=NULL) { return UNL_DWT::staticGet('UNL_Templates_Version3x1_Unlaffiliate_debug',$k,$v); } diff --git a/lib/php/UNL/Templates/Version3x1/Unlaffiliate_local.php b/lib/php/UNL/Templates/Version3x1/Unlaffiliate_local.php index ddb0a55ff96084348875a403034abfbfc8b77582..20511b9b85b7ade733efa8819731fb5767703fba 100644 --- a/lib/php/UNL/Templates/Version3x1/Unlaffiliate_local.php +++ b/lib/php/UNL/Templates/Version3x1/Unlaffiliate_local.php @@ -22,6 +22,14 @@ class UNL_Templates_Version3x1_Unlaffiliate_local extends UNL_Templates public $optionalfooter = ""; // string() public $footercontent = "<!--#include virtual=\"../sharedcode/footer.html\" -->"; // string() + public $__params = array ( + 'class' => + array ( + 'name' => 'class', + 'type' => 'text', + 'value' => 'fixed', + ), +); /* Static get */ function staticGet($k,$v=NULL) { return UNL_DWT::staticGet('UNL_Templates_Version3x1_Unlaffiliate_local',$k,$v); } diff --git a/lib/php/UNL/Templates/Version4.php b/lib/php/UNL/Templates/Version4.php new file mode 100644 index 0000000000000000000000000000000000000000..a786fb22cb8053da6e2404fbc5b80df8fff670c5 --- /dev/null +++ b/lib/php/UNL/Templates/Version4.php @@ -0,0 +1,95 @@ +<?php +/** + * Base class for Version 4 (2013) 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 4 (2013) 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_Version4 implements UNL_Templates_Version +{ + function getConfig() + { + return array('class_location' => 'UNL/Templates/Version4/', + 'class_prefix' => 'UNL_Templates_Version4_'); + } + + 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('https://raw.github.com/unl/wdntemplates/master/Templates/'.$template, false, $http_context)) { + + // Grab the HTML version number for this file + $version = file_get_contents('https://raw.github.com/unl/wdntemplates/master/Templates/VERSION_HTML'); + $tpl = str_replace('$HTML_VERSION$', $version, $tpl); + + return $tpl; + } + + if (file_exists(UNL_Templates::getDataDir().'/tpl_cache/Version4/'.$template)) { + return file_get_contents(UNL_Templates::getDataDir().'/tpl_cache/Version4/'.$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_4.0/[A-Za-z0-9\.\/_]+)" -->', + $html, $includes); + UNL_Templates::debug(print_r($includes, true), 'makeIncludeReplacements', 3); + + // Normally the templates will not need to have the dependency version replaced + static $dep_version = ''; + + 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); + // We'll grab the latest copy of the file from Github + + if ($dep_version == '') { + // Grab the dependency version from github + $dep_version = file_get_contents('https://raw.github.com/unl/wdntemplates/master/VERSION_DEP'); + } + + $file = 'https://raw.github.com/unl/wdntemplates/master'.$include; + } + $html = str_replace( + array('<!--#include virtual="'.$include.'" -->', '$DEP_VERSION$'), + array(file_get_contents($file), $dep_version), + $html + ); + } + return $html; + } +} diff --git a/lib/php/UNL/Templates/Version4/Debug.php b/lib/php/UNL/Templates/Version4/Debug.php new file mode 100644 index 0000000000000000000000000000000000000000..13954092d9072806cfcaa6d3aac7ab1ef115827b --- /dev/null +++ b/lib/php/UNL/Templates/Version4/Debug.php @@ -0,0 +1,39 @@ +<?php +/** + * Template Definition for fixed.dwt + */ +require_once 'UNL/Templates.php'; + +class UNL_Templates_Version4_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–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–Lincoln\" class=\"wdn-icon-home\">UNL</a></li> <li><a href=\"#\" title=\"Site Title\">Site Title</a></li> <li>Home</li> </ul>"; // string() + public $navlinks = "<!--#include virtual=\"../sharedcode/navigation.html\" -->"; // string() + public $pagetitle = "<h1>Please Title Your Page Here</h1>"; // string() + public $maincontentarea = "<div class=\"wdn-band\"> <div class=\"wdn-inner-wrapper\"> <p>Impress your audience with awesome content!</p> </div> </div>"; // string() + public $optionalfooter = ""; // string() + public $leftcollinks = "<!--#include virtual=\"../sharedcode/relatedLinks.html\" -->"; // string() + public $contactinfo = "<!--#include virtual=\"../sharedcode/footerContactInfo.html\" -->"; // string() + public $footercontent = "<!--#include virtual=\"../sharedcode/footer.html\" -->"; // string() + + public $__params = array ( + 'class' => + array ( + 'name' => 'class', + 'type' => 'text', + 'value' => 'debug', + ), +); + + /* Static get */ + function staticGet($k,$v=NULL) { return UNL_DWT::staticGet('UNL_Templates_Version4_Debug',$k,$v); } + + /* the code above is auto generated do not remove the tag below */ + ###END_AUTOCODE +} diff --git a/lib/php/UNL/Templates/Version4/Fixed.php b/lib/php/UNL/Templates/Version4/Fixed.php new file mode 100644 index 0000000000000000000000000000000000000000..2d3af49030248875397b5f35871712620da7080b --- /dev/null +++ b/lib/php/UNL/Templates/Version4/Fixed.php @@ -0,0 +1,39 @@ +<?php +/** + * Template Definition for fixed.dwt + */ +require_once 'UNL/Templates.php'; + +class UNL_Templates_Version4_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–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–Lincoln\" class=\"wdn-icon-home\">UNL</a></li> <li><a href=\"#\" title=\"Site Title\">Site Title</a></li> <li>Home</li> </ul>"; // string() + public $navlinks = "<!--#include virtual=\"../sharedcode/navigation.html\" -->"; // string() + public $pagetitle = "<h1>Please Title Your Page Here</h1>"; // string() + public $maincontentarea = "<div class=\"wdn-band\"> <div class=\"wdn-inner-wrapper\"> <p>Impress your audience with awesome content!</p> </div> </div>"; // string() + public $optionalfooter = ""; // string() + public $leftcollinks = "<!--#include virtual=\"../sharedcode/relatedLinks.html\" -->"; // string() + public $contactinfo = "<!--#include virtual=\"../sharedcode/footerContactInfo.html\" -->"; // string() + public $footercontent = "<!--#include virtual=\"../sharedcode/footer.html\" -->"; // string() + + public $__params = array ( + 'class' => + array ( + 'name' => 'class', + 'type' => 'text', + 'value' => '', + ), +); + + /* Static get */ + function staticGet($k,$v=NULL) { return UNL_DWT::staticGet('UNL_Templates_Version4_Fixed',$k,$v); } + + /* the code above is auto generated do not remove the tag below */ + ###END_AUTOCODE +} diff --git a/lib/php/UNL/Templates/Version4/Local.php b/lib/php/UNL/Templates/Version4/Local.php new file mode 100644 index 0000000000000000000000000000000000000000..a40359852c8095b0e7a4a3220076b02fee96a89a --- /dev/null +++ b/lib/php/UNL/Templates/Version4/Local.php @@ -0,0 +1,39 @@ +<?php +/** + * Template Definition for local.dwt + */ +require_once 'UNL/Templates.php'; + +class UNL_Templates_Version4_Local extends UNL_Templates +{ + ###START_AUTOCODE + /* the code below is auto generated do not remove the above tag */ + + public $__template = 'Local.tpl'; // template name + public $doctitle = "<title>Use a descriptive page title | Optional Site Title (use for context) | University of Nebraska–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–Lincoln\" class=\"wdn-icon-home\">UNL</a></li> <li><a href=\"#\" title=\"Site Title\">Site Title</a></li> <li>Home</li> </ul>"; // string() + public $navlinks = "<!--#include virtual=\"../sharedcode/navigation.html\" -->"; // string() + public $pagetitle = "<h1>Please Title Your Page Here</h1>"; // string() + public $maincontentarea = "<div class=\"wdn-band\"> <div class=\"wdn-inner-wrapper\"> <p>Impress your audience with awesome content!</p> </div> </div>"; // string() + public $optionalfooter = ""; // string() + public $leftcollinks = "<!--#include virtual=\"../sharedcode/relatedLinks.html\" -->"; // string() + public $contactinfo = "<!--#include virtual=\"../sharedcode/footerContactInfo.html\" -->"; // string() + public $footercontent = "<!--#include virtual=\"../sharedcode/footer.html\" -->"; // string() + + public $__params = array ( + 'class' => + array ( + 'name' => 'class', + 'type' => 'text', + 'value' => '', + ), +); + + /* Static get */ + function staticGet($k,$v=NULL) { return UNL_DWT::staticGet('UNL_Templates_Version4_Local',$k,$v); } + + /* the code above is auto generated do not remove the tag below */ + ###END_AUTOCODE +} diff --git a/lib/php/UNL/Templates/Version4/Unlaffiliate.php b/lib/php/UNL/Templates/Version4/Unlaffiliate.php new file mode 100644 index 0000000000000000000000000000000000000000..7bf68c0325ffac40ca002edb9dcd12bbd0093688 --- /dev/null +++ b/lib/php/UNL/Templates/Version4/Unlaffiliate.php @@ -0,0 +1,39 @@ +<?php +/** + * Template Definition for unlaffiliate.dwt + */ +require_once 'UNL/Templates.php'; + +class UNL_Templates_Version4_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 = "The Title of My Site"; // 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>Please Title Your Page Here</h1>"; // string() + public $maincontentarea = "<div class=\"wdn-band\"> <div class=\"wdn-inner-wrapper\"> <p>Impress your audience with awesome content!</p> </div> </div>"; // string() + public $optionalfooter = ""; // string() + public $leftcollinks = "<!--#include virtual=\"../sharedcode/relatedLinks.html\" -->"; // string() + public $contactinfo = "<!--#include virtual=\"../sharedcode/footerContactInfo.html\" -->"; // string() + public $footercontent = "<!--#include virtual=\"../sharedcode/footer.html\" -->"; // string() + + public $__params = array ( + 'class' => + array ( + 'name' => 'class', + 'type' => 'text', + 'value' => '', + ), +); + + /* Static get */ + function staticGet($k,$v=NULL) { return UNL_DWT::staticGet('UNL_Templates_Version4_Unlaffiliate',$k,$v); } + + /* the code above is auto generated do not remove the tag below */ + ###END_AUTOCODE +} diff --git a/lib/php/UNL/Templates/Version4/Unlaffiliate_debug.php b/lib/php/UNL/Templates/Version4/Unlaffiliate_debug.php new file mode 100644 index 0000000000000000000000000000000000000000..9905d431c90a7434ec0a5c65b3ca0c6b50854d86 --- /dev/null +++ b/lib/php/UNL/Templates/Version4/Unlaffiliate_debug.php @@ -0,0 +1,39 @@ +<?php +/** + * Template Definition for unlaffiliate_debug.dwt + */ +require_once 'UNL/Templates.php'; + +class UNL_Templates_Version4_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 = "The Title of My Site"; // 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>Please Title Your Page Here</h1>"; // string() + public $maincontentarea = "<div class=\"wdn-band\"> <div class=\"wdn-inner-wrapper\"> <p>Impress your audience with awesome content!</p> </div> </div>"; // string() + public $optionalfooter = ""; // string() + public $leftcollinks = "<!--#include virtual=\"../sharedcode/relatedLinks.html\" -->"; // string() + public $contactinfo = "<!--#include virtual=\"../sharedcode/footerContactInfo.html\" -->"; // string() + public $footercontent = "<!--#include virtual=\"../sharedcode/footer.html\" -->"; // string() + + public $__params = array ( + 'class' => + array ( + 'name' => 'class', + 'type' => 'text', + 'value' => 'debug', + ), +); + + /* Static get */ + function staticGet($k,$v=NULL) { return UNL_DWT::staticGet('UNL_Templates_Version4_Unlaffiliate_debug',$k,$v); } + + /* the code above is auto generated do not remove the tag below */ + ###END_AUTOCODE +} diff --git a/lib/php/UNL/Templates/Version4/Unlaffiliate_local.php b/lib/php/UNL/Templates/Version4/Unlaffiliate_local.php new file mode 100644 index 0000000000000000000000000000000000000000..13681f492778e8db79f604babd39f5270f5e37c0 --- /dev/null +++ b/lib/php/UNL/Templates/Version4/Unlaffiliate_local.php @@ -0,0 +1,39 @@ +<?php +/** + * Template Definition for unlaffiliate_local.dwt + */ +require_once 'UNL/Templates.php'; + +class UNL_Templates_Version4_Unlaffiliate_local extends UNL_Templates +{ + ###START_AUTOCODE + /* the code below is auto generated do not remove the above tag */ + + public $__template = 'Unlaffiliate_local.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 = "The Title of My Site"; // 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>Please Title Your Page Here</h1>"; // string() + public $maincontentarea = "<div class=\"wdn-band\"> <div class=\"wdn-inner-wrapper\"> <p>Impress your audience with awesome content!</p> </div> </div>"; // string() + public $optionalfooter = ""; // string() + public $leftcollinks = "<!--#include virtual=\"../sharedcode/relatedLinks.html\" -->"; // string() + public $contactinfo = "<!--#include virtual=\"../sharedcode/footerContactInfo.html\" -->"; // string() + public $footercontent = "<!--#include virtual=\"../sharedcode/footer.html\" -->"; // string() + + public $__params = array ( + 'class' => + array ( + 'name' => 'class', + 'type' => 'text', + 'value' => '', + ), +); + + /* Static get */ + function staticGet($k,$v=NULL) { return UNL_DWT::staticGet('UNL_Templates_Version4_Unlaffiliate_local',$k,$v); } + + /* the code above is auto generated do not remove the tag below */ + ###END_AUTOCODE +} diff --git a/src/UNL/Search.php b/src/UNL/Search.php index 5b0ad20bde5743ca8ebf51ec595416556786765e..1f718e6c1ce6da30afb6cbc6038e9286927fe421 100644 --- a/src/UNL/Search.php +++ b/src/UNL/Search.php @@ -7,6 +7,10 @@ class UNL_Search * @var array */ public static $jsapiKeys = array(); + + public static $mode = 'production'; + + public static $linkedCSEServer = 'http://www1.unl.edu/search/linkedcse/'; function __construct() { @@ -49,13 +53,36 @@ class UNL_Search } return $html; } + + /** + * Returns a UNL_Templates_Scanner of the given URL or false on failure + * + * @param string $referrer + * @return boolean|UNL_Templates_Scanner + */ + public static function getScannedPage($referrer) + { + if ($referrer == 'http://www.unl.edu' || + !preg_match('/^https?/', $referrer) || + !filter_var($referrer, FILTER_VALIDATE_URL, FILTER_FLAG_SCHEME_REQUIRED) + ) { + return false; + } + + $scanned = @file_get_contents($referrer); + if (!$scanned) { + return false; + } + + return new UNL_Templates_Scanner($scanned); + } /** * Return an API key * * @return string */ - function getJSAPIKey() + public static function getJSAPIKey() { if (empty(self::$jsapiKeys)) { return ''; @@ -65,4 +92,8 @@ class UNL_Search return self::$jsapiKeys[0]; } + public static function getLinkedCSEUrl($referrer) + { + return self::$linkedCSEServer . '?u=' . urlencode($referrer); + } } diff --git a/www/images/050419.jpg b/www/images/050419.jpg new file mode 100644 index 0000000000000000000000000000000000000000..f224eb6b70f8c1ff4317a6b40970f759be7ff819 Binary files /dev/null and b/www/images/050419.jpg differ diff --git a/www/images/as_pointer.gif b/www/images/as_pointer.gif deleted file mode 100644 index db0090d197295d37e016b5c8fa3722c29c45b0c9..0000000000000000000000000000000000000000 Binary files a/www/images/as_pointer.gif and /dev/null differ diff --git a/www/index.php b/www/index.php index 237db7c6c10e0540ef3acc5e4a378b45835c0dff..0e06dae7b2b2c61b9acb668db2ad77ddd1187ceb 100644 --- a/www/index.php +++ b/www/index.php @@ -1,55 +1,64 @@ <?php $config_file = __DIR__ . '/../config.sample.php'; - if (file_exists(__DIR__ . '/../config.inc.php')) { $config_file = __DIR__ . '/../config.inc.php'; } + require_once $config_file; +function renderTemplate($file, $params = array()) +{ + extract($params); + include $file; +} + +$isEmbed = isset($_GET['embed']) && $_GET['embed']; + UNL_Templates::setCachingService(new UNL_Templates_CachingService_Null()); +UNL_Templates::$options['version'] = 4.0; -UNL_Templates::$options['version'] = 3.1; -$template = 'Fixed'; +if (UNL_Search::$mode === 'debug') { + $page = UNL_Templates::factory('Local'); + $page->addScript('js/search.js'); +} else { + $page = UNL_Templates::factory('Fixed'); + $page->addScript('js/search.min.js'); +} -if (isset($_GET['format']) - && $_GET['format'] == 'mobile') { - $template = 'Mobile'; +if (!$isEmbed) { + $page->doctitle = '<title>Search | University of Nebraska–Lincoln</title>'; + $page->pagetitle = ''; + ob_start(); + renderTemplate('templates/breadcrumbs.tpl.php'); + $page->breadcrumbs = ob_get_clean(); } -$page = UNL_Templates::factory('Fixed'); -$page->doctitle = '<title>UNL | Search</title>'; -$page->pagetitle = ''; -$page->breadcrumbs = ' -<ul> - <li><a href="http://www.unl.edu/" title="University of Nebraska–Lincoln">UNL</a></li> - <li>Search</li> -</ul>'; $local_results = ''; +$inlineJS = ''; $apiKey = UNL_Search::getJSAPIKey(); -$page->addScript('http://www.google.com/jsapi' . (empty($apiKey) ? '' : '?key=' . $apiKey)); -$page->head .= ' -<link rel="stylesheet" href="http://www.google.com/cse/style/look/default.css" type="text/css" /> -<link rel="stylesheet" type="text/css" href="http://directory.unl.edu/css/result_lists.css" /> -<link rel="stylesheet" type="text/css" href="searchCSS.css" /> -'; -if ($template == 'Mobile') { - $page->head .='<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" > - <script type="text/javascript">var mobileSearch = true;</script>'; -} else { - $page->head .='<script type="text/javascript">var mobileSearch = false;</script>'; +$params = array( + 'autoload' => json_encode(array('modules' => array( + array( + 'name' => 'search', + 'version' => '1.0', + 'callback' => 'searchInit', + 'style' => '//www.google.com/cse/style/look/v2/default.css' + ), + ))), +); +if (!empty($apiKey)) { + $params['key'] = $apiKey; } -$page->addScript('searchFunc.js'); +$page->addScript('//www.google.com/jsapi?' . http_build_query($params)); +$page->addStyleSheet('css/search.css'); -if (isset($_GET['u']) //u is referring site - && $_GET['u'] !== 'http://www.unl.edu/' - && preg_match('/^https?/', $_GET['u']) - && filter_var($_GET['u'], FILTER_VALIDATE_URL, FILTER_FLAG_SCHEME_REQUIRED) - && $scanned = @file_get_contents($_GET['u'])) { +//u is referring site +if (isset($_GET['u']) && $scanned = UNL_Search::getScannedPage($_GET['u'])) { // Add local site search results - $scanned = new UNL_Templates_Scanner($scanned); - if (isset($scanned->navlinks)) { //we're scrapping the navigation and other content from the originatting site. + // we're scrapping the navigation and other content from the originatting site. + if (!$isEmbed && isset($scanned->navlinks)) { require_once 'HTMLPurifier.auto.php'; $config = HTMLPurifier_Config::createDefault(); $config->set('Cache.SerializerPath', '/tmp'); @@ -63,7 +72,8 @@ if (isset($_GET['u']) //u is referring site $page->leftcollinks = $purifier->purify($scanned->leftcollinks); } if (!empty($scanned->contactinfo)) { - $page->contactinfo = $purifier->purify($scanned->contactinfo); + + $page->contactinfo = $purifier->purify(preg_replace('#<h3>.*</h3>#', '', $scanned->contactinfo)); } if (!empty($scanned->footercontent)) { $page->footercontent = $purifier->purify($scanned->footercontent); @@ -72,62 +82,61 @@ if (isset($_GET['u']) //u is referring site if (isset($_GET['cx'])) { // Use their custom search engine instead of the linked one. - $context = '"'.htmlentities($_GET['cx'], ENT_QUOTES).'"'; + $context = $_GET['cx']; } else { // Auto-build a custom search engine - $context = '{crefUrl :"http://www1.unl.edu/search/linkedcse/?u='.$_GET['u'].'"}'; + $context = array('crefUrl' => UNL_Search::getLinkedCSEUrl($_GET['u'])); } - $page->addScriptDeclaration(' - UNL_Search.do_local_search = true; - UNL_Search.local_search_context = '.$context.'; - '); - $local_results = ' - <h3 class="sec_header">'.$page->titlegraphic.' Results</h3> - <div id="local_results" class="google-results"></div>'; -} else { + $context = json_encode($context); + $inlineJS .= "var LOCAL_SEARCH_CONTEXT = {$context};\n"; + + ob_start(); + renderTemplate('templates/google-results.tpl.php', array( + 'title' => $page->titlegraphic, + 'id' => 'local_results', + )); + $local_results = ob_get_clean(); +} elseif (!$isEmbed) { // Default search for no referring site. - $page->titlegraphic = '<h1>UNL Search</h1>'; - $page->addScriptDeclaration('UNL_Search.do_local_search = false;'); + $page->titlegraphic = 'UNL Search'; $page->breadcrumbs = str_replace('Department', 'Search', $page->breadcrumbs); $page->navlinks = file_get_contents('http://www.unl.edu/ucomm/sharedcode/navigation.html'); $page->leftcollinks = file_get_contents('http://www.unl.edu/ucomm/sharedcode/relatedLinks.html'); - $page->contactinfo = file_get_contents('http://www.unl.edu/ucomm/sharedcode/footerContactInfo.html'); + $page->contactinfo = preg_replace('#<h3>.*</h3>#', '', file_get_contents('http://www.unl.edu/ucomm/sharedcode/footerContactInfo.html')); $page->footercontent = file_get_contents('http://www.unl.edu/ucomm/sharedcode/footer.html'); +} + +if (isset($_GET['q'])) { + $q = json_encode($_GET['q']); + $inlineJS .= "var INITIAL_QUERY = {$q};\n"; +} + +$page->addScriptDeclaration($inlineJS); + +ob_start(); +if (!$isEmbed) { + renderTemplate('templates/search-form.tpl.php', array('local_results' => $local_results)); } +renderTemplate('templates/search-results.tpl.php', array( + 'isEmbed' => $isEmbed, + 'local_results' => $local_results +)); -$page->maincontentarea = ' -<div id="searchform"> - <form action="./" method="get"> - <fieldset> - <label for="q">Search</label> - <input class="search-query" type="text" name="q" id="search_q" title="search" />'; -if (!empty($local_results)) { - $page->maincontentarea .= '<input type="hidden" name="u" value="'.htmlentities($_GET['u'], ENT_QUOTES).'" />'; +$maincontent = ob_get_clean(); + +if (!$isEmbed) { + $page->maincontentarea = $maincontent; + echo $page; +} else { + if (UNL_Search::$mode === 'debug') { + $template = 'templates/embed-debug.tpl.php'; + } else { + $template = 'templates/embed.tpl.php'; + } + renderTemplate($template, array( + 'head' => $page->head, + 'maincontent' => $maincontent + )); } -$page->maincontentarea .= ' - <input class="search-button" title="search" type="submit" value="Search" /> - </fieldset> - </form> - <noscript> - <form action="http://www.googlesyndicatedsearch.com/u/UNL1" method="get"> - <input style="width:90%" type="text" name="q" /> - <input type="submit" value="Search" /> - </form> - </noscript> -</div> -<div class="grid8 first" id="search_results"> - '.$local_results.' - <h3 class="sec_header">UNL Web</h3> - <div id="unl_results" class="google-results"></div> -</div> -<div class="grid4" id="directory_results"> - <h3 class="sec_header">UNL Directory</h3> - <div id="ppl_results"></div> - <a href="http://www1.unl.edu/wdn/wiki/About_Peoplefinder">About the UNL Directory</a> -</div> -'; -echo $page; - -?> diff --git a/www/js/.gitignore b/www/js/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..723285d21cb7c83217487c4e91e17e3241aa0146 --- /dev/null +++ b/www/js/.gitignore @@ -0,0 +1,2 @@ +/search.js.map +/search.min.js diff --git a/www/js/search.js b/www/js/search.js new file mode 100644 index 0000000000000000000000000000000000000000..312e91c24160485f5f80aaab9fc54f3253ea7ead --- /dev/null +++ b/www/js/search.js @@ -0,0 +1,317 @@ +(function(window) { + "use strict"; + + var + initCallback = 'searchInit', + + // Service server (defaults to //directory.unl.edu) + directoryServer = null, + + unlContext = '015236299699564929946:nk1siew10ie', + + transitionDelay = 400, + + inputSel = '#search_q', + formSel = '#searchform form', + resultSel = '.search-results', + googleSel = '.google-results', + + wrapperMain = '#search_wrapper', + wrapperWeb = '#search_results', + wrapperDir = '#directory_results', + + dirResults = 'ppl_results', + unlResults = 'unl_results', + localResults = 'local_results'; + + window[initCallback] = function() { + delete window[initCallback]; + + require(['jquery', 'analytics'], function($, analytics) { + // Caching Class + var Cache = function() { + this.storage = {}; + }; + Cache.prototype.get = function(key) { + return this.storage[key] || undefined; + }; + Cache.prototype.save = function(key, value) { + this.storage[key] = value; + return this; + }; + + // Directory Controller Class + var Directory = function(server, containerId) { + var cntSel = '#' + containerId; + + this._server = server || '//directory.unl.edu'; + this._cache = new Cache(); + this._searchCanceled = false; + this._viewState = 0; + this._renderTo = cntSel; + + $(function() { + $(cntSel).on('click', '.fn a', function() { + if (this.target !== '_blank') { + this.target = '_blank'; + } + }); + }); + }; + Directory.prototype._render = function(data) { + if (this._searchCanceled) { + return; + } + + $(this._renderTo) + .html(data) + .addClass('active'); + + this._renderState(0); + }; + Directory.prototype._renderState = function(duration) { + var $innerRes = $('.results', $(this._renderTo)), + depFilter = '.departments'; + + $innerRes.slideUp(duration); + if (this._viewState === 0) { + $innerRes.not(depFilter).slideDown(); + } else { + $innerRes.filter(depFilter).slideDown(); + } + }; + Directory.prototype.cancelSearch = function() { + this._searchCanceled = true; + if (this._xhr) { + this._xhr.abort(); + } + }; + Directory.prototype.execute = function(q) { + var cacheData = this._cache.get(q), + self = this; + + this._searchCanceled = false; + + if (cacheData) { + this._render(cacheData); + } else { + this._xhr = $.get(this._server + '/service.php?q=' + encodeURIComponent(q), function(data) { + self._cache.save(q, data); + self._render(data); + }); + } + }; + Directory.prototype.changeViewState = function(state) { + if (this._viewState == state) { + return; + } + + this._viewState = state; + this._renderState(); + }; + Directory.prototype.clearAllResults = function() { + $(this._renderTo).empty(); + }; + + var + // query related + query = '', + firstQ = window['INITIAL_QUERY'], + + actCls = 'active', + + // CustomSearchControl instances and config + unlSearch, + localSearch, + activeSearch, + directorySearch, + localContext = window['LOCAL_SEARCH_CONTEXT'], + drawOp = new google.search.DrawOptions(), + + trackQuery = function(q) { + var loc = window.location, + qs = loc.search.replace(/(?:(\?)|&)q=[^&]*(?:&|$)/, '$1'), + page = [ + loc.pathname, + qs || '?', + (qs && qs != '?') ? '&' : '', + 'q=', + encodeURIComponent(q) + ].join(''); + + analytics.callTrackPageview(page); + + if (window.history.pushState) { + window.history.pushState({query: q}, '', page); + } + }, + queryComplete = function(control) { + var $root = $(control.root); + + // a11y patching + $('img.gs-image', $root).each(function() { + if (!this.alt) { + this.alt = $(this).closest('.gsc-table-result').find('.gs-title').first().text(); + } + }); + $('img.gcsc-branding-img-noclear', $root).attr('alt', 'Googleâ„¢'); + + $root.closest(resultSel).addClass(actCls); + $root.closest(googleSel).slideDown(); + }, + fullQuery = function(q, track) { + if (track !== false) { + trackQuery(q); + } + activeSearch.execute(q); + directorySearch.execute(q); + $(wrapperMain).fadeIn(); + }, + fullStop = function() { + activeSearch.cancelSearch(); + directorySearch.cancelSearch(); + $(resultSel).removeClass(actCls); + $(wrapperMain).fadeOut(); + setTimeout(function() { + activeSearch.clearAllResults(); + directorySearch.clearAllResults(); + }, transitionDelay); + }, + queryStart = function(control, searcher, q) { + $(control.root).closest(googleSel).slideUp(0); + if (q !== query) { + trackQuery(q); + directorySearch.execute(q); + } + }; + + drawOp.enableSearchResultsOnly(); + + unlSearch = activeSearch = new google.search.CustomSearchControl(unlContext); + unlSearch.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET); + unlSearch.setSearchCompleteCallback(window, queryComplete); + unlSearch.setSearchStartingCallback(window, queryStart); + + if (localContext) { + localSearch = activeSearch = new google.search.CustomSearchControl(localContext); + localSearch.setResultSetSize('small'); + localSearch.setSearchCompleteCallback(window, queryComplete); + localSearch.setSearchStartingCallback(window, queryStart); + } + + directorySearch = new Directory(directoryServer, dirResults); + + // Setup DOM on ready + $(function() { + var $q = $(inputSel), + + tabsSel = '.result-tab', + selCls = 'selected', + stateClsPfx = 'state-', + + $resTabs = $('.result-tab'), + + googleOrigin = /^https?:\/\/www\.google\.com$/, + + passiveQuery = function(q, track) { + if (query === q) { + return; + } + + query = q; + $q.val(q); + + if (q) { + fullQuery(q, track); + } else { + fullStop(); + } + }; + + // draw the Google search controls + unlSearch.draw(unlResults, drawOp); + + if (localContext) { + localSearch.draw(localResults, drawOp); + } + + // a11y patch Google search box + $('form.gsc-search-box').remove(); + + // setup the tab-like result filters + $('li:first-child', $resTabs).addClass(selCls); + $($resTabs).on('click', 'li', function(e) { + e.preventDefault(); + + if ($(this).hasClass(selCls)) { + return; + } + + var i = $(this).index(), + j = $(this).siblings('.' + selCls).index(), + $tab = $(this).closest(tabsSel), + $par = $(this).parents('.results-group'); + + $tab.removeClass(stateClsPfx + j); + $tab.addClass(stateClsPfx + i); + + $(this).siblings().removeClass(selCls); + $(this).addClass(selCls); + + if ($par.is(wrapperDir)) { + directorySearch.changeViewState(i); + } else if ($par.is(wrapperWeb)) { + $(activeSearch.root).closest(googleSel).slideUp(); + if (i === 0) { + activeSearch = localSearch; + } else { + activeSearch = unlSearch; + } + + activeSearch.execute(query); + } + }); + + // listen for the submit event + $(formSel).submit(function(e) { + e.preventDefault(); + + var q = $.trim($q.val()); + passiveQuery(q); + }); + + // issue an inital query + if (firstQ) { + passiveQuery(firstQ, false); + } + + // listen for message from parent frames + $(window).on('message', function(e) { + var oEvent = e.originalEvent, q; + + if (googleOrigin.test(oEvent.origin)) { + return; + } + + q = $.trim(oEvent.data); + passiveQuery(q); + }); + + $(window).on('popstate', function(e) { + var oEvent = e.originalEvent, + q = firstQ || ''; + + if (oEvent.state) { + q = oEvent.state.query || ''; + } + passiveQuery(q, false); + }); + }); + + }); + }; + + window['pf_getUID'] = function() { + return true; + }; +}(window)); diff --git a/www/less/search.less b/www/less/search.less new file mode 100644 index 0000000000000000000000000000000000000000..e9561916649e7a156da74918619879fb68dcce3f --- /dev/null +++ b/www/less/search.less @@ -0,0 +1,404 @@ +@charset "UTF-8"; + +@import "lib/lesshat.less"; + +@import "lib/breakpoints.less"; +@import "lib/colors.less"; +@import "lib/fonts.less"; + +// Template overrides +.embed #visitorChat, +#wdn_search { + display: none; +} + +#wdn_navigation_bar { + padding: 0; +} + +#search_results td { + border: 0; + padding: 0; +} + +// Input Groups +form .input-group { + display: table; + + > * { + display: table-cell; + .border-radius(0); + } + + .input-group-btn { + width: 1%; + vertical-align: middle; + + button { + font-size: 18px; + line-height: normal; + padding: 0.8em 1em; + margin: 0; + } + } + + input { + margin: 0; + } + + :first-child { + .border-radius(4px 0 0 4px); + } + + :last-child { + .border-bottom-right-radius(4px); + .border-top-right-radius(4px); + + button { + .border-bottom-left-radius(0); + .border-top-left-radius(0); + } + } +} + +#searchform { + text-align: center; + background: #38431b url(../images/050419.jpg) 50% 50% no-repeat; + .background-size(cover); + + .input-group { + margin: 0 auto; + max-width: 30em; + } +} + +#search_wrapper { + display: none; +} + +.results-group { + + &:hover { + background-color: #fff; + + .result-head { + background-color: @ui09; + } + } + + .result-head { + background-color: mix(@ui09, @page-background, 95%); + color: #fff; + position: relative; + + h2 { + color: inherit; + margin: 0; + } + } +} + +.result-tab { + color: @ui04; + margin: 0; + padding: 0; + list-style: none; + + li { + display: inline; + + &.selected { + color: #fff; + } + + a { + color: inherit; + border: 0; + } + + &:before { + content: '\b7\a0'; // middle-dot + space + } + + &:first-child:before { + content: none; + } + } + + &:after { + content: ''; + position: absolute; + border-style: solid; + border-width: 0 6px 6px; + border-color: transparent transparent #fff; + bottom: 0; + left: 0; + .transition(transform 400ms); + + .no-csstransforms & { + .transition(left 400ms); + } + + #directory_results & { + .translateX(2.95em); + + .no-csstransforms & { + left: 2.95em; + } + } + + #search_results & { + .translateX(4.95em); + + .no-csstransforms & { + left: 4.95em; + } + } + } + + &.state-1:after { + #directory_results & { + .translateX(8.95em); + + .no-csstransforms & { + left: 8.95em; + } + } + + #search_results & { + .translateX(10.35em); + + .no-csstransforms & { + left: 10.35em; + } + } + } + +} + +.search-set, .embed { + margin: 0; + background: mix(#fff, @page-background, 95%); +} + +.search-results { + .transition(opacity 400ms); + opacity: 0; + + &.active { + opacity: 1; + } + + h3 { + display: none; + } +} + +.results-group { + float: left; + width: 100%; +} + +#directory_results { + > * { + padding: 1.425em 9.375%; + } + + @media @bp2 { + width: 33.3333%; + } + + .embed & { + width: 40%; + } + +} + +#search_results { + > * { + padding: 1.425em 7.812%; + } + + @media @bp2 { + width: 66.6667%; + + .result-head { + border-right: 1px solid @ui09; + } + + .search-results { + border-right: 1px solid @ui02; + } + } + + .embed & { + width: 60%; + + .result-head { + border-right: 1px solid @ui09; + } + + .search-results { + border-right: 1px solid @ui02; + } + } +} + +.google-search { + display: none; +} + +// Directory Styles +#ppl_results { + h3, h4, .result_head { + display: none; + } + + .pfResult { + padding: 0; + list-style: none; + } + + .ppl_Sresult, .dep_result { + margin: 1em 0; + } + + .cInfo { + display: none; + } + + .overflow { + overflow: auto; + } + + .planetred_profile { + float: left; + border: 0; + max-width: 40px; + overflow: hidden; + } + + .recordDetails { + margin-left: 50px; + font-size: 0.75em; + line-height: 1.425; + .sans-serif-font(); + } + + .fn { + font-size: 2.3333em; + .brand-font(); + line-height: 1; + + * { + border: 0; + } + } + + .eppa, .organization-unit, .title, .tel { + margin-bottom: 0.178em; + } + + .eppa { + display: none; + } + + .student .eppa { + display: block; + } + + .tel > a { + display: block; + border: 0; + } + + .on-campus-dialing { + color: @light-neutral; + } +} + +// Google Styles +.gsc-control-cse, +.gsc-control-cse .gsc-table-result { + font-family: inherit; + font-size: inherit; +} + +.gsc-result { + + .gsc-webResult & { + border: 0; + padding: 0.75em 0; + } + + .gs-title { + height: 1.662em; + } +} + +.gs-result { + .gs-title, .gs-title * { + color: @brand; + text-decoration: none; + } + + a.gs-visibleUrl, .gs-visibleUrl { + color: @light-neutral; + } +} + +.gsc-result-info { + font-style: italic; + margin: 0 0 10px; + color: @ui08; +} + +.gsc-results { + + .gsc-cursor-box { + border-top: 1px solid @ui03; + padding: 1em 0 0; + margin-top: 1em; + .sans-serif-font(); + + .gsc-cursor-page { + border: 1px solid @ui03; + padding: 2px 8px; + margin-bottom: 1em; + min-width: 2.2em; + display: inline-block; + text-align: center; + text-decoration: none; + color: @brand; + } + + .gsc-cursor-current-page { + font-weight: normal; + color: @ui08; + border: 0; + } + } +} + +.gcsc-branding { + margin-bottom: 1.3333em; +} + +td.gcsc-branding-text { + font-style: italic; + width: auto; + + div.gcsc-branding-text { + text-align: left; + color: @ui08; + } +} + +td.gcsc-branding-text-name { + width: 100%; +} + +.gs-web-image-box img.gs-image, .gs-promotion-image-box img.gs-promotion-image { + max-width: 100%; + max-height: none; +} \ No newline at end of file diff --git a/www/searchCSS.css b/www/searchCSS.css deleted file mode 100644 index 49a129e0927ec1eb7c581af6bc59f3f2906d343a..0000000000000000000000000000000000000000 --- a/www/searchCSS.css +++ /dev/null @@ -1,172 +0,0 @@ -/* Google/Peoplefinder Styles */ - - -/** Search Box **/ -#searchform { - margin-bottom: 10px; -} -#searchform fieldset { - -} - -#searchform label { - display: none; -} -#searchform form { - background: #E9D78E; /* old browsers */ - background: -moz-linear-gradient(top, #E9D78E 0%, #DCC679 100%); /* firefox */ - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#E9D78E), color-stop(100%,#DCC679)); /* webkit */ - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#E9D78E', endColorstr='#DCC679',GradientType=0 ); /* ie */ - padding:13px; - border-radius:5px; - -moz-border-radius:5px; - -webkit-border-radius:5px; - width:100%; - overflow: auto; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} - -#searchform input.search-query { - border: 1px solid #8A7C47; - color: #5C5C5C; - font-size: 1.5em; - height: 31px; - padding: 2px 0 0 8px; - width: 70%; -} -#searchform input.search-button { - -moz-border-radius: 5px; - -webkit-border-radius: 5px; - -border-radius: 5px; - font-size: 1.5em; - padding:4px 10px; - background: #897B42; - border: 1px solid #BDAB61; - color: #FFFFFF; - cursor: pointer; -} - -@media (min-width: 480px) and (max-width: 599px) { - #maincontent .grid8 { - width: 49%; - margin-left: 0; /* It's the first column */ - } - #maincontent #directory_results.grid4 { - width: 49%; - clear: none; - margin-left: 2%; - } -} -@media (min-width: 600px) { - #maincontent .grid8 { - width: 65.78%; - margin-left: 0; /* It's the first column */ - } - #maincontent .grid4 { - width: 31.62%; - margin-left: 2.54%; - clear: none; - } -} -@media (min-width: 768px) { - -} - -/** Overridden directory styles **/ -#maincontent .recordDetails { - margin-left:8px; - max-width:155px; -} -#maincontent ul.pfResult li div.overflow { - cursor: auto; -} -#maincontent .pfResult a.cInfo { - font-size: 0.75em; - font-weight: bold; - text-transform: uppercase; - bottom: 0; -} -#maincontent .pfResult .fn, #maincontent .pfResult .fn a {font-size:12px; line-height:14px; min-height:14px;} -#maincontent .pfResult .on-campus-dialing {display:block;margin-top:-5px;} - -/** The Search results **/ -.google-results .gsc-control-cse, -.google-results .gsc-control-cse .gsc-table-result { - font-family: inherit; - font-size: 1em; -} -.google-results .gsc-search-box { - display: none; -} -.cse .gsc-control-cse, -.gsc-control-cse { - padding: 0; -} - -.google-results .gsc-control-cse .gs-result .gs-title, -.google-results .gsc-control-cse .gs-result .gs-title * { - font-size: 1.1em; - text-decoration: none; - color: #BA0000; -} - -.google-results .gsc-control-cse .gs-result .gs-title:hover, -.google-results .gsc-control-cse .gs-result .gs-title:hover * { - color: #EE0000; -} - -.google-results .gs-webResult div.gs-visibleUrl-long { - display: block; - color: #897B42; -} - -.google-results .gsc-results { - border-top: 1px solid #d0cece; -} - -.google-results .gsc-results .gsc-cursor-box { - border-top: 1px solid #e6e6e6; - padding-top: 20px; -} - -.google-results .gsc-webResult.gsc-result, -.google-results .gsc-results .gsc-imageResult { - border-top: 1px solid #e6e6e6; - border-bottom: 1px solid #d0cece; - background-color: #FFFFFF; - padding: 12px 5px; -} -.google-results .gsc-webResult.gsc-result:hover, -.google-results .gsc-imageResult:hover { - background-color: #ECF4F9; -} - -.google-results .gsc-results .gsc-cursor-box .gsc-cursor-page { - display: block; - float: left; - border: 1px solid #dadada; - padding: 2px 4px; - text-decoration: none; - color: #BA0000; -} -.google-results .gsc-results .gsc-cursor-box .gsc-cursor-page:hover { - background: #6e6e6e; - border: 1px solid #5e5e5e; - color: #fff; -} -.google-results .gsc-results .gsc-cursor-box .gsc-cursor-current-page { - border: none; - font-size: 22px; - padding: 2px 6px; - color: #3e3e3e; -} -.google-results .gsc-results .gsc-cursor-box .gsc-cursor-current-page:hover { - background: none; - border: none; - color: #3e3e3e; -} -.google-results .gcsc-branding { - clear: both; -} diff --git a/www/searchFunc.js b/www/searchFunc.js deleted file mode 100644 index 1ad1cf35fc1e86516d321c4ff6fb22aa6fe7aba5..0000000000000000000000000000000000000000 --- a/www/searchFunc.js +++ /dev/null @@ -1,186 +0,0 @@ - -// Load the Google Search AJAX API -google.load("search", "1"); - -function searchInit() { - UNL_Search.peoplefinderCache = new UNL_Search.Cache(); - - //Parse the querystring for q - var qs = window.location.search.substr(1); - var args = qs.split('&'); - UNL_Search.query = ""; - for (var i = 0; i < args.length; i++) { - var pair = args[i].split('='); - if (decodeURIComponent(pair[0]) == "q") { - if (pair.length == 2) { - UNL_Search.query = decodeURIComponent(pair[1].replace(/\+/g, ' ')); - } - break; - } - } - - var unl_search = new google.search.CustomSearchControl("015236299699564929946:nk1siew10ie"); - unl_search.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET); - unl_search.setSearchCompleteCallback(UNL_Search, UNL_Search.onSearchComplete); - unl_search.setSearchStartingCallback(UNL_Search, UNL_Search.onSearchStart); - - UNL_Search.unl_search = unl_search; - - drawOp = new google.search.DrawOptions(); - drawOp.enableSearchResultsOnly(); - - unl_search.draw('unl_results', drawOp); - - if (UNL_Search.do_local_search) { - var local_search = new google.search.CustomSearchControl(UNL_Search.local_search_context); - local_search.setResultSetSize('small'); - local_search.setSearchCompleteCallback(UNL_Search, UNL_Search.onSearchComplete); - local_search.draw('local_results', drawOp); - UNL_Search.local_search = local_search; - } - - WDN.loadJQuery(function() { - var $ = WDN.jQuery; - $('#search_q').attr('autocomplete', 'off').val(UNL_Search.query); - $('#searchform form').submit(function() { - var q = $.trim($('#search_q').val()); - UNL_Search.query = q; - UNL_Search.pfCancelFlag = false; - if (q !== '') { - unl_search.execute(q); - } else { - unl_search.cancelSearch(); - unl_search.clearAllResults(); - if (UNL_Search.do_local_search) { - local_search.cancelSearch(); - local_search.clearAllResults(); - } - UNL_Search.pfCancelFlag = true; - $('#ppl_results').empty(); - } - - return false; - }); - }); - - // Execute an inital search - if (UNL_Search.query) { - unl_search.execute(UNL_Search.query); - } -} - -//Attach search initializer to onLoad -google.setOnLoadCallback(searchInit, true); - - -// -// UNL_Search Namespace -// -if (typeof(UNL_Search) == "undefined") - UNL_Search = {}; - -UNL_Search.query = null; -UNL_Search.do_local_search = false; -UNL_Search.unl_search = null; -UNL_Search.local_search = null; -UNL_Search.local_search_context = null; -UNL_Search.peoplefinderCache = null; -UNL_Search.pfCancelFlag = false; - -//Caching Class -// -UNL_Search.Cache = {}; -UNL_Search.Cache = function() { - this.storage = new Object(); -}; - -UNL_Search.Cache.prototype.save = function(key, data) { - this.storage[key] = data; -}; - -UNL_Search.Cache.prototype.get = function (key) { - var val = null; - - if (this.storage[key] != null) { - val = this.storage[key]; - } - - return val; -}; - -UNL_Search.onSearchStart = function(control, searcher, query) { - UNL_Search.doPeoplefinderQuery(query); - if (UNL_Search.do_local_search) { - UNL_Search.local_search.execute(query); - } - UNL_Search.trackQuery(control, searcher, query); -}; - -UNL_Search.onSearchComplete = function(control, searcher) { - var $ = WDN.jQuery; - /* The more URL no longer works on google's host - if (searcher && searcher.cursor && searcher.cursor.pages.length >= 8) { - var $moreDiv = $("<div />").html('More…').addClass('gsc-cursor-page').click(function() { - window.location.href = searcher.cursor.moreResultsUrl; - return false; - }); - $('.gsc-cursor-box .gsc-cursor', control.root).append($moreDiv); - } - */ - - if (searcher.cursor && searcher.cursor.estimatedResultCount) { - var $resultHead = $("<div />").addClass('result_head').text('About ' + searcher.cursor.estimatedResultCount + ' results'); - $('.result_head', control.root).remove(); - $('.gsc-results', control.root).before($resultHead); - } - - if (mobileSearch) { //if we're doing a mobile search, rewrite link URLs to use mobile proxy - $('a.gs-title', control.root).each(function() { - $(this).attr('href', function(i, val) { - return 'http://m.unl.edu/?view=proxy&u=' + encodeURIComponent(val); - }) - }); - } -} - -UNL_Search.trackQuery = function(control, searcher, query) { - var loc = document.location; - var url = [ - loc.pathname, - loc.search, - loc.search ? '&' : '?', - 'q=', - encodeURIComponent(query) - ].join(''); - - try { - if (typeof WDN.analytics !== 'undefined') { - WDN.analytics.callTrackPageview(url); - } else { - _gaq.push(["_trackPageview", url]); - } - } catch (e) { - // do nothing - } -}; - -UNL_Search.doPeoplefinderQuery = function (val) { - var cacheData = this.peoplefinderCache.get(val) - if (cacheData) { - this.handlePeoplefinderResults(cacheData); - } else { - var pointer = this; - WDN.loadJQuery(function(){ - WDN.get("http://directory.unl.edu/service.php?q=" + encodeURIComponent(val), null, function(data, textStatus) { - pointer.peoplefinderCache.save(val, data); - UNL_Search.handlePeoplefinderResults(data); - }); - }); - } -}; - -UNL_Search.handlePeoplefinderResults = function (peoplefinderText) { - if (!UNL_Search.pfCancelFlag) { - document.getElementById("ppl_results").innerHTML = peoplefinderText; - } -}; diff --git a/www/templates/breadcrumbs.tpl.php b/www/templates/breadcrumbs.tpl.php new file mode 100644 index 0000000000000000000000000000000000000000..f1d3f92a37eba6926c6e87fc93b901a861d9f0e5 --- /dev/null +++ b/www/templates/breadcrumbs.tpl.php @@ -0,0 +1,4 @@ +<ul> + <li><a href="http://www.unl.edu/" title="University of Nebraska–Lincoln">UNL</a></li> + <li>Search</li> +</ul> diff --git a/www/templates/embed-debug.tpl.php b/www/templates/embed-debug.tpl.php new file mode 100644 index 0000000000000000000000000000000000000000..38a9a07bc1ca15d0ebedb4d16b6db700e70cf8e4 --- /dev/null +++ b/www/templates/embed-debug.tpl.php @@ -0,0 +1,41 @@ +<!DOCTYPE html> +<!--[if IEMobile 7 ]><html class="ie iem7 embed"><![endif]--> +<!--[if lt IE 7 ]><html class="ie ie6 embed" lang="en"><![endif]--> +<!--[if IE 7 ]><html class="ie ie7 embed" lang="en"><![endif]--> +<!--[if IE 8 ]><html class="ie ie8 embed" lang="en"><![endif]--> +<!--[if (gte IE 9)|(gt IEMobile 7) ]><html class="ie embed" lang="en"><![endif]--> +<!--[if !(IEMobile) | !(IE)]><!--><html class="embed" lang="en"><!--<![endif]--> +<head> + <meta charset="utf-8" /> + <title>UNL Search | University of Nebraska–Lincoln</title> +<!-- Load Cloud.typography fonts --> + <link rel="stylesheet" type="text/css" href="//cloud.typography.com/7717652/616662/css/fonts.css" /> +<!-- Load our base CSS file --> +<!--[if gte IE 9]><!--> + <link rel="stylesheet" type="text/css" media="all" href="/wdn/templates_4.0/css/all.css" /> +<!--<![endif]--> + +<!-- Load the template JS file --> + <script type="text/javascript" src="/wdn/templates_4.0/scripts/compressed/all.js" id="wdn_dependents"></script> + +<!--[if lt IE 9]> + <link rel="stylesheet" type="text/css" media="all" href="/wdn/templates_4.0/css/all_oldie.css" /> + <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> +<![endif]--> + +<!-- For all IE versions, bring in the tweaks --> +<!--[if IE]> + <link rel="stylesheet" type="text/css" media="all" href="/wdn/templates_4.0/css/ie.css" /> +<![endif]--> + <?php echo $head ?> +</head> +<body> + <div id="wdn_wrapper"> + <div id="wdn_content_wrapper"> + <div id="maincontent" class="wdn-main"> + <?php echo $maincontent ?> + </div> + </div> + </div> +</body> +</html> diff --git a/www/templates/embed.tpl.php b/www/templates/embed.tpl.php new file mode 100644 index 0000000000000000000000000000000000000000..03da953268d63366afc321966bd156eba1f3daeb --- /dev/null +++ b/www/templates/embed.tpl.php @@ -0,0 +1,41 @@ +<!DOCTYPE html> +<!--[if IEMobile 7 ]><html class="ie iem7 embed"><![endif]--> +<!--[if lt IE 7 ]><html class="ie ie6 embed" lang="en"><![endif]--> +<!--[if IE 7 ]><html class="ie ie7 embed" lang="en"><![endif]--> +<!--[if IE 8 ]><html class="ie ie8 embed" lang="en"><![endif]--> +<!--[if (gte IE 9)|(gt IEMobile 7) ]><html class="ie embed" lang="en"><![endif]--> +<!--[if !(IEMobile) | !(IE)]><!--><html class="embed" lang="en"><!--<![endif]--> +<head> + <meta charset="utf-8" /> + <title>UNL Search | University of Nebraska–Lincoln</title> +<!-- Load Cloud.typography fonts --> + <link rel="stylesheet" type="text/css" href="//cloud.typography.com/7717652/616662/css/fonts.css" /> +<!-- Load our base CSS file --> +<!--[if gte IE 9]><!--> + <link rel="stylesheet" type="text/css" media="all" href="//unlcms.unl.edu/wdn/templates_4.0/css/all.css" /> +<!--<![endif]--> + +<!-- Load the template JS file --> + <script type="text/javascript" src="//unlcms.unl.edu/wdn/templates_4.0/scripts/compressed/all.js?dep=$DEP_VERSION$" id="wdn_dependents"></script> + +<!--[if lt IE 9]> + <link rel="stylesheet" type="text/css" media="all" href="//unlcms.unl.edu/wdn/templates_4.0/css/all_oldie.css" /> + <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> +<![endif]--> + +<!-- For all IE versions, bring in the tweaks --> +<!--[if IE]> + <link rel="stylesheet" type="text/css" media="all" href="//unlcms.unl.edu/wdn/templates_4.0/css/ie.css" /> +<![endif]--> + <?php echo $head ?> +</head> +<body> + <div id="wdn_wrapper"> + <div id="wdn_content_wrapper"> + <div id="maincontent" class="wdn-main"> + <?php echo $maincontent ?> + </div> + </div> + </div> +</body> +</html> diff --git a/www/templates/google-results.tpl.php b/www/templates/google-results.tpl.php new file mode 100644 index 0000000000000000000000000000000000000000..38ef9b0154291f158cc00c4ae3e20fb15381834c --- /dev/null +++ b/www/templates/google-results.tpl.php @@ -0,0 +1,4 @@ +<?php if (isset($title)): ?> +<h3><?php echo $title ?> Results</h3> +<?php endif; ?> +<div id="<?php echo isset($id) ? $id : '' ?>" class="google-results"></div> diff --git a/www/templates/search-form.tpl.php b/www/templates/search-form.tpl.php new file mode 100644 index 0000000000000000000000000000000000000000..1302a3a1487da5852b0246eb2c954c464b4c7efa --- /dev/null +++ b/www/templates/search-form.tpl.php @@ -0,0 +1,11 @@ +<div id="searchform" class="wdn-band"> + <form action="./" method="get" class="wdn-inner-wrapper"> + <div class="input-group"> + <input type="text" value="" name="q" id="search_q" title="Search Query" placeholder="e.g., Herbert Husker, Ph.D." /> + <span class="input-group-btn"><button class="button wdn-icon-search" title="Search" type="submit"></button></span> + </div> + <?php if (!empty($local_results)): ?> + <input type="hidden" name="u" value="<?php echo htmlentities($_GET['u'], ENT_QUOTES) ?>" /> + <?php endif; ?> + </form> +</div> diff --git a/www/templates/search-results.tpl.php b/www/templates/search-results.tpl.php new file mode 100644 index 0000000000000000000000000000000000000000..b0deffb74bed504a0d12e769e49b562d4b03ce79 --- /dev/null +++ b/www/templates/search-results.tpl.php @@ -0,0 +1,39 @@ +<section class="wdn-band" id="search_wrapper"> + <div class="<?php if (!$isEmbed): ?>wdn-inner-wrapper wdn-inner-padding-sm<?php endif; ?>"> + + <div class="wdn-grid-set search-set"> + + <div id="search_results" class="results-group"> + <div class="result-head"> + <h2>UNL Web</h2> + <ul class="result-tab"> + <?php if (!empty($local_results)): ?> + <li><a href="#">This unit</a></li> + <?php endif; ?> + <li><a href="#">All of UNL</a></li> + </ul> + </div> + <div class="search-results"> + <?php echo $local_results ?> + <?php renderTemplate('templates/google-results.tpl.php', array( + 'title' => 'All of UNL', + 'id' => 'unl_results', + )) ?> + </div> + </div> + + <div id="directory_results" class="results-group"> + <div class="result-head"> + <h2>UNL Directory</h2> + <ul class="result-tab"> + <li><a href="#">People</a></li> + <li><a href="#">Departments</a></li> + </ul> + </div> + <div id="ppl_results" class="search-results"></div> + </div> + + </div> + + </div> +</section> \ No newline at end of file