Skip to:
Content
Pages
Categories
Search
Top
Bottom

BuddyPress Skeleton Component v1.2 RC-2


  • Jeff Sayre
    Participant

    @jeffsayre

    UPDATE: This version is now official (along with some more updates) please download this version. Huge thanks to Jeff Sayre for all his work on this!

    http://testbp.org/resources/bp-skeleton-component-1.2.zip

    Announcing version 1.2_URC2 of the BuddyPress Skeleton Component for plugin developers.

    I finally finished going over all the relevant changesets in trac and have completed the update of the skeleton component to RC2 standards.

    Now that BuddyPress RC2 is out, it is important that plugin developers use this version instead of v1.2_URC1 or v1.1.

    As with URC1, this is still considered unofficial until Andy has had a chance to look it over. Once he has finished, and it is ready to go, it may be moved over to the BuddyPress site. Until then, you can get it at the above link.

    As before, please report any bugs or other issues with this release candidate within this thread.

    Happy coding!

Viewing 25 replies - 1 through 25 (of 27 total)

  • 2591458
    Inactive

    Great news Jeff!

    One thing I noticed on line 233 in bp-example.php is that there appears to be a syntax error:

    bp_core_add_nav_item( __( ‘Example’, ‘bp-example’ ), /* The display name */ $bp->example->slug // The slug );

    With the “// The slug );” comment, the closing parenthesis and semicolon will also get commented out.

    To fix it, it should read something like:

    bp_core_add_nav_item( __( ‘Example’, ‘bp-example’ ), /* The display name */ $bp->example->slug /* The slug */ );

    Once again, great job and thanks for all your hard work! :)

    Thanks Jeff


    Jeff Sayre
    Participant

    @jeffsayre

    @Mickster777-

    Nice catch! Fixed and reuploaded.

    @DJPaul-

    You’re welcome.


    Jeff Sayre
    Participant

    @jeffsayre

    Andy reviewed and made some additional updates to v1.2 of the Skeleton Component. It is now official and is located here:

    http://testbp.org/resources/bp-skeleton-component-1.2.zip


    John James Jacoby
    Keymaster

    @johnjamesjacoby

    Jeff, I’m routing all of the discussion from your first topic here going forward. Happy supporting! :D


    gaetanbuddypress
    Participant

    @gaetanbuddypress

    Hi John James Jacoby,

    Just to say I think the link at the end of this topic https://buddypress.org/forums/topic.php?id=2043&page=2should be https://buddypress.org/forums/topic.php?id=2329.

    I hope I\’m not wrong!!;-)

    Have a nice w-end and thanks to all for your great job and support!

    Gaetan


    belogical
    Participant

    @belogical

    Jeff, did the code for the icon, heart_bullet.png, get stripped out? I can’t seem to find it.


    Jeff Sayre
    Participant

    @jeffsayre

    BeLogical-

    Sorry it has taken me so long to respond. I’m on the road and in meetings most this week.

    As far as I remember, I do not think there ever was specific code for showing that image.


    belogical
    Participant

    @belogical

    yeah, it was in v1.1 for sure. i used it for my first component. i found a reference in /wp-content/plugins/buddypress/bp-example/bp-example-cssjs.php in v1.1. I tried adding this back myself and it didn’t work.

    /**
    * bp_example_add_activity_bullets_css()
    *
    * This function will allow your component to dynamically add CSS to themes so that you can
    * set the activity feed icon to use for your component.
    */
    function bp_example_add_activity_bullets_css() {
    ?>
    li a#my-example, li a#user-example {
    background: url(<?php echo site_url( MUPLUGINDIR . \'/bp-example/images/heart_bullet.png\' ) ?>) 88% 50% no-repeat;
    }

    li.example {
    background: url(<?php echo site_url( MUPLUGINDIR . \'/bp-example/images/heart_bullet.png\' ) ?>) 0 8% no-repeat;
    }

    table#bp-example-notification-settings th.icon {
    background: url(<?php echo site_url( MUPLUGINDIR . \'/bp-example/images/heart_bullet.png\' ) ?>) 50% 50% no-repeat;
    }
    <?php
    }
    add_action( \'bp_custom_member_styles\', \'bp_example_add_activity_bullets_css\' );
    add_action( \'bp_custom_home_styles\', \'bp_example_add_activity_bullets_css\' );

    ?>


    Jeff Sayre
    Participant

    @jeffsayre

    Ah yes, it was in there before. I didn’t have my copy of v1.1 to reference. Try WP_PLUGIN_DIR instead of MUPLUGINDIR.


    belogical
    Participant

    @belogical

    that didn’t seem to work.


    Jeff Sayre
    Participant

    @jeffsayre

    Oaky, I think I made a little error. Assuming that you set “WP_PLUGIN_URL” in bp-example.php (your base file which obviously has a different name), then try this:

    site_url( WP_PLUGIN_URL . '/heart_bullet.png' )

    This assumes that you set WP_PLUGIN_URL = ‘/bp-example/images’


    belogical
    Participant

    @belogical

    this didn’t work either. I have this in the bp-example.php:

    $bp->example->image_base = WP_PLUGIN_URL . '/bp-example/images';

    is that what you are talking about?


    Burt Adsit
    Participant

    @burtadsit

    belogical

    $bp->example->image_base = BP_PLUGIN_URL . ‘/bp-example/images’;


    belogical
    Participant

    @belogical

    Nada. Has anyone gotten this to successfully work with the skeleton component on their server?


    Jeff Sayre
    Participant

    @jeffsayre

    Well, the skeleton uses WP_PLUGIN_URL because custom components should not run in the /buddypress/ directory. Since BP_PLUGIN_URL is defined in bp-core.php (line 9):

    define( 'BP_PLUGIN_URL', WP_PLUGIN_URL . '/buddypress' );

    if you use BP_PLUGIN_URL, it will be pathed incorrectly.

    So, the question is this: Where do you have your custom component installed? It should be in /plugins/ and not /plugins/buddypress/


    belogical
    Participant

    @belogical

    Jeff, could you get this working in v1.2 and then I can modify my component accordingly?


    Jeff Sayre
    Participant

    @jeffsayre

    BeLogical-

    Why don’t you paste your base code (bp-xxx.php) and the bp-xxx-cssjs.php code into a pastebin so that several of us can take a look–that is if you don’t mind showing parts of your code. I have not had issues using:

    $bp->example->image_base = WP_PLUGIN_URL . '/bp-xxx/images';

    to load images.


    belogical
    Participant

    @belogical

    I don’t know what broke it from v1.1 to v1.2, I’m just making my best guess. That is why I was asking if you had a working v1.2 w/ images, then I could just download a copy and modify for my component. Like a version 1.2b since 1.2 has a bug in it.

    here is the full code from v1.1 that I am guessing is the issue:

    http://pastebin.com/mee09d07 (bp-example-cssjs.php)

    thanks for all your assistance and I hope this helps!


    Jeff Sayre
    Participant

    @jeffsayre

    BeLogical-

    Okay, several issues. You are still using the old v1.1 for the code that you sent me. Are you also using v1.1 for your bp-example.php file? This code, as you know, is outdated.

    Just within this file, you need to replace every instance of MUPLUGINDIR with WP_PLUGIN_URL.

    Then, make sure that in bp-example.php, you have this line and not the v1.1 version.

    $bp->example->image_base = WP_PLUGIN_URL . \'/bp-example/images\';

    Your best bet is to compare each file of v1.1 with the new v1.2 files. Also, make sure that your custom component is in /plugins/ and not /plugins/buddypress/.

    Finally, make sure that you read the history.txt file to see some of the more substantive changes from v1.1.


    Jeff Sayre
    Participant

    @jeffsayre

    In fact, I just figured out the problem.

    I just went back and read the history.txt file myself. Well, guess what, this is a change Andy made just before he made v1.2 an official release. Ready?

    Removed call to bp_example_add_activity_bullets_css() as will no longer work and is theme specific.


    belogical
    Participant

    @belogical

    yeah, I am on v1.2 of the component, i was just showing you what I thought was left out when we went to v1.2 from v1.1.

    andy, you dirty dog. so it looks like the icon for a new component is no longer supported by the skeleton component v1.2?

    hmmm, so how in the devil do I get this to work properly? it looks really odd on my site when all of the main components have an icon on the member theme, and mine doesn\’t.

    I made all the changes you suggested, here is the copy of my code. Let me know if I made any mistakes.

    http://pastebin.com/m57a2fc51 (v1.2 of my component file, bp-mystuff-cssjs.php)

    http://pastebin.com/m69816adc (in my v1.2 file, bp-mystuff.php)

    my plugin is now loaded into wp-content/plugins/bp-mystuff

    i’m still not able to get an icon to show up.


    belogical
    Participant

    @belogical

    bump


    Jan M.
    Participant

    @jotem

    You’ll have to edit the css-file in your member-theme.

    In the css/base.css file you’ll find something like this:

    li a#user-settings, li a#my-settings {

    background: url(../images/settings_bullet.gif) 88% 52% no-repeat;

    }

    Just copy that and change the “a#user-settings” to whatever fits your component, like “a#the-navigation-slug”. Don’t forget to put your image in the according folder and changing the name in the code to that name.


    belogical
    Participant

    @belogical

    Jotem = Genius!

    That worked, thanks! I hate core hacks, but looks like it wasn’t going to work any other way.

Viewing 25 replies - 1 through 25 (of 27 total)
  • The topic ‘BuddyPress Skeleton Component v1.2 RC-2’ is closed to new replies.
Skip to toolbar