bbPress

Simple, Fast, Elegant

bbPress support forums » Themes

User profile link

(3 posts)
  • Started 1 year ago by wittmania
  • Latest reply from wittmania
  • This topic is not resolved
  1. 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!

    Posted 1 year ago #
  2. Thanks a lot for posting it here afterwards. :D What other bb_options are there/where did you find them?

    Posted 1 year ago #
  3. 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.

    Posted 1 year ago #

RSS feed for this topic

Reply

You must log in to post.

Code is Poetry.