Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 7 replies - 1 through 7 (of 7 total)
  • Avatar of Lawrence
    Lawrence
    Participant

    @grimbog

    @knaveenchand, @casualmagic

    Just seen some activity on this… again, really sorry that things have been on a bit of a pause, but luckily I still have all the code and a basic website so I’ll review everything again with the latest version of wordpress and buddypress and see if I can get this thing published at long last!

    Avatar of Lawrence
    Lawrence
    Participant

    @grimbog

    Submitted this as a ticket, and attached proposed fix.

    Essentially, the permalink wasnt forming properly as it was missing a forward slash before ‘forum’ on line 1326 of bp-forum-template.php. Also trailingslashit(); was being run twice, which causes two forward-slashes.

    My fix is below…

    function bp_forum_permalink( $forum_id = 0 ) {
    echo bp_get_forum_permalink( $forum_id );
    }
    function bp_get_forum_permalink( $forum_id = 0 ) {
    global $bp;

    if ( bp_is_groups_component() ) {
    $permalink = trailingslashit( bp_get_root_domain() . ‘/’ . bp_get_groups_root_slug() . ‘/’ . bp_current_item() . ‘/’ . ‘forum’ );
    } else {
    if ( empty( $forum_id ) ) {
    global $topic_template;
    if ( isset( $topic_template->forum_id ) )
    $forum_id = $topic_template->forum_id;
    }

    if ( $forum = bp_forums_get_forum( $forum_id ) )
    $permalink = trailingslashit( bp_get_root_domain() . ‘/’ . bp_get_forums_root_slug() . ‘/forum/’ . $forum->forum_slug );
    else
    return false;
    }

    return apply_filters( ‘bp_get_forum_permalink’, $permalink );
    }

    Avatar of Lawrence
    Lawrence
    Participant

    @grimbog

    @djpaul: Thanks Paul, I would really appreciate any thoughts and feedback when its out, as I can imagine the coding will be a little hazy in places. Should be fairly easy to understand though.

    Avatar of Lawrence
    Lawrence
    Participant

    @grimbog

    Good news all… I’ve finally got this working as intended, and I’m currently in the process of packing it all together in to a plugin for release to the community over the next few days. Just creating a small webpage where people can download it, and I’ll hopefully have an online user guide.

    Screenshot:
    http://www.obscuresounds.com/obscureavatar-beta.jpg

    For now it works like this:

    1. designers can create transparent png “parts” of an avatar divided in to 3 sections (body, face, head).
    2. the plugin can differentiate between male and female by parsing in a string (m, or f), so again designers can create gender specific avatars based on needs.
    3. users who upload avatars via BP will bypass obscureavatars, and the plugin will only use gravatar as a last resort for groups, and blogs.
    4. it works for both wordpress, and buddypress.

    Essentially it sets out to do what I’ve wanted – to make the avatars a bit easier to work with for designers. Although I mainly develop backend stuff I love UI design, and one thing I’ve noticed is that pretty much all wordpress projects either use gravatars tacky generated content, or the dull wordpress avatar. Not only that but they fail to facilitate basic gender styles, which is essential for social network propagation now-days.

    I want to continue developing this in to something more sophisticated (I’m thinking it would be cool if designers could zip their parts in to packs, so that people can interchange them in an instant), but I will only be able to do this based on its popularity and support.

    Avatar of Lawrence
    Lawrence
    Participant

    @grimbog

    @Reezo, @Dimensionmedia:

    Thanks guys… sorry for taking such a long time to update on this. Ended up having to work on some other projects. I’ve managed to get the custom avatar generator to function okay now, and have a live project that uses it (http://school.ocdaction.org.uk/), but I need to tidy up the code a little. At the moment I’m having to plug the wordpress avatar function (get_avatar) and use that for my rendering duties. What I’d like to happen is for the bp dev team to make their bp_core_fetch_avatar pluggable, as it doesnt really have much scope for extending in its current state. Maybe I’m wrong, but if someone has more knowledge of how to alter bp_core_fetch_avatar for my needs then that would be awesome. I did think of filtering, but one aspect of bp_core_fetch_avatar I don’t particulary see the need of is that it pushes the final img url through http://www.gravatar.com, which in my opinion is a wasted resource, as this plugin would only read directly off the parts folder when it generates an avatar, and then loads from a cache dir.

    Welcome any thoughts on this.

    Avatar of Lawrence
    Lawrence
    Participant

    @grimbog

    Hey guys,

    Just letting everyone know I’ve finally made progress on this: I now have custom avatars for Buddypress – the code needs tidying up, but its pretty much there. If all else fails then it reverts to the mysteryman. At the moment I’m trying to see if I can set a male/female setting, so when users sign up it can auto-generate dependent on their gender.

    Should note it filters bp_core_fetch_avatar, so if someone uses a gravatar then it’ll show accordingly.

    Anyone interested in this as a plugin? The theory is that I’m going to do various different graphics/styles so people can ultimately choose or design their own avatars “parts”. Might need someone look over my code though – its rough at best. I could also see this as quite a nice official implementation in the core as I’m sure designers would like to extend the avatar system.

    Some screenshots:
    http://www.obscuresounds.com/output.png

    http://www.obscuresounds.com/avatar-screenshot.jpg

    Avatar of Lawrence
    Lawrence
    Participant

    @grimbog

    ahhh, makes sense. Thanks Paul – ’tis a shame as I’ve always been used to the www prefix. Wonder if they’ll make it an option in future WPMU’s? Something to take up with them I guess :)

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