Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 25 replies - 1,476 through 1,500 (of 1,585 total)
  • @boonebgorges

    Keymaster

    Oops. Well that makes it much easier. I would really like something like this myself, so maybe I’ll get to it soon.

    @boonebgorges

    Keymaster

    The problem with this project is that one of the crucial pieces of data stored with activity items is the user_id, and for non-logged-in-users there is obviously no user_id. So you have to fake it somehow.

    One thought is to have a plugin create a dummy user. All comments from non-logged-in users will be assigned to that user. Then filter the activity content on the way out to detect that user’s ID and rewrite the activity item with the correct commenter name/email address.

    It’s something I’ve been mulling over for a little while, and I will tackle it when I get a few spare hours. If anyone else wants to make it happen, that would be cool too :)

    @boonebgorges

    Keymaster

    I take that back. (Gah, I should learn to research before I write.) I am not running the most recent trunk, and it looks like BP_Group_Member::get_group_member_ids was snuck in since I last updated. Chalk my previous message up to reinventing the wheel :)

    @boonebgorges

    Keymaster

    D – I was getting errors when I tried using the plugin the latest 1.2. Had to do with call to undeclared function get_group_member_ids in order to populate $user_ids. I commented it out and put in the following instead:

    $thegroup = BP_Groups_Member::get_all_for_group( $group->id, false, false, false, true );
    $user_ids = array();
    foreach ( $thegroup['members'] as $member ) {
    $user_ids[] = $member->user_id;
    }

    and it seems to be working now. Am I missing something?

    @boonebgorges

    Keymaster

    bp-activity-subscription, I mean. :)

    @boonebgorges

    Keymaster

    D Cartwright – Great plugin. The problem is that the plugin name in the repo is buddypress-group-activity-stream-subscription, while all of your includes assume that the plugin folder will be called bp-group-activity-stream-subscription. I renamed my plugin folder and all’s well.

    I think this is going to be huge for my community, btw, so thanks.

    @boonebgorges

    Keymaster

    Glad it works!

    Well, checkboxes will be a little trickier because of the possibility of multiple selections. You could try something like:

    <?php if ( bp_get_the_profile_field_name() == 'color' ) {
    global $field;
    $value = bp_unserialize_profile_field( $field->data->value );
    $value = explode( ", ", $value);
    if ( in_array( 'red', $value ) )
    echo '<img src="red.jpg" alt="red" title="red" />';
    if ( in_array( 'green', $value ) )
    echo '<img src="green.jpg" alt="green" title="green" />';
    }
    ?>

    @boonebgorges

    Keymaster

    Thanks for pasting up that code. I think I found the issue. It has to do with the way that content returned by bp_get_the_profile_field_name has filters applied to it, namely the filters that some profile field items into links. There are a couple ways around the problem, but the easiest is to get the data before the filters hit. Thus:

    <?php if ( bp_get_the_profile_field_name() == 'Gender' ) {
    global $field;
    if ( bp_unserialize_profile_field( $field->data->value ) == "Male" )
    echo '<img src="male.jpg" alt="male" title="Male" />';
    }
    ?>

    I didn’t experience this in my test because (I think) my field data came from a textarea rather than a radio button. But the strategy I just gave you should be safe in any case.

    Hope it works!

    @boonebgorges

    Keymaster

    Are you putting it inside of the default profile-loop.php file? Could you paste the whole contents of that file here or in pastebin with a link?

    @boonebgorges

    Keymaster

    Oops, my bad. I gave you the echo functions when you need the non-echoing ones. This works, I just tested it.:

    if ( bp_get_the_profile_field_name() == 'color' ) {
    if ( bp_get_the_profile_field_value() == 'green' )
    echo '<img src="green.png" />';
    }

    @boonebgorges

    Keymaster

    Could be. You might want to try echoing bp_the_profile_field_value() to see what’s popping out for different cases.

    In reply to: Widget system

    @boonebgorges

    Keymaster

    The widgets themselves are not tied to a particular theme, but the sidebars that contain the widgets are – for the very reason that you suggest, namely that different layouts require different numbers of sidebars. That information is generally included in the functions.php file of the theme directory. See for example bp-sn-parent/functions.php, the register_sidebars lines.

    Some information on customizing the sidebars in your theme: http://automattic.com/code/widgets/themes/

    and more on the Widget API: http://automattic.com/code/widgets/api/

    @boonebgorges

    Keymaster

    The code that I listed will not work as is. You have to make sure that you fill in the correct filenames for images, the correct desired values for profile fields, and the correct field names. Also it looks like I messed up and forgot at least one parenthesis. That’s why I said you’d need to tweak it. It should give you an idea of which functions to use, though.

    @boonebgorges

    Keymaster

    That’s great news, OzPoker! Glad to hear the upgrade went well.

    @boonebgorges

    Keymaster

    In [your-bp-theme-dir]/members/single/profile/profile-loop.php, you’ll see a profile loop beginning while ( bp_profile_fields() ) : bp_the_profile_field();. Inside of that profile loop you will be able to use various profile functions to test values. For instance,

    <?php if ( bp_the_profile_field_name() == 'color' ) {
    if ( bp_the_profile_field_value() == 'red' )
    echo '<img src="redbadge.png" />';
    if ( bp_the_profile_field_value() == 'green'
    echo '<img src="greenbadge.png" />';
    // etc.
    }
    ?>

    I have not tested this but it should work fine with some tweaking.

    Your issue with appearance is a CSS thing, most likely that the ul elements are set to display: inline. Try setting them to display: block.

    In reply to: Privacy ?

    @boonebgorges

    Keymaster

    It’s true that the roadmap has changed a lot: https://buddypress.org/about/roadmap/

    There was some talk in the recent buddypress-dev meeting about creating a poll for future feature requests. When such a poll appears on the site, be sure to vote for privacy in the core if you think it’s important for it not to be located in a plugin.

    @boonebgorges

    Keymaster

    BuddyPress’s standard “forums” links are created with the assumption that BP is using the standard integrated version of bbPress. Since your installation is elsewhere, you’ll have to redirect those links. It should only be in one place:

    In header.php of your BP theme, replace <a href="<?php echo get_option('home') ?>/<?php echo BP_FORUMS_SLUG ?>" title="<?php _e( 'Forums', 'buddypress' ) ?>"><?php _e( 'Forums', 'buddypress' ) ?></a> with <a href="http://www.australianracinggreyhound.com/forums/" title="<?php _e( 'Forums', 'buddypress' ) ?>"><?php _e( 'Forums', 'buddypress' ) ?></a>

    As for your more general question, I faced the same issue with a project of mine (whether to maintain an external installation of bbPress or migrate over). I decided that, in the long run, it would be best to move to the standard, integrated version of bbPress. I described the process here: http://teleogistic.net/2009/12/upgrading-from-buddypress-1-0-to-1-1/

    Not sure what’s causing your login issue, but it might be fixable by hardcoding the link into your theme’s header.php file. Replace <?php echo site_url( 'wp-login.php' ) ?> with the correct path to the login page.

    In reply to: Privacy ?

    @boonebgorges

    Keymaster

    Erich73, you might want to follow along at Jeff’s website, where he’s been providing regular updates: http://jeffsayre.com/category/social-media-semantic-web/

    @boonebgorges

    Keymaster

    It sounds to me like your server time is off. Are you on shared hosting? You may want to contact your host and ask them to verify whether the system time is correct.

    In reply to: Need AJAX help

    @boonebgorges

    Keymaster

    I can’t promise that I know what I’m doing :) but I might be able to take a look at it.

    @boonebgorges

    Keymaster

    I guess if you don’t need it to be user configurable you could skip creating a widget and just hardcode the sidebar into your theme.

    @boonebgorges

    Keymaster

    If I understand your question correctly, you’ll want to think of it as a single widget that appears differently for different members.

    Use http://wpengineer.com/wordpress-built-a-widget/ to build a new widget. In function widget(), figure out which user is logged as follows:

    global $bp;

    if ( $bp->loggedin_user->id == 1 ) {
    /* Display the stuff you want user 1 to see */
    } else if ( $bp->loggedin_user->id == 2 ) {
    /* Stuff you want user 2 to see */
    } /* etc */

    @boonebgorges

    Keymaster

    No problem.

    You could just hack the core files to reflect the change in step (3). But it’s good to avoid such hacks when you can; thus the long process outlined above :)

    @boonebgorges

    Keymaster

    Those second times are the gmt times, right?

    @boonebgorges

    Keymaster

    Aha, check those _date and _date_gmt entries. Find a site online that will convert unix time to human readable time and see if the GMT entries are correct. My hunch is that they are not. If my hunch is correct, we can start tracing where those dates come from to see if it’s a server configuration problem or a WP/BP problem.

Viewing 25 replies - 1,476 through 1,500 (of 1,585 total)
Skip to toolbar