Changeset 89
- Timestamp:
- 04/24/2005 04:43:11 PM (18 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bb-includes/functions.php
r88 r89 676 676 } 677 677 678 function get_public_tags ( $topic_id ) { 679 $tags = get_topic_tags ( $topic_id ); 680 if ( !is_array( $tags ) ) 681 return; 682 $used_tags = array(); 683 $public_tags = array(); 684 685 foreach ( $tags as $tag ) : 686 if ( !in_array($tag->tag_id, $used_tags) ) : 687 $public_tags[] = $tag; 688 $used_tags[] = $tag->tag_id; 689 endif; 690 endforeach; 691 return $public_tags; 692 } 693 678 694 function bb_find_filename( $text ) { 679 695 $text = preg_replace('|.*?/([a-z]+\.php)/?.*|', '$1', $text); -
trunk/bb-includes/template-functions.php
r85 r89 493 493 } 494 494 495 function tag_form() { 496 global $current_user; 497 if ($current_user) 498 include( BBPATH . '/bb-templates/tap-form.php'); 499 } 500 495 501 ?> -
trunk/bb-templates/post-form.php
r24 r89 1 1 2 <form name="post" id="post" method="post" action="<?php option('uri'); ?>bb-post.php">2 <form class="postform" method="post" action="<?php option('uri'); ?>bb-post.php"> 3 3 <?php if ( is_forum() ) : ?> 4 4 <p>Before posting a new topic, <a href="<?php option('uri'); ?>search.php">be sure to search</a> to see if one has been started already.</p> -
trunk/bb-templates/topic-tags.php
r82 r89 24 24 25 25 </div> 26 27 <?php tag_form(); ?> -
trunk/bb-templates/topic.php
r82 r89 5 5 <h3><a href="<?php option('uri'); ?>"><?php option('name'); ?></a> » <a href="<?php forum_link(); ?>"><?php forum_name(); ?></a></h3> 6 6 <h2><?php topic_title(); ?></h2> 7 <form name="post" id="post" method="post" action="<?php option('uri'); ?>tag-add.php">8 <fieldset id="addtag">9 Add tag: <input name="tag" type="text" id="tag" size="10" maxlength="30" />10 <input type="hidden" name="id" value="<?php topic_id(); ?>" />11 <input type="submit" name="Submit" value="Add">12 </fieldset>13 </form>14 7 15 8 <?php topic_tags(); ?> -
trunk/topic.php
r82 r89 21 21 $user_tags = get_user_tags ( $topic_id, $current_user->user_id ); 22 22 $other_tags = get_other_tags ( $topic_id, $current_user->user_id ); 23 } elseif ( is_array($tags) ) { 24 $user_tags = false; 25 $other_tags = get_public_tags( $topic_id ); 23 26 } else { 24 27 $user_tags = false;
Note: See TracChangeset
for help on using the changeset viewer.