Skip to:
Content
Pages
Categories
Search
Top
Bottom

User profile link


  • wittmania
    Member

    @wittmania

    I searched for this and didn’t find anything, but by scrounging through the code I found the necessary functions to make it work. I long for the day when the tags/functions in bbpress are documented like they are in WP.

    At any rate, I don’t really care for the “Title” line under a post author’s name, and I wanted to replace it with a simple link to the post author’s profile instead. The code I used was:

    <a href="<?php bb_option('uri'); ?>profile.php?id=<?php echo (get_post_author_id()); ?>">View Profile</a>

    I added this in post.php, where the <?php post_author_title(); ?> line had been inside the threadauthor div.

    I’m so proud of myself, I think I’ll go have a snack!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thanks a lot for posting it here afterwards. :D What other bb_options are there/where did you find them?


    wittmania
    Member

    @wittmania

    From doing a quick search in Dreamweaver for bb_option, I found several different parameters that can be passed to the bb_option() function, as listed below:

    1. version
    2. uri
    3. admin_email
    4. name
    5. path

    I’m sure there are more, but I don’t know what they would be. Also, for this specific application you could just hard-code in your site’s uri, and the only dynamic portion would be the number tacked onto the end. But, since code is poetry, the bb_option() method seemed much more poetic to me.

    As for the get_post_author_id() function, I think I just scrounged around in other files (including plugins) until I found one that looked like it would work. And it does.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Skip to toolbar