Changeset 375 for trunk/bp-groups/bp-groups-templatetags.php
- Timestamp:
- 10/09/2008 04:37:49 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-groups/bp-groups-templatetags.php
r373 r375 147 147 global $groups_template; 148 148 149 ?><img src="<?php echo $groups_template->group->avatar_full ?>" class="avatar" alt=" GroupAvatar" /><?php149 ?><img src="<?php echo $groups_template->group->avatar_full ?>" class="avatar" alt="<?php echo $groups_template->group->name ?> Avatar" /><?php 150 150 } 151 151 … … 153 153 global $groups_template; 154 154 155 ?><img src="<?php echo $groups_template->group->avatar_thumb ?>" class="avatar" alt="Group Avatar" /><?php 156 } 157 158 159 function bp_group_permalink() { 160 global $groups_template, $bp; 161 echo $bp['current_domain'] . $bp['groups']['slug'] . '/' . $groups_template->group->slug; 155 ?><img src="<?php echo $groups_template->group->avatar_thumb ?>" class="avatar" alt="<?php echo $groups_template->group->name ?> Avatar" /><?php 156 } 157 158 159 function bp_group_permalink( $group_obj = false, $echo = true ) { 160 global $groups_template, $bp, $current_blog; 161 162 if ( !$group_obj ) 163 $group_obj = $groups_template->group; 164 165 switch_to_blog(1); 166 167 if ( $echo ) 168 echo site_url() . '/' . $bp['groups']['slug'] . '/' . $group_obj->slug; 169 else 170 return site_url() . '/' . $bp['groups']['slug'] . '/' . $group_obj->slug; 171 172 switch_to_blog($current_blog->blog_id); 162 173 } 163 174 … … 244 255 function bp_group_all_members_permalink() { 245 256 global $groups_template, $bp; 246 echo $bp['current_domain'] . $bp['groups']['slug'] . '/' . $groups_template->group->slug. '/members';257 echo bp_group_permalink( false, true ) . '/members'; 247 258 } 248 259 … … 268 279 269 280 if ( $bp['current_action'] == 'my-groups' || !$bp['current_action'] ) { 270 $action = $bp[' current_domain'] . $bp['groups']['slug'] . '/my-groups/search/';281 $action = $bp['loggedin_domain'] . $bp['groups']['slug'] . '/my-groups/search/'; 271 282 $label = __('Filter Groups'); 272 283 $type = 'group'; 273 284 } else { 274 $action = $bp[' current_domain'] . $bp['groups']['slug'] . '/group-finder/search/';285 $action = $bp['loggedin_domain'] . $bp['groups']['slug'] . '/group-finder/search/'; 275 286 $label = __('Find a Group'); 276 287 $type = 'groupfinder'; … … 505 516 global $groups_template, $bp; 506 517 507 echo $bp['loggedin_domain'] . $bp['groups']['slug'] . '/' . $groups_template->group->slug. '/leave-group/yes';518 echo bp_group_permalink( false, true ) . '/leave-group/yes'; 508 519 } 509 520 … … 511 522 global $groups_template, $bp; 512 523 513 echo $bp['loggedin_domain'] . $bp['groups']['slug'] . '/' . $groups_template->group->slug . '/leave-group/no';524 echo bp_group_permalink( false, true ); 514 525 } 515 526 … … 559 570 global $groups_template, $bp; 560 571 561 echo $bp['loggedin_domain'] . $bp['groups']['slug'] . '/' . $groups_template->group->slug. '/send-invites/send';572 echo bp_group_permalink( false, true ) . '/send-invites/send'; 562 573 } 563 574 … … 566 577 567 578 if ( is_user_logged_in() && !BP_Groups_Member::check_is_member( $bp['loggedin_userid'], $groups_template->group->id ) ) { 568 echo '<a class="join-group" href="' . $bp['loggedin_domain'] . $bp['groups']['slug'] . '/' . $groups_template->group->slug. '/join">' . __('Join Group') . '</a>';579 echo '<a class="join-group" href="' . bp_group_permalink( false, false ) . '/join">' . __('Join Group') . '</a>'; 569 580 } 570 581 } … … 582 593 <?php $group = new BP_Groups_Group( $group_ids[$i], false, false ); ?> 583 594 <li> 584 <a href="<?php echo $bp['current_domain'] . $bp['groups']['slug'] . '/' . $group->slug?>"><img src="<?php echo $group->avatar_thumb; ?>" class="avatar" alt="Group Avatar" /></a>585 <h5><a href="<?php echo $bp['current_domain'] . $bp['groups']['slug'] . '/' . $group->slug?>"><?php echo $group->name ?></a></h5>595 <a href="<?php echo bp_group_permalink( $group, false ) ?>"><img src="<?php echo $group->avatar_thumb; ?>" class="avatar" alt="Group Avatar" /></a> 596 <h5><a href="<?php echo bp_group_permalink( $group, false ) ?>"><?php echo $group->name ?></a></h5> 586 597 </li> 587 598 <?php } ?>
Note: See TracChangeset
for help on using the changeset viewer.