Skip to:
Content
Pages
Categories
Search
Top
Bottom

Ajax updating member header bp_activity_latest_update?


  • mrglasspoole
    Member

    @mrglasspoole

    Hi,

    i have the member header above the member activity.php. If i post something the post shows up in the loop immediately after submit.
    But how to update it also immediately in the header (bp_activity_latest_update( bp_displayed_user_id() ))?

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

  • Boone Gorges
    Keymaster

    @boonebgorges

    How much do you know about jQuery and AJAX? You’d have to extend the bp-default javascript so that, on the AJAX response, it also updates the contents of div#latest-update. Not too difficult, but it would take a bit of time custom coding the necessary JS, as well as the PHP callback that would produce the necessary HTML.


    mrglasspoole
    Member

    @mrglasspoole

    My jQuery and Ajax is ok, but my PHP is not so good (most time trial and error and wasting time). Thats the reason why the ajax.php is a nightmare to me.
    If i would unterstand how and where the new update gets injected in the loop, i would fire up jQuery after that to grap the content of bp_activity_content_body() from entry.php and put it in.

    STOOOOOOOP *lol

    just in the momend i was writing the above i had the lightening. I was looking around in ajax.php and didn’t see how it works. You know why – cause the action is in global.js.
    And here it is:
    jq(“span#put-latest”).each(function() {
    jq(this).text($(“ul#activity-stream .activity-inner”).eq(0).text());
    });

    Sometimes you can’t see the wood becaus of all the trees….

    Sorry for spelling errors, i’m german.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Ajax updating member header bp_activity_latest_update?’ is closed to new replies.
Skip to toolbar