Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

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

  • tiptap
    Participant

    @tiptap

    Ahhh moving it to the top worked.

    Thanks Paul


    tiptap
    Participant

    @tiptap

    Paul, I tried that and still no joy.

    I added it to the bottom of wp-config.php and still it jumps to activity.

    Is there any reason why this wouldnt work?

    Cheers


    tiptap
    Participant

    @tiptap

    Could I just have multiple slugs pointing to the same component? And where is the members component located?

    Thanks


    tiptap
    Participant

    @tiptap

    no luck with this yet mate. What ever I do seems to add the link to both the userbar and options bar!


    tiptap
    Participant

    @tiptap

    Man this one is still killing me!

    the code you have given me works. but it puts the link in all 3 levels (buddybar, userbar & options bar)

    After looking in the docs $bp->bp_users_nav seems to do what i want (which apparently works the same as $bp-bp_nav)

    However nothing gets returned


    tiptap
    Participant

    @tiptap

    cheres brajesh. will have a go with those now


    tiptap
    Participant

    @tiptap

    AHH ok.

    It looks like the core function I need to modify is bp_get_displayed_user_nav(); Which is called in the options bar.

    Is it possible to modify that function without going into the core component? ie could i just re-write it and place it in bp-custom.php?

    Thanks for the help so far


    tiptap
    Participant

    @tiptap

    OK basically I want to do this;

    Add an item to the optionbar for this;

    http://example.org/members/XXXXX/

    So when I’m viewing someone elses profile I would like to add an item to the options bar which by defualt includes;

    Activity

    Profile

    Blogs

    Wire

    Friends

    Groups

    I don’t want to add the new item to the usersbar or the buddy bar


    tiptap
    Participant

    @tiptap

    Cool thanks.

    Ok thats not the set of files i need. I’m looking for the template that outputs the optionsbar.

    The output is something like;

    <div id=”optionsbar”>

    <h3>Jebel Ali Golf Resort</h3>

    <ul id=”options-nav”>

    ……

    </div>


    tiptap
    Participant

    @tiptap

    Hey so I gave up in the end and will continue tonight.

    Does anybody know how I can get something to the options bar of the members section with out adding it to the users bar?


    tiptap
    Participant

    @tiptap

    Just to add to this, after further searching I think what I need to do is add only a menu item to the the options bar only.


    tiptap
    Participant

    @tiptap

    Ok so now my next question.

    What would I need to do to only make this visible on certain profiles (ie ones where a certain field in xprofile_data is present)?

    Currently I have the extra component visible on;

    My Account on the buddybar

    The Me section

    and a users profile menu.

    I put an if statement around the part that sets up the nav. but that doesnt work. It just either shows it in all 3 or none at all


    tiptap
    Participant

    @tiptap

    Oh great, that was simple!


    tiptap
    Participant

    @tiptap

    cool, already looking into that now.

    although (correct me if im wrong), that seems to create a standalone component accessed via;

    http://example.com/component/

    However I was wanting to create one that ties into the users profile…. such as

    http://example.com/members/some-member/my-custom-component/

    Could you give me some pointers on to how I should get started?

    Cheers


    tiptap
    Participant

    @tiptap

    Thanks for the help Jeff.

    The reason I posted is due to not finding anything definitive in the search… all results I have found on “deep integration” are either people saying you need it or are they using it….

    however one of the results gave me an idea.

    What if I keep bbpress as the group forum. but then use simplepress to handle the more traditional forum?

    That way im guessing it would be treated as 2 seperate forums – all i would need to do then is share the user data?


    tiptap
    Participant

    @tiptap

    Thanks Jeff.

    I’ve followed that link and got stuck a bit.

    I have the one-click-install working without a problem.

    I then uploaded BBPRESS to a new directory off the root (called it /forum/). browsed to that directory and didnt get taken to an install page….

    Am I missing something?

    Thanks


    tiptap
    Participant

    @tiptap

    I called the function incorrectly

    $bp->bp_check_usertype($bp->displayed_user->id);

    should have be

    bp_check_usertype($bp->displayed_user->id);


    tiptap
    Participant

    @tiptap

    works a charm


    tiptap
    Participant

    @tiptap

    Ok so I created;

    /wp-content/plugins/bp-custom.php with the below in it;

    /**
    * bp_check_usertype()
    * TEMPLATE TAG
    *
    */

    function bp_check_usertype($userID) {

    global $bp, $wpdb;

    $qry = $wpdb->get_var("SELECT value FROM wp_bp_xprofile_data WHERE field_id = 5 AND user_id = " . $userID);

    /* Sort the nav by key as the array has been put together in different locations */
    echo $qry;

    }

    However when I call it in /bp-themes/mymember/profile/index.php like so;

    $bp->bp_check_usertype($bp->displayed_user->id);

    I get the following error

    Fatal error: Call to undefined function: bp_check_usertype() in /html/wp-content/bp-themes/mymember/profile/index.php on line 31

    Am I missing something?


    tiptap
    Participant

    @tiptap

    I think I’ve solved it (but havent built it yet). This is what I’m going to do;

    -Write a function in bp-custom.php

    – Function takes the current ID and passes that to the db returning the usertype (which is a custom profile field)

    – Run the function on profile/index.php

    – then do a simple switch statement to show the appropriate template


    tiptap
    Participant

    @tiptap

    ahhhhh you’d don’t know how long I stayed up trying to work out how to get it to work.

    adding the global got it working.

    Thanks hugely


    tiptap
    Participant

    @tiptap

    Jeff that sounds more logical.

    and in fact i was trying to get that to work last night.

    why would it be <?php echo $bp->displayed_user->id; ?> added into /profile/index.php doesn’t output the id?

    Thanks


    tiptap
    Participant

    @tiptap

    I had similar that needed that recently.

    Have you tried

    global $wpdb;

    $row = $wpdb->get_results( $wpdb->prepare(“SELECT user_login FROM $wpdb->users WHERE u.ID = %s”, $username) );

    print_r($row);

    I think you access each individual column like this

    $row[“coloumRow”];

    see if this helps https://codex.wordpress.org/Function_Reference/wpdb_Class


    tiptap
    Participant

    @tiptap

    just a guess but is it get_row you need?


    tiptap
    Participant

    @tiptap

    I would also like to know this

Viewing 25 replies - 1 through 25 (of 32 total)
Skip to toolbar