Changeset 1606 for trunk/include
- Timestamp:
- Nov 14, 2006, 3:53:24 AM (18 years ago)
- Location:
- trunk/include
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/functions_html.inc.php
r1586 r1606 611 611 5 ); 612 612 } 613 614 /* returns the title to be displayed above thumbnails on tag page 615 */ 616 function get_tags_content_title() 617 { 618 global $page; 619 $title = count($page['tags']) > 1 ? l10n('Tags') : l10n('Tag'); 620 $title.= ' '; 621 622 for ($i=0; $i<count($page['tags']); $i++) 623 { 624 $title.= $i>0 ? ' + ' : ''; 625 626 $title.= 627 '<a href="' 628 .make_index_url( 629 array( 630 'tags' => array( $page['tags'][$i] ) 631 ) 632 ) 633 .'" title="' 634 .l10n('See pictures linked to this tag only') 635 .'">' 636 .$page['tags'][$i]['name'] 637 .'</a>'; 638 639 if ( count($page['tags'])>2 ) 640 { 641 $other_tags = $page['tags']; 642 unset ( $other_tags[$i] ); 643 $title.= 644 '<a href="' 645 .make_index_url( 646 array( 647 'tags' => $other_tags 648 ) 649 ) 650 .'" style="border:none;" title="' 651 .l10n('remove this tag') 652 .'"><img src="' 653 .get_root_url().get_themeconf('icon_dir').'/remove_s.png' 654 .'" alt="x" style="vertical-align:bottom;" class="button"/>' 655 .'</a>'; 656 } 657 658 } 659 return $title; 660 } 613 661 ?> -
trunk/include/section_init.inc.php
r1604 r1606 194 194 $result = pwg_query($query); 195 195 $tag_infos = array(); 196 while ($row = mysql_fetch_a rray($result))196 while ($row = mysql_fetch_assoc($result)) 197 197 { 198 198 $tag_infos[ $row['id'] ] = $row; … … 411 411 } 412 412 413 $title = count($page['tags']) > 1 ? l10n('Tags') : l10n('Tag'); 414 $title.= ' '; 415 416 $tag_num = 1; 417 foreach ($page['tag_ids'] as $tag_id) 418 { 419 $title.= 420 ($tag_num++ > 1 ? ' + ' : '') 421 .'<a href="' 422 .make_index_url( 423 array( 424 'tags' => array( 425 array( 426 'id' => $tag_id, 427 'url_name' => $tag_infos[$tag_id]['url_name'], 428 ), 429 ) 430 ) 431 ) 432 .'">' 433 .$tag_infos[$tag_id]['name'] 434 .'</a>'; 435 } 413 $title = get_tags_content_title(); 436 414 437 415 $page = array_merge(
Note: See TracChangeset
for help on using the changeset viewer.