Skip to:

How to display user content via jQuery Ajax.

  • Hi everyone,

    since I’m relatively new to buddypress and google won’t give me any useful answers (or maybe i’m searching for the wrong stuff), hopefully someone here can help with that.

    I want to display user content [ like bp_profile_field_data() ] in a jquery modal window using jquery ajax .
    My attempt was, to create a custom php file, which contains nothing but the functions i want do be displayed and which is then included via ajax in the jquery modal window.

    The modal window and jquery ajax works fine, but the function within the included custom php file outputs the following kind of error:
    “Fatal error: Call to undefined function bp_profile_field_data() […] “.

    Obviously, the server doesn’t know what to do with the function, i guess because my included custom php file is not recoginzed by buddypress or something like that (the file is in my theme directory though).
    Any ideas on how to get this to work?

    Second: I included the files necessary for the jquery modal window and ajax manually.
    Just recoginzed buddypress has the jquery library already included and uses ajax out of the box.
    However, the modal window won’t work with the included jquery library, so i additionally included the latest version, which made it work. Though, i don’t know about ajax, how do i use
    the version buddypress already has and or doesn’t it matter?

    System Information:

    1.I use the latest buddypress(1.6) and wp release (3.42), which i updatet from the latest earlier version.
    2.I develop my site on a 32 Bit Win7 localhost environment using xampp.

  • The topic ‘How to display user content via jQuery Ajax.’ is closed to new replies.
Skip to toolbar