Skip to:
Content
Pages
Categories
Search
Top
Bottom

Repost: Finally A Follow Plugin For BP Without The Overlapping Button Problem

  • @ethanvan

    Spectator

    === BuddyPress NeoFollow ===
    Contributors: EthanVan, MegaInfo
    Requires at least: WordPress 3.4, BuddyPress 1.5
    Tested up to: WordPress 3.4.2 / BuddyPress 1.6.1
    Stable Version: 1.0

    BuddyPress NeoFollow allows members to follow other members’ activity.

    This newest follow plugin creates two button classes; one for the profile page and one for the members directory.

    By using two CSS button classes we eliminate the overlapping button problem in the members directory that has been plaguing users of the previous follow plugins without effecting the follow button on the members’ profile pages.

    This plugin is compatible with Private Message Followers Only and uses the same data as BuddyPress Followers and BuddyPress FollowMe so you can transition to it seamlessly.

    Download the plugin here: http://ethanvandal.com/bp-plugins/bp-neofollow.zip

    You will also need to download the required BuddyPress child theme to eliminate the overlapping button problem.

    Download the child theme here: http://ethanvandal.com/bp-themes/bp-neofollow-bc.zip

    This child theme invokes the use of the BP Default theme but can be modified to use any BuddyPress theme. If you need to use this with another theme please ask around on the BuddyPress.org forums. I do not guarantee support for use with other themes however, I will try and help out as much as I can.

    This is a repost due to inappropriate attack comments from yesterday which resulted in the thread being locked.

    Constructive feedback always appreciated. :)

Viewing 9 replies - 1 through 9 (of 9 total)
  • @johnjamesjacoby

    Keymaster

    Creating a child theme and forking an existing plugin seem like a lot of extra work. What was wrong with contributing a patch upstream to one of the other follower plugins?

    @ethanvan

    Spectator

    Edited: This is easier for the end user. They just install and go. It only took a few minute for me edit and to make the zips.

    @megainfo

    Participant

    hi @ethanvan,

    What news in your new plugin NeoFollow :) ?
    i check the code, and it’s is 100% from buddypress FollowMe plugin.

    And about the css problem, you can just add this line of css in your style :

    ul.item-list li div.action div.generic-button{
    margin-bottom:14px;
    }

    That’ all :P.

    @ethanvan

    Spectator

    You didn’t note two different css classes, one for members pages and one for members directory. This fixed the problem I was having with button placement. It’s on line 281 in bp-follow-template.php.

    Granted it’s just a change in the class name by adding a 2 at the end but it makes all the difference for me.

    When I would change the css both the profile follow button and the directory follow button would move. Not any more. Now you can adjust their position and attributes individually (the button wrapper anyways).

    `
    // setup the button arguments
    $button = array(
    ‘id’ => $id,
    ‘component’ => ‘follow’,
    ‘must_be_logged_in’ => true,
    ‘block_self’ => empty( $members_template->member ) ? true : false,
    ‘wrapper_class’ => ‘follow-button ‘ . $id,
    ‘wrapper_id’ => ‘follow-button-‘ . $leader_id,
    ‘link_href’ => wp_nonce_url( $leader_domain . $bp->follow->followers->slug . ‘/’ . $action .’/’, $action . ‘_following’ ),
    ‘link_text’ => $link_text,
    ‘link_title’ => $link_title,
    ‘link_id’ => $class . ‘-‘ . $leader_id,
    ‘link_class’ => $class
    );

    // setup the button arguments
    $button2 = array(
    ‘id’ => $id,
    ‘component’ => ‘follow’,
    ‘must_be_logged_in’ => true,
    ‘block_self’ => empty( $members_template->member ) ? true : false,
    ‘wrapper_class’ => ‘follow-button2 ‘ . $id,
    ‘wrapper_id’ => ‘follow-button-‘ . $leader_id,
    ‘link_href’ => wp_nonce_url( $leader_domain . $bp->follow->followers->slug . ‘/’ . $action .’/’, $action . ‘_following’ ),
    ‘link_text’ => $link_text,
    ‘link_title’ => $link_title,
    ‘link_id’ => $class . ‘-‘ . $leader_id,
    ‘link_class’ => $class
    );

    // Filter and return the HTML button based on the location in BuddyPress
    if (bp_is_directory()) {
    // Return the button class for the Members Directory
    return bp_get_button( apply_filters( ‘bp_follow_get_add_follow_button’, $button2, $leader_id, $follower_id ) );
    } else {
    // Return the button for the Profile Pages
    return bp_get_button( apply_filters( ‘bp_follow_get_add_follow_button’, $button, $leader_id, $follower_id ) );
    }
    `

    I know the bulk of the code is yours and that’s why I credited you.

    Hope this clears up the changes made. :)

    – Ethan

    @karmatosed

    Moderator

    Off top of my head I’d suggest selector CSS would be a less obtrusive method for the CSS issue:

    `.directory.members…..’ and so on – you can then do styling depending on the body classes.

    @ethanvan

    Spectator

    @karmatosed That’s actually a great point you make!

    Thank you for pointing this out to me. :facepalm:

    @r-a-y

    Keymaster

    Glad to see interest in the BuddyPress Follow component. Wasn’t even aware that there were two forks of it!

    To be fair, the original code for BuddyPress FollowMe was from BuddyPress Followers restructured to use the BP Skeleton Component. Other than that, from my quick look through the plugin, I did not see any new features or changes. Let me know if I’m wrong!

    BuddyPress Followers is the original plugin created by Andy Peatling; I made an update to that plugin a long time ago and started maintaining the plugin.

    It hasn’t had any updates as of late. If developers want to submit patches or ideas for BuddyPress Followers, you can do so on Github here:
    `https://github.com/r-a-y/buddypress-followers`

    EthanVan, I guess I can toggle the `’wrapper_class’` if you’re currently viewing a directory page, but other than that, you shouldn’t have to create a duplicate of the `$button` variable. Your code is not necessary when there is a filter available – `’bp_follow_get_add_follow_button’` – so you can hook in there and change the class if desired.

    @ethanvan

    Spectator

    Actually @karmatosed has the best solution. Using the selector CSS in a child theme is the easiest way to fix the button overlap. Aside from that the plugin was working great to start with.

    @makmacmc

    Participant

    @karmatosed

    Hi Karmatosed.

    Would you please explain in detail how to do this?

    Your help would be greatly appreciated!

    Thanks…

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Repost: Finally A Follow Plugin For BP Without The Overlapping Button Problem’ is closed to new replies.
Skip to toolbar