Changeset 347 in t29-www
- Timestamp:
- Mar 6, 2013, 3:58:15 AM (10 years ago)
- Files:
-
- 2 added
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
de/details1.php
r284 r347 9 9 <h2><?php print $titel; ?></h2> 10 10 11 <table width="100%" border="0" cellpadding="0" cellspacing="1" >11 <table width="100%" border="0" cellpadding="0" cellspacing="1" class="t29-details"> 12 12 <colgroup> 13 13 <col class="middle" /> <!-- middle-Klasse nicht --> -
de/details2.php
r284 r347 8 8 <h2><?php print $titel; ?></h2> 9 9 10 <table width="100%" border="0" cellpadding="0" cellspacing="1" >10 <table width="100%" border="0" cellpadding="0" cellspacing="1" class="t29-details"> 11 11 <colgroup> 12 12 <col class="middle" /> <!-- middle-Klasse nicht --> -
de/navigation.xml
r342 r347 24 24 </ul> 25 25 </li> 26 <li class="has-submenu"><a href="/de/lernprojekte/ #DUMME-VERLINKUNG">Projekte</a>26 <li class="has-submenu"><a href="/de/lernprojekte/">Projekte</a> 27 27 <ul class="u2"> 28 28 <li class="has-submenu"><a seiten_id="lernprojekte" class="show-rel-next" href="/de/lernprojekte/">Lernprojekte</a> … … 58 58 <ul class="u1"> 59 59 <li class="guide-only start"><a href="/de/">Start</a></li> 60 <li><a href="/de/rechnertechnik/elektro-mechanik.php #DUMME-VERLINKUNG">Computer History</a>60 <li><a href="/de/rechnertechnik/elektro-mechanik.php">Computer History</a> 61 61 <ul class="u2"> 62 62 <li><a seiten_id="elektro-mechanik" href="/de/rechnertechnik/elektro-mechanik.php">Mechanische Rechenmaschinen</a> … … 66 66 </ul> 67 67 </li> 68 <li><a href="/de/rechnertechnik/lochkarten-edv.php #DUMME-VERLINKUNG">Lochkarten-EDV und gross-Computer</a>68 <li><a href="/de/rechnertechnik/lochkarten-edv.php">Lochkarten-EDV und gross-Computer</a> 69 69 <ul class="u3"> 70 70 <li><a seiten_id="lochkarten" href="/de/rechnertechnik/lochkarten-edv.php" title="Lochkartengeräte">Lochkartengeräte und Peripherie</a></li> … … 124 124 </ul> 125 125 </li> 126 <li><a href="/de/rechnertechnik/elektronenroehren.php #DUMME-VERLINKUNG" title="Tischrechner mit Elektronenröhren">Elektronische Tischrechner</a>126 <li><a href="/de/rechnertechnik/elektronenroehren.php" title="Tischrechner mit Elektronenröhren">Elektronische Tischrechner</a> 127 127 <ul class="u3"> 128 128 <li><a seiten_id="elektronenroehren" href="/de/rechnertechnik/elektronenroehren.php" title="Tischrechner mit Röhren">mit Röhren</a></li> … … 177 177 </ul> 178 178 </li> 179 <li><a href="/de/kommunikationstechnik/rundfunk.php #DUMME-VERLINKUNG">Kommunikations-technik</a>179 <li><a href="/de/kommunikationstechnik/rundfunk.php">Kommunikations-technik</a> 180 180 <ul class="u2"> 181 181 <li><a seiten_id="rundfunk" href="/de/kommunikationstechnik/rundfunk.php">Rundfunk</a> … … 204 204 </ul> 205 205 </li> 206 <li><a href="/de/kommunikationstechnik/messtechnik.php #DUMME-VERLINKUNG">Weitere Themen</a>206 <li><a href="/de/kommunikationstechnik/messtechnik.php">Weitere Themen</a> 207 207 <ul class="u2"> 208 208 <li><a seiten_id="messtechnik" href="/de/kommunikationstechnik/messtechnik.php">Mess- und Experimentaltechnik</a></li> -
de/news.php
r346 r347 26 26 link: "#Juli_2012" 27 27 28 -29 30 28 MENU; 31 29 // ende der menue-Eintraege -
de/suche.php
r284 r347 10 10 11 11 require "../lib/technikum29.php"; 12 13 12 // Todo: add interlang link from page. needs some kind of 14 13 // callback 15 14 ?> 16 <h2>Suchen</h2> 17 <p>Hilfe zur Suchfunktion 15 <h2>Suche</h2> 16 <?php 17 $search->google_search_snippet(); 18 ?> 19 <!-- 18 20 <p>Suchfeld 19 21 <?php if(isset($_GET['q'])) { ?> … … 21 23 <p>... 22 24 <?php } ?> 25 --> -
en/details1.php
r296 r347 9 9 <h2><?php print $titel; ?></h2> 10 10 11 <table width="100%" border="0" cellpadding="0" cellspacing="1" >11 <table width="100%" border="0" cellpadding="0" cellspacing="1" class="t29-details"> 12 12 <colgroup> 13 13 <col class="middle"> -
en/details2.php
r296 r347 8 8 <h2><?php print $titel; ?></h2> 9 9 10 <table width="100%" border="0" cellpadding="0" cellspacing="1" >10 <table width="100%" border="0" cellpadding="0" cellspacing="1" class="t29-details"> 11 11 <colgroup> 12 12 <col class="middle"> -
en/navigation.xml
r325 r347 21 21 </ul> 22 22 </li> 23 <li class="has-submenu"><a href="/en/development-projects.php #DUMME-VERLINKUNG">Projects</a>23 <li class="has-submenu"><a href="/en/development-projects.php">Projects</a> 24 24 <ul class="u2"> 25 25 <li class="has-submenu"><a seiten_id="lernprojekte" href="/en/study-projects.php">Study projects</a></li> … … 50 50 </ul> 51 51 </li> 52 <li><a href="/en/computer/punchcard.php #DUMME-VERLINKUNG">Punch card computing</a>52 <li><a href="/en/computer/punchcard.php">Punch card computing</a> 53 53 <ul class="u3"> 54 54 <li><a seiten_id="lochkarten" href="/en/computer/punchcard.php" title="Punchers and Periphery">Punchers</a></li> … … 109 109 </ul> 110 110 </li> 111 <li><a href="/en/computer/electron-tubes.php #DUMME-VERLINKUNG">Electronical desk calculators</a>111 <li><a href="/en/computer/electron-tubes.php">Electronical desk calculators</a> 112 112 <ul class="u3"> 113 113 <li><a seiten_id="elektronenroehren" href="/en/computer/electron-tubes.php">with electron tubes</a></li> … … 161 161 </ul> 162 162 </li> 163 <li><a href="/en/communication/broadcasting.php #DUMME-VERLINKUNG">Communication Technology</a>163 <li><a href="/en/communication/broadcasting.php">Communication Technology</a> 164 164 <ul class="u2"> 165 165 <li><a seiten_id="rundfunk" href="/en/communication/broadcasting.php">Broadcasting</a> … … 188 188 </ul> 189 189 </li> 190 <li><a href="/en/communication/measurement.php #DUMME-VERLINKUNG">Miscellaneous</a>190 <li><a href="/en/communication/measurement.php">Miscellaneous</a> 191 191 <ul class="u2"> 192 192 <li><a seiten_id="messtechnik" href="/en/communication/measurement.php">Measurement and Experimental technology</a></li> -
en/search.php
r287 r347 3 3 $version = '$Id$'; 4 4 $titel = 'Search'; 5 5 $dynamischer_inhalt = true; 6 7 require "../lib/search.php"; 8 $search = new t29Search(); 9 $search->page_handler(); 10 6 11 require "../lib/technikum29.php"; 7 12 ?> 8 13 <h2>Search</h2> 9 <p>Search options and help 14 <?php 15 $search->google_search_snippet(); 16 ?> 17 <!-- 10 18 <p>Search field 11 19 <?php if(isset($_GET['q'])) { ?> … … 13 21 <p>... 14 22 <?php } ?> 23 --> -
lib/host.php
r343 r347 22 22 public $hostname = "undefined"; 23 23 24 25 24 /** 26 25 * Factory for creating a t29Host instance automatically … … 37 36 if(class_exists(self::webroot_local_host_classname)) { 38 37 $x = self::webroot_local_host_classname; 39 return new $x; 38 $host = new $x; 39 $host->setup(); 40 return $host; 40 41 } else { 41 42 print "Warning: Hostfile $hostfile does not contain class ".self::webroot_local_host_classname."\n"; … … 47 48 case 'heribert': 48 49 case 'localhost': 49 return new t29HeribertHost; 50 $localhost = new t29HeribertHost; 51 $localhost->setup(); 52 return $localhost; 50 53 } 51 54 52 return new t29PublicHost; 55 $publichost = new t29PublicHost; 56 $publichost->setup(); 57 return $publichost; 58 } 59 60 /** 61 * A constructing method which is always called by the t29Host::detect() factory. 62 * It does some general stuff. 63 * Of course you can always write your own setup() class - it's just your __constructor. 64 * The constructor will of course be called before the setup() method. 65 **/ 66 function setup() { 67 $this->is_rewriting_host = isset($_SERVER[self::env_hidesuffix_name]); 53 68 } 54 69 55 70 function check_url_rewrite() { 56 if( isset($_SERVER[self::env_hidesuffix_name])) {71 if($this->is_rewriting_host) { 57 72 $path = $_SERVER['REQUEST_URI']; 58 $newpath = preg_replace("/\.(php|shtml?)$/i", '',$path);73 $newpath = $this->rewrite_link($path); 59 74 if($path != $newpath) { 60 75 header('HTTP/1.1 301 Moved Permanently'); … … 67 82 68 83 public function __toString() { 69 return 't29v6/host:'.$this->hostname; 84 return 't29v6/'.$this->hostname; 85 } 86 87 function rewrite_link($link_target) { 88 // rewrite link if neccessary. This function will be called hundreds of times 89 // while rendering a page, rewriting all links found. 90 if($this->is_rewriting_host) { 91 $new_target = preg_replace('/\.(?:php|shtml?)([#?].+)?$/i', '\\1', $link_target); 92 return $new_target; 93 } else { 94 // just the identity function 95 return $link_target; 96 } 97 98 } 99 100 function get_shorthand_link_returner() { 101 $t = $this; 102 return function($link_target)use($t) { return $t->rewrite_link($link_target); }; 70 103 } 71 104 -
lib/logging.php
r299 r347 89 89 function print_all($ul_classes='') { 90 90 // causal printing function. Flushes entries afterwards! 91 print "<ul class='$ul_classes'>"; 91 // if $ul_classes is given, will print a list around 92 if($ul_classes) 93 print "<ul class='$ul_classes'>"; 92 94 foreach($this->entries as $entry) { 93 95 printf('<li class="%s">%s</li>'.PHP_EOL, $entry[0], $entry[1]); 94 96 } 95 print "</ul>";97 if($ul_classes) print "</ul>"; 96 98 $this->entries = array(); // flush entries! 97 99 } 98 100 99 101 // convenience functions 100 public function FATAL($line, $args = self::NO_ARGUMENTS){ 101 $this->log($line, self::FATAL, $args); 102 } 103 104 public function INFO($line, $args = self::NO_ARGUMENTS){ 105 $this->log($line, self::INFO, $args); 106 } 107 108 public function DEBUG($line, $args = self::NO_ARGUMENTS){ 109 $this->log($line, self::INFO, $args); 110 } 102 public function FATAL($line, $args = self::NO_ARGUMENTS) { $this->log($line, self::FATAL, $args); } 103 public function INFO($line, $args = self::NO_ARGUMENTS) { $this->log($line, self::INFO, $args); } 104 public function DEBUG($line, $args = self::NO_ARGUMENTS) { $this->log($line, self::DEBUG, $args); } 105 public function WARN($line, $args = self::NO_ARGUMENTS) { $this->log($line, self::WARN, $args); } 111 106 112 107 } // class -
lib/menu.php
r301 r347 7 7 8 8 require_once dirname(__FILE__).'/messages.php'; 9 require_once dirname(__FILE__).'/logging.php'; 9 10 10 11 class t29Menu { 11 12 public $conf; 12 13 public $xml; 14 public $log; // just for convenience 13 15 14 16 // Bevor es eine ordentliche Dev-Moeglichkeit gibt: Der magische … … 26 28 function __construct($conf_array) { 27 29 $this->conf = $conf_array; 30 $this->log = t29Log::get(); // just for convenience 28 31 29 32 // create a message object if not given … … 70 73 if(!array_reduce(array_map(function($x) use ($fields,$e){ return isset($e[$x]); }, $fields), 71 74 function($a,$b){ return $a && $b;}, true)) { 72 $li = "<li>Fehler in Formatierung!"; 75 $li = "<li><a href='#'>Fehler in Formatierung!<em>Dieser Menüeintrag ist falsch formatiert</em></a></li>"; 76 $this->log->WARN("<h5>Neuigkeiten-Menü: Fehler in Formatierung</h5><p>Ein Eintrag im Neuigkeiten-Menü ist falsch formatiert."); 73 77 } else { 74 78 $url = ($e['link']{0} == '#' ? $this->conf['lang_path'].'/'.self::news_file : '').$e['link']; … … 205 209 /** 206 210 * @arg $xpath_menu_selection one of the horizontal_menu / sidebar_menu consts. 207 **/ 208 function print_menu($xpath_menu_selection) { 211 * @arg $host Instance of t29Host which can be used for link rewriting if given. 212 **/ 213 function print_menu($xpath_menu_selection, $host=null) { 209 214 if($this->xml_is_defective()) { 210 215 print "The Menu file is broken."; … … 254 259 $uld->parentNode->removeChild($uld); 255 260 } 261 } 262 263 // alle Links mittels t29Host umwandeln (idR .php-Endung entfernen), 264 // falls erwuenscht 265 if($host) { 266 $links = $xml->xpath("//a[@href]"); 267 foreach($links as $a) 268 $a['href'] = $host->rewrite_link($a['href']); 256 269 } 257 270 -
lib/messages.php
r335 r347 146 146 'head-rel-prev' => array('Zur vorherigen Seite (%s)', 'Previous Page (%s)'), 147 147 'head-rel-next' => array('Zur folgenden Seite (%s)', 'Next Page (%s)'), 148 'head-rel-interlang' => array('Deutsche Version dieser Seite (%s)', 'English Version of this page (%s)'),148 //'head-rel-interlang' => array('Deutsche Version dieser Seite (%s)', 'English Version of this page (%s)'), 149 149 150 150 // used in /shared/js/modules/heading_links.js … … 160 160 'js-piwik-url-prefix' => '/logs/piwik/', 161 161 'js-piwik-siteid' => '1', 162 163 // interlang.js 164 'js-interlang-notify-heading' => array("This page is also avaliable in English", "Diese Website gibt es auch auf Deutsch"), 165 'js-interlang-notify-text' => array("Do you want to switch to the English version <i>%s</i>?", "Möchtest du die deutschsprachige Seite <i>%s</i> lesen?"), 162 166 ); 163 167 } -
lib/search.php
r290 r347 7 7 8 8 function page_handler() { 9 if(!isset($_GET['action'])) 9 if(!isset($_GET['action'])) { 10 // This is an "ordinary" page call. 11 // do some organisation stuff and return. 12 $this->setup_interlang(); 10 13 return; 14 } 11 15 $action = $_GET['action']; 12 16 if(array_key_exists($action, self::$actions)) { … … 40 44 exit; 41 45 } 46 47 /** 48 * Since the search isn't denoted in the navigation.xml, the interlanguage 49 * system doesn't work. This method fixes that by talking with t29Template. 50 * This must be done after including technikum29.php. 51 **/ 52 function setup_interlang() { 53 $GLOBALS['template_callback'] = function($template) { 54 // Interlanguage Links: Defakto nicht cachebar da das Cachesystem fuer dynamische Seiten 55 // den header/footer cacht und damit auch die Interlang-Eintraege. Links wie 56 // "/de/suche.php"+$_SERVER['QUERY_STRING'] funktionieren daher nicht dynamisch, 57 // da der Head ja gecacht wird. Ist ein nicht so wichtiges FIXME. 58 $template->set_interlang_link("de", "/de/suche.php", "Suche"); 59 $template->set_interlang_link("en", "/en/search.php", "Search"); 60 }; 61 } 62 63 function google_search_snippet() { 64 ?> 65 <script> 66 (function() { 67 var cx = '010117769997860607363:ovbd9zjaaps'; 68 var gcse = document.createElement('script'); 69 gcse.type = 'text/javascript'; 70 gcse.async = true; 71 gcse.src = (document.location.protocol == 'https' ? 'https:' : 'http:') + 72 '//www.google.com/cse/cse.js?cx=' + cx; 73 var s = document.getElementsByTagName('script')[0]; 74 s.parentNode.insertBefore(gcse, s); 75 })(); 76 </script> 77 <gcse:search></gcse:search> 78 <?php 79 } 42 80 } -
lib/template.php
r343 r347 1 1 <?php 2 2 /** 3 * technikum29v6 Page Template 3 * technikum29v6 Page Template. 4 * Initially written 08.01.2012, Sven Koeppel 5 * 6 * This file contains the t29v6 HTML5 template (header, footer, structure, ...). 4 7 * 5 8 * Global vars: … … 18 21 public $log; // lightweight logging system 19 22 23 /** 24 * The t29Template constructor. 25 * 26 * The template class is embedded into the t29v6 class framework. It 27 * uses t29Log for logging, t29Messages for any localisation strings, 28 * t29RessourceLoader for resolving URLs for CSS and JavaScript ressources. 29 * t29Menu is a helper class considered for parsing and extracting 30 * any relations between pages and the menu from navigation.xml. 31 * 32 * From the t29v6 entrypoint, technikum29.php, this class is instanced 33 * at the end, if no caching has worked. That call looks like 34 * 35 * $template = new t29Template($GLOBALS); 36 * 37 * which means that our configuration $this->conf will be set up from the 38 * former global namespace. For correct working, at least some global vars 39 * like 40 * $lib 41 * $lang 42 * $host 43 * ... 44 * are considered as present (see above for a list). 45 * 46 **/ 20 47 function __construct($conf_array) { 21 48 $this->conf = $conf_array; … … 24 51 require_once $this->conf['lib'].'/logging.php'; 25 52 $this->log = t29Log::get(); 26 53 27 54 // create a menu: 28 55 require_once $this->conf['lib'].'/menu.php'; … … 40 67 41 68 // fill up configuration 42 69 43 70 // optional html headers which can be filled by hooks or parts 44 71 if(!isset($this->conf['header_prepend'])) 45 72 $this->conf['header_prepend'] = array(); // list 46 73 47 // as t29Host for configuration fillupfillup74 // ask t29Host for configuration fillup 48 75 $this->conf['host']->fillup_template_conf($this->conf); 49 76 … … 79 106 $this->javascript_config[$key] = $this->conf[$key]; 80 107 81 // get all kind of relations 108 // get all kind of relations. Pages can afterwards be overwritten with t29Template 109 // methods (see below). 82 110 $this->page_relations = $this->menu->get_page_relations(); 83 111 $this->interlang_links = $this->menu->get_interlanguage_link(); … … 100 128 $this->conf['html_title'] = $this->conf['seiten_link'] . ' - '; 101 129 $this->conf['html_title'] .= $this->msg->_('html-title'); 130 131 // Unfortunately mostly a t29Template instance won't be visible to a page 132 // handled by technikum29.php. Therefore there is this small "future" trick: 133 if(isset($this->conf['template_callback'])) 134 $this->conf['template_callback']($this); 135 // Now you can use code like 136 // $template_callback = function($template) { 137 // $template->set_page_relation("next", "/de/example", "foo"); 138 // $template->menu->... read and modify anything ... etc 139 // } 140 // so the callback function is called at the end of the template constructor. 141 // This can be considered whenever giving a static configuration variables 142 // is not enough. 143 } 144 145 /** 146 * Overwrite the page relations given by the t29Menu. 147 * By setting $relation to "prev" or "next", you can overwrite the 148 * relations which has been set up by construction by $this->menu->get_page_relations(). 149 * Thus any page can state any relations. For sure they are only one-directional, 150 * the other pages don't know anything about such relations because no vice-versa 151 * introspection can be done. 152 **/ 153 function set_page_relation($relation, $href, $label) { 154 // good values for $relation are: "prev", "next". 155 // Link is composed as <a href="$href">$label</a>. 156 $this->page_relations[$relation] = t29Menu::dom_new_link($href, $label); 157 print_r($this->page_relations); 158 } 159 160 /** 161 * Overwrite the interlanguage link list given by the t29Menu. 162 * This does the same as set_page_relation() only for interlanguage links. 163 **/ 164 function set_interlang_link($lang, $href, $label) { 165 // good values for $lang are: "de", "en". 166 // Link is composed as <a href="$href">$label</a>. 167 $this->interlang_links[$lang] = t29Menu::dom_new_link($href, $label); 102 168 } 103 169 … … 133 199 134 200 function print_header() { 135 $p = $this->msg->get_shorthand_printer(); 136 $_ = $this->msg->get_shorthand_returner(); 201 $p = $this->msg->get_shorthand_printer(); // t29Messages gettext printer 202 $_ = $this->msg->get_shorthand_returner(); // t29Messages gettext 203 $href = $this->conf['host']->get_shorthand_link_returner(); // t29Host link rewriter 137 204 ?> 138 205 <!doctype html> … … 141 208 <meta charset="utf-8"> 142 209 <title><?php echo $this->conf['html_title']; ?></title> 143 <meta name="description" content="Produziert am 08.01.2012">144 210 <meta name="author" content="technikum29-Team"> 145 211 <meta name="generator" content="<?php print $this->conf['host']; ?>"> … … 155 221 156 222 <?php 157 foreach(array_merge(array("first" => t29Menu::dom_new_link($this->conf['lang_path'], $_('head-rel-first'))), 158 $this->page_relations) as $rel => $a) { 223 foreach(array_merge( 224 array("first" => t29Menu::dom_new_link($this->conf['lang_path'], $_('head-rel-first'))), 225 $this->page_relations 226 ) as $rel => $a) { 159 227 if($rel == 'start') continue; // not in standard 160 228 printf("\n <link rel='%s' href='%s' title='%s' />", 161 $rel, $ a['href'], sprintf($_('head-rel-'.$rel), $this->relational_link_to_string($a))229 $rel, $href($a['href']), sprintf($_('head-rel-'.$rel), $this->relational_link_to_string($a)) 162 230 ); 163 231 } 164 232 ?> 165 233 166 <link rel="copyright" href="<?php $ p('footer-legal-file'); ?>" title="<?php $p('footer-legal-link'); ?>">167 <link rel="search" type="application/opensearchdescription+xml" href="<?php $ p('topnav-search-page'); print '?action=opensearch-desc&lang='.$this->conf['lang']; ?>" title="<?php $p('opensearch-desc'); ?>">234 <link rel="copyright" href="<?php $href($p('footer-legal-file')); ?>" title="<?php $href($p('footer-legal-link')); ?>"> 235 <link rel="search" type="application/opensearchdescription+xml" href="<?php $href($p('topnav-search-page')); print '?action=opensearch-desc&lang='.$this->conf['lang']; ?>" title="<?php $p('opensearch-desc'); ?>"> 168 236 <?php 169 237 // print interlanguage links for all languages except the active one … … 171 239 if($lang != $this->conf['lang'] && !is_null($a)) { 172 240 printf('<link rel="alternate" href="%s" hreflang="%s" title="%s">', 173 $ a['href'], $lang, sprintf($_('head-rel-interlang', $lang),$a)241 $href($a['href']), $lang, $this->relational_link_to_string($a) 174 242 ); 175 243 } … … 190 258 <div id="background-color-container"><!-- helper --> 191 259 <section class="main content" role="main" id="content"> 192 < ?php193 if(!$this->log->is_empty()) {194 print '<div class="errorpane">';195 196 print '</div>';197 }260 <ul class="messages panel <?php if($this->log->is_empty()) echo 'empty'; ?> nolist"> 261 <?php 262 // This prints out error messages collected by the log only until this point 263 $this->log->print_all(); 264 // All log entries generated until final processing will be flushed out at the 265 // end; a userspace javascript helper will then move them here. 198 266 ?> 267 </ul> 199 268 <!--<header class="teaser"> 200 269 <h2 id="pdp8L">Wissenschaftliche Rechner und Minicomputer</h2> … … 206 275 207 276 function print_footer() { 208 $p = $this->msg->get_shorthand_printer(); 209 $_ = $this->msg->get_shorthand_returner(); 277 $p = $this->msg->get_shorthand_printer(); // t29Messages gettext printer 278 $_ = $this->msg->get_shorthand_returner(); // t29Messages gettext 279 $href = $this->conf['host']->get_shorthand_link_returner(); // t29Host link rewriter 280 210 281 ?> 211 282 <!-- end content --> … … 215 286 <h2 class="visuallyhidden"><?php $p("sidebar-h2-tour"); ?></h2> 216 287 <nav class="side"> 217 <?php $this->menu->print_menu(t29Menu::sidebar_menu ); ?>288 <?php $this->menu->print_menu(t29Menu::sidebar_menu, $this->conf['host']); ?> 218 289 </nav> 219 290 <!-- menu changing buttons are made with javascript --> … … 227 298 <h2 class="visuallyhidden"><?php $p("sidebar-h2-mainnav"); ?></h2> 228 299 <nav class="horizontal"> 229 <?php $this->menu->print_menu(t29Menu::horizontal_menu ); ?>300 <?php $this->menu->print_menu(t29Menu::horizontal_menu, $this->conf['host']); ?> 230 301 </nav> 231 302 <nav class="top"> … … 250 321 printf("\t\t\t\t<li%s><a href='%s' title='%s'>%s</a></li>\n", 251 322 (empty($class) ? '' : " class='$class'"), 252 $ a['href'], htmlspecialchars($title),323 $href($a['href']), htmlspecialchars($title), 253 324 $this->conf['languages'][$lang][0] // verbose language name 254 325 ); … … 256 327 ?> 257 328 </ul> 258 <form method="get" action="<?php $ p('topnav-search-page'); ?>">329 <form method="get" action="<?php $href($p('topnav-search-page')); ?>"> 259 330 <span class="no-js"><?php $p('topnav-search-label'); ?>:</span> 260 331 <input type="text" value="" data-defaultvalue="<?php $p('topnav-search-label'); ?>" name="q" class="text"> … … 265 336 <hr> 266 337 <?php 267 // only print menu when in sidebar where it applies 268 $print_footer_menu = ($this->conf['seite_in_nav'] == 'side'); 338 // only print menu when in sidebar where it applies. 339 // it can also be forced with a global setting $force_footer_menu = 1 340 $print_footer_menu = ($this->conf['seite_in_nav'] == 'side') || isset($this->conf['force_footer_menu']); 269 341 ?> 270 342 <footer class="in-sheet <? if(!$print_footer_menu) print "empty-footer"; ?>"> … … 278 350 foreach($this->page_relations as $rel => $a) { 279 351 printf("\t<li class='%s'><a href='%s' title='%s'>%s <strong>%s</strong></a>\n", 280 $rel, $ a['href'], sprintf($_('head-rel-'.$rel), $this->relational_link_to_string($a)),352 $rel, $href($a['href']), sprintf($_('head-rel-'.$rel), $this->relational_link_to_string($a)), 281 353 $_('nav-rel-'.$rel), $this->relational_link_to_string($a) 282 354 ); … … 295 367 <ul class="clearfix"> 296 368 <li class="logo"> 297 <a href="<?php $ p('footer-legal-file'); ?>" class="img" title="technikum29 Logo">Logo</a>369 <a href="<?php $href($p('footer-legal-file')); ?>" class="img" title="technikum29 Logo">Logo</a> 298 370 <p><?php $p('footer-copyright-tag'); ?> 299 <br><?php printf('<a href="%s">%s</a>', $ _('footer-legal-file'), $_('footer-legal-link')); ?>371 <br><?php printf('<a href="%s">%s</a>', $href($_('footer-legal-file')), $_('footer-legal-link')); ?> 300 372 </p> 301 373 </li> 302 374 <li class="copy"> 303 <a href="<?php $ p('footer-legal-file'); ?>#image-copyright" class="img">CC</a>304 <p>Viele Bilder können unter einer <a href="<?php $ p('footer-legal-file'); ?>#image-copyright">CreativeCommons-Lizenz</a>305 verwendet werden. <a href="<?php $ p('footer-legal-file'); ?>#image-copyright">Erkundigen Sie sich</a>.</p>375 <a href="<?php $href($p('footer-legal-file')); ?>#image-copyright" class="img">CC</a> 376 <p>Viele Bilder können unter einer <a href="<?php $href($p('footer-legal-file')); ?>#image-copyright">CreativeCommons-Lizenz</a> 377 verwendet werden. <a href="<?php $href($p('footer-legal-file')); ?>#image-copyright">Erkundigen Sie sich</a>.</p> 306 378 </li> 307 379 </ul> 308 380 --> 381 <?php 382 // pending log messages 383 if(!$this->log->is_empty()) { 384 echo '<ul class="messages footer nolist">'; 385 $this->log->print_all(); 386 echo '</ul>'; 387 } 388 ?> 309 389 </footer> 310 390 </div><!-- end of div id="footer-background-container" helper --> -
shared/css-v6/modules/01-boilerplate.css
r289 r347 102 102 ul, ol { margin: 1em 0; padding: 0 0 0 40px; } 103 103 dd { margin: 0 0 0 40px; } 104 nav ul, nav ol, footer ul, footer ol { list-style: none; list-style-image: none; margin: 0; padding: 0; } 104 nav ul, nav ol, footer ul, footer ol, #content ul.nolist, #content ol.nolist { 105 list-style: none; list-style-image: none; margin: 0; padding: 0; } 105 106 106 107 -
shared/css-v6/modules/11-header.css
r299 r347 176 176 nav.top form { 177 177 /* Suche, solange sie noch nicht fertig ist, ausblenden. */ 178 display: none;178 /*display: none;*/ /* Online gegangen im Maerz 2013 */ 179 179 } 180 180 -
shared/css-v6/modules/18-content.css
r289 r347 8 8 * Blockdesign, etc. 9 9 * 10 * .messages = Logging, zentralisiert (siehe logging.php, template.php und log.js) 10 11 **/ 11 12 … … 64 65 color: #882224; 65 66 } 67 68 /** 69 * Logging 70 **/ 71 72 .messages.panel.empty { 73 /* Hide empty message boxes */ 74 display: none; 75 } 76 77 .messages.panel { margin-bottom: 20px; } 78 79 .messages.panel li { 80 margin-bottom: 5px; 81 background-color: #FCF8E3; 82 border: 1px solid #FBEED5; 83 border-radius: 4px 4px 4px 4px; 84 margin-bottom: 20px; 85 padding: 8px 35px 8px 14px; 86 text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); 87 } 88 89 .messages.panel p { margin: 2px 0; } 90 .messages.panel button.close { 91 float: right; 92 } 93 94 .messages.footer { 95 /* sollte eigentlich gar nicht dargestellt werden, sondern von log.js 96 in den .messages.panel-Bereich verschoben werden. */ 97 opacity: .8; 98 } -
shared/css-v6/modules/22-v5blocks.css
r278 r347 26 26 27 27 28 #content td, #content table, #content tr { 28 #content table.t29-details td, 29 #content table.t29-details, 30 #content table.t29-details tr { 29 31 font: 12px Verdana; 30 32 } 31 33 32 #content table {34 #content table.t29-details { 33 35 border-spacing: 1px; 34 36 border-collapse: separate; 35 37 } 36 38 37 #content table p {39 #content table.t29-details p { 38 40 text-align: justify; 39 41 line-height: 120%; 40 42 } 41 43 42 #content table p.center {44 #content table.t29-details p.center { 43 45 margin: 5px 0px; 44 46 text-align: center; 45 47 } 46 48 47 #content t d b {49 #content table.t29-details td b { 48 50 display: block; 49 51 } 50 52 51 #content t d.b, #contenttd.b a {53 #content table.t29-details td.b, #content table.t29-details td.b a { 52 54 font-weight: bold; 53 55 } 54 56 55 #content table {57 #content table.t29-details { 56 58 background-color: #7090C0; 57 59 } 58 60 59 #content t d {61 #content table.t29-details td { 60 62 padding: 2px; 61 63 vertical-align: middle; … … 64 66 } 65 67 66 #content t h {68 #content table.t29-details th { 67 69 padding: 2px; 68 70 text-align: center; … … 70 72 } 71 73 72 #content .bemerkungen {74 #content table.t29-details .bemerkungen { 73 75 vertical-align: middle; 74 76 text-align: justify; -
shared/js-v6/modules/log.js
r260 r347 1 1 /** 2 * Logging functions, basics provided by HTML5 Boilerplate 2 * t29v6 Logging subsystem 3 * 4 * Logging on client side is splitted in two parts: 5 * 1. Javascript console.log calls which won't offend the user 6 * 2. the t29.log class to notify the user. 7 * 8 * Considering console.log, the code is borrowed by HTML5 Boilerplate 9 * 3 10 * 4 11 **/ … … 20 27 {console.log();return window.console;}catch(err){return window.console={};}})()); 21 28 29 30 if(!t29) window.t29 = {}; // the t29 namespace 31 t29.log = {}; // the t29.log namespace 32 33 t29.log.setup = function() { 34 // setup our spaces 35 t29.log.$panel = $(".messages.panel"); 36 t29.log.$end = $(".messages.footer"); 37 38 // find end messages and push them to the first 39 if((end_li = t29.log.$end.find("li")).length) { 40 end_li.appendTo(t29.log.$panel); 41 t29.log.$end.hide(); // hide bottom panel 42 t29.log.$panel.removeClass("empty"); // show top panel 43 } 44 45 // setup some functions 46 levels = ["emerg", "alert", "crit", "error", "warn", "notice", "info"]; 47 $.each(levels, function() { 48 level = this; 49 t29.log[level] = function(msg) { t29.log.append(level, msg) } 50 }); 51 } 52 53 t29.log.append = function(level, msg) { 54 // tell the panel that it's now not empty (thus it will become CSS visible) 55 t29.log.$panel.removeClass("empty"); 56 57 if(jQuery.type(msg) == "string") 58 s = msg; 59 else { 60 s = ""; 61 if(msg.dismissable) s += "<button class='close'>×</button>"; 62 if(msg.heading) s += "<h5>"+msg.heading+"</h5>"; 63 if(msg.text) s += "<p>"+msg.text+"</p>"; 64 } 65 infoelement = $("<li>", {"class": level}).html(s).hide().appendTo(t29.log.$panel).slideDown(); 66 67 // fill eventual close button with action 68 $(infoelement).find("button.close").click(function(){ 69 $(this).closest("li").slideUp(); 70 }); 71 } -
shared/js-v6/modules/startup.js
r306 r347 20 20 'img_license', 21 21 'lightbox', 22 'log', 22 23 23 24 // ganz am anfang 24 25 'prefs', 26 27 // needs log, t29msg 28 'interlang', 25 29 26 30 // needs prefs
Note: See TracChangeset
for help on using the changeset viewer.