Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 8 replies - 1 through 8 (of 8 total)
  • Avatar of KS Web Designer
    KS Web Designer
    Participant

    @ks-webdesignercom

    Perfect, that did the trick. For anyone else following this be sure to add the semi-colon after return $thread_template->message->date_sent so the snippet reads:

    function absolute_message_sent_date() {
        global $thread_template;
        return $thread_template->message->date_sent
    }

    Just one quick follow-up question. How do I change the date format? Where do I specify how the date should appear?

    Thanks again!

    Avatar of KS Web Designer
    KS Web Designer
    Participant

    @ks-webdesignercom

    Thanks again, just needed one slight tweak. Final code is as follows:

    <?php echo 'Hi ' . bp_core_get_username( bp_loggedin_user_id() ) . ' – Account Type: ' . xprofile_get_field_data( 'FIELD NAME OR ID', bp_loggedin_user_id() ); ?>

    Didn’t need the “field=” for xprofile… Works using either the field name or the id.

    Avatar of KS Web Designer
    KS Web Designer
    Participant

    @ks-webdesignercom

    Thanks, it kinda works. Only if I’m viewing my profile page. If I view any other page on the site it doesn’t find the value and just displays: Account:

    I am trying to run this in the header.php file of my template…

    Avatar of KS Web Designer
    KS Web Designer
    Participant

    @ks-webdesignercom

    @claudeg – in case this is useful to you or anyone else: I was having this same issue. After you posted that it might be to do with that arg in the all-images template I think I found a fix. I replaced this line:
    $args['owner_id'] = false;
    with:
    $args['owner_id'] = bp_displayed_user_id();

    That seems to have done the trick. I’m a little worried as the comment next to that line did say “do not change”, but as I am running this on a fresh site I figured I’d give it a go and I think the gamble paid off…

    Avatar of KS Web Designer
    KS Web Designer
    Participant

    @ks-webdesignercom

    Spot on! Thanks @shanebp

    Avatar of KS Web Designer
    KS Web Designer
    Participant

    @ks-webdesignercom

    So this thread asks pretty much the same question: linky – but on the post I link to there seems to be a crucial bit of code missing. @Foxly says “paste this bit of code”, but then all I see are quote marks.

    Anyone happen to know the bit of code that might be missing?

    Avatar of KS Web Designer
    KS Web Designer
    Participant

    @ks-webdesignercom

    Thanks that’s very helpful.

    However I also need to make some code changes in the same general area, so if someone can help me locate the right place to be making those changes I would also appreciate it.

    Thanks

    Avatar of KS Web Designer
    KS Web Designer
    Participant

    @ks-webdesignercom

    So I’m trying to figure this out on my own and I got as far as finding out that since BuddyPress 1.7 there’s a new class: BP_User_Query – which should be similar to the standard wordpress WP_User_Query

    However the official BuddyPress documentation page for the class is just a holding page (argh!) – http://codex.buddypress.org/developer/class-reference/bp_user_query/

    Does anyone have a basic ‘Hello World’ example they could give me for pulling in a list of users based on a custom profile field?

    I’d really appreciate it.
    Thanks

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