one quick & dirty way:
<? if (bb_is_user_logged_in()) { ?><a href="<? echo $bb->uri.'profile.php?id='.bb_get_current_user_info( 'id' ); ?>&tab=favorites">favorites</a><? } ?>
I don’t mind that it is dirty way:))
thanks very much:)
Actually, forget that way.
I just checked the source and it’s right there for us:
<? if (bb_is_user_logged_in()) { echo '<a href="'.get_profile_tab_link(bb_get_current_user_info( 'id' ), 'favorites' ).'">favorites</a>'; } ?>
much better
thx, but…
I want to use it in my user menu – outside a forum directory
example, I have forum at http://www.tasty.sk/forum and I want to show this link on entire website http://www.tasty.sk in menu (in header) . If I use this function, it get me error:
Fatal error: Call to undefined function bb_is_user_logged_in() in /home/tasty.sk/tasty.sk/www/wp-content/themes/tasty/header.php on line 94
Oh if you are trying to do it from an integrated WordPress you’ll need to do this:
<?
if function_exists("get_currentuserinfo") {global $user_ID;}
else { $user_ID=bb_get_current_user_info( 'id' )}
if ($user_ID) { echo '<a href="/forums/profile.php?id='.$user_ID.'&tab=favorites">favorites</a>';} ?>
untested – change /forums/ to whatever your bbpress path is.
thanks, I found another way when integrating with wordpress
< a href=”http://www.tasty.sk/forum/profile/<?php echo $user_identity; ?>/favorites”>
I get the same results:)
My solution from my last comment worked fine, but it stops I don’t know why.
Right know, if I point to “http://www.tasty.sk/forum/profile/<?php echo $user_identity; ?>/favorites” it takes me to “http://www.tasty.sk/user/vlp//favorites”
Any ideas why could be this happening?
Or how to integrate favorites page (what url) to show it inside wordpress?