Kahil (@kahil)

Forum Replies Created

Viewing 18 replies - 1 through 18 (of 18 total)
  • In reply to: Header already sent???

    Cancel that order! lol…

    I don’t know what happened…

    I got frustrated and took a shot at running the upgrade page even though I had already done so. After I did that everything was all peachy.

    Thanks

    In reply to: Strut Your bbPress!

    I have one over at yourkahil.com/forum

    still in the works as I am integrating my custom wordpress theme into it…

    In reply to: Plugin: Avatar Upload

    For those of you who have your wordpress and bbpress installs together and would like have the avatars display in the wordpress side as well…

    Here is some code you can add… This is what I use in the sidebar over at yourkahil.com

    <?php global $user_identity;

    get_currentuserinfo();

    if ($user_identity == ”) {

    echo(‘Welcome Guest’);

    } else {

    echo(‘<img src=”/forum/avatars/’ . strtolower($user_identity) . ‘” alt=”avatar” />’);

    }

    ?>

    This will work if you would like to display the avatar outside of the loop in bbpress as well. All you have to do is change the image source line to reflect where you have your avatars stored…

    Hope that helps some people!!!

    an update…

    I didn’t know until I tried, but you can leave that .jpg out and it will load any image file that matches that query.

    It can also be done by making the default bbpress theme look like your wordpress theme. I am almost done doing just that over at yourkahil.com

    For the most part everything is the same, only a handful of changes/tweaks to the template files.

    kahil is at mykahil.com

    YAY!!! I figured it out!

    <?php global $user_identity;

    get_currentuserinfo();

    if ($user_identity == ”) {

    echo(‘Welcome Guest’);

    } else {

    echo(‘<img src=”/forum/avatars/’ . strtolower($user_identity) . ‘.jpg” alt=”avatar” />’);

    }

    ?>

    I got to thinking… being that it renames the image to their usernames, I thought that the following might work, but it doesn’t…

    <img src=”http://yourkahil.com/forum/avatars/&lt;?php echo $strtolower($user->user_identity); ?>.jpg” alt=”avatar” />

    Shouldn’t that work? I’m trying to get it to display the current username of the person visiting the site, provided they are logged in. If they aren’t logged in it shouldn’t display anything. Later I’d like to figure out how to do an if else statement so that if the visitor isn’t logged it, it will display a default image.

    by looking at the code for the “upload avatar” plugin I found this…

    strtolower($user->user_identity);

    This is what I have now, but nothing displays for the filename, just yourkahil.com/forum/avatars/.jpg

    <?php

    /*

    Plugin Name: WP Avatars

    */

    function wp_aud( $felID ) {

    $avatar = strtolower($user->user_identity);

    $bburl = ‘http://yourkahil.com/forum&#8217;;

    echo ‘<img alt=”avatar” src=”‘ . $bburl . ‘/avatars/’ . $avatar . ‘.jpg” class=”avatar” />’;

    }

    ?>

    Ok, so I’ve figured out some more info to share…

    First, the code posted above needs to reference the file type (.jpg, .jpeg, .gif, or .png). Right now the code only points to the avatars folder.

    Next, I’ve figured out that the “avatar upload” plugin for bbpress does rename the images to the user’s username, but makes it all lowercase letters if there are any caps.

    Hope that helps.

    Thank you!!

    It is pointing to the correct folder, just isn’t pointing to any file like it should.

    I don’t know the php code. I followed what was stated above. The URI points to the right folder. When you upload an avatar using the bbpress upload avatar plugin, it renames the image you upload to your username.

    well, this plugin names the images by username I think. It also has a default image if no avatar has been uploaded… shouldn’t there be some sort of code there to reference a person’s username?

    I’m confused… I activated that plugin and pasted what you put…but all that is there is the the word “avatar”…. :(

    I put in the url of the forum… did I do something wrong?

    Thanks,

    Kahil

    I wouldn’t know where or how to insert something like you posted above. I thought that since both wordpress and bbpress were using the same database that all I’d have to do is paste the code. Like this for the avatar plugin I am using in bbpress:

    <?php avatarupload_display($user->ID); ?>

    the edit profile link, yes, that was resolved, but I just meant that statement as an example. There are other things from bbpress that I would like to have displayed in my wordpress sidebar.

    Well, since you mentioned that the first option can be tricky, lets start with the latter? the php code?

    Thanks,

    Kahil

    I would appreciate any help. Whichever is the easiest and will work the best. I’m fairly new to coding myself, but I learn fast. yourkahil.com is where I’m doing this. I have a lil login form in that first box in the sidebar and once you login, it has a couple links now, like logout. I would like to be able to show the user’s avatar with the “upload avatar” plugin, the private message link(s) from the “private message” plugin.

    Thanks for the help!

    Kahil

    Those two plugins don’t help at all. Basically if you have a lil php code that you have in your bbpress theme to display anything from display names, profile info or the avatar when using upload avatar plugin….when you paste that code on the wordpress side you get an error.

Viewing 18 replies - 1 through 18 (of 18 total)