- Timestamp:
- May 9, 2013, 2:37:12 PM (11 years ago)
- Location:
- lib
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/menu.php
r350 r390 158 158 * Extracts a list of (CSS) classes the link has, 159 159 * e.g. <a class="foo bar"> gives array("foo","basr"). 160 * 161 * Caveat: This must be called before this class is destructed 162 * by print_menu! Otherwise it will return an empty array. This is 163 * actually bad design, print_menu destroyes the internal structure 164 * for storage efficiencey. 165 * 160 166 * @returns array or empty array in case of error 161 167 **/ 162 168 function get_link_classes($seiten_id=false) { 163 169 $link = $this->get_link($seiten_id); 164 print "link:"; var_dump($this->xml);170 //print "link:"; var_dump($this->xml); 165 171 if(!$link) return array(); 166 var_dump($link); exit;172 //var_dump($link); exit; 167 173 return isset($link['class']) ? explode(' ',$link['class']) : array(); 168 174 } -
lib/messages.php
r347 r390 122 122 'topnav-interlang-active' => array('Sie betrachten gerade die Seite "%s" auf Deutsch', 'You currently read the page "%s" in English'), 123 123 'topnav-interlang-nonexistent' => array('Diese Seite steht auf Deutsch nicht zur Verfügung', 'This page is not available in English'), 124 'topnav-interlang-nonexistent-page' => '/en/no-translation.php', 124 125 'topnav-search-label' => array('Suchen', 'Search'), 125 126 'topnav-search-page' => array('/suche.php', '/search.php'), -
lib/technikum29.php
r357 r390 55 55 $lang_path = $languages[$lang][1]; # shorthand, relative to webroot. use "$webroot$lang_path" for local. 56 56 57 // "AJAX" calls are our meaning for pages without chrome 58 $ajax = isset($_GET['ajax']); 59 if($ajax) { 60 // print only a minimal chrome, no caching. 61 require "$lib/ajax-template.php"; 62 $ajax_tmpl = new t29AJAXTemplate($GLOBALS); 63 $ajax_tmpl->print_page(); 64 // important: do not execute bottom code 65 return true; 66 } 67 57 68 require "$lib/cache.php"; 58 69 -
lib/template.php
r357 r390 112 112 $this->page_relations = $this->menu->get_page_relations(); 113 113 $this->interlang_links = $this->menu->get_interlanguage_link(); 114 $this->current_link_classes = $this->menu->get_link_classes(); 114 115 115 116 // check and load additional css … … 157 158 // Link is composed as <a href="$href">$label</a>. 158 159 $this->page_relations[$relation] = t29Menu::dom_new_link($href, $label); 159 print_r($this->page_relations);160 //print_r($this->page_relations); 160 161 } 161 162 … … 228 229 <?php 229 230 foreach($this->conf['header_prepend'] as $h) print $h."\n "; 231 232 if($this->conf['ajax']) print "\n <meta name='t29.ajax' content='true'>"; 230 233 231 234 if(isset($this->conf['version'])) printf('<meta name="t29.version" content="%s">', $this->conf['version']); … … 323 326 if(is_null($a)) { 324 327 // when interlanguage link not present (null) = no translation exists 325 $a = t29Menu::dom_new_link('#', 'not present'); 328 $backtitle = isset($this->conf['titel']) ? $this->conf['titel'] : null; 329 330 $a = t29Menu::dom_new_link( 331 $_('topnav-interlang-nonexistent-page') . '?' 332 . htmlentities(http_build_query(array( 333 'backurl' => $_SERVER['REQUEST_URI'], 334 'backtitle' => $backtitle ? $backtitle : null, 335 ))), 336 'not present' 337 ); 326 338 $title = sprintf($_('topnav-interlang-nonexistent', $lang)); 327 339 $class = 'nonexistent'; … … 355 367 $print_footer_menu = ($this->conf['seite_in_nav'] == 'side') || isset($this->conf['force_footer_menu']); 356 368 357 /*358 369 // print next or prev entry when the current page has a 359 370 // "show-rel-next" or "show-rel-prev" class entry 360 $current_link_classes = $this->menu->get_link_classes(); 361 print_r($current_link_classes); exit; 362 $show_rel_next = in_array('show-rel-next', $current_link_classes); 363 $show_rel_prev = in_array('show-rel-prev', $current_link_classes); 364 */ 371 $show_rel_next = in_array('show-rel-next', $this->current_link_classes); 372 $show_rel_prev = in_array('show-rel-prev', $this->current_link_classes); 373 365 374 ?> 366 375 <footer class="in-sheet <? if(!$print_footer_menu) print "empty-footer"; ?>"> … … 371 380 <ul> 372 381 <?php 373 if($print_footer_menu) //|| $show_rel_prev || $show_rel_next)382 //if($print_footer_menu) 374 383 foreach($this->page_relations as $rel => $a) { 375 /*376 384 // only show the links wanted to be shown. Only relevant if 377 385 // the "show-rel-*"-magic is working. 378 if( $print_footer_menu 386 if( $print_footer_menu || 379 387 (!$print_footer_menu && $rel == "prev" && $show_rel_prev) || 380 388 (!$print_footer_menu && $rel == "next" && $show_rel_next)) { 381 */389 382 390 printf("\t<li class='%s'><a href='%s' title='%s'>%s <strong>%s</strong></a>\n", 383 391 $rel, $href($a['href']), sprintf($_('head-rel-'.$rel), $this->relational_link_to_string($a)), 384 392 $_('nav-rel-'.$rel), $this->relational_link_to_string($a) 385 393 ); 386 //} // endif394 } // endif 387 395 } // endfor 388 396 ?>
Note: See TracChangeset
for help on using the changeset viewer.