Skip to:
Content
Pages
Categories
Search
Top
Bottom

Moving bbPress Edit profile forms


  • Azinfiro
    Participant

    @azinfiro

    I’m starting this thread because I didn’t have much luck with my original thread on the BuddyPress Support forums.

    Basically, what I’m trying to do is copy all the forms from the Edit page from the bbPress profile to another page and still have them work.

    Specifically, I’m trying to move them to the Settings page on the BuddyPress profile.

    The problem is that they don’t work when they’re moved from their original url, the pre-defined values aren’t displayed and submitting changes doesn’t work, so I’m hopelessly trying to find out what is broken and if this is even possible to do.

    Any help will be appreciated.

    Thank you.

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

  • Azinfiro
    Participant

    @azinfiro

    Bump


    Azinfiro
    Participant

    @azinfiro

    Okay, let’s raise the stakes.

    I will donate a six pack to whoever successfully helps me get this to work within a reasonable time frame.

    I hope it’s okay to do that here?


    Robin W
    Moderator

    @robin-w

    my wife would be delighted if I had a six pack, but suspect that’s not what you are talking about !

    ok, so if I understand you correctly, you are trying to have the links that are

    profile
    topics started
    replies created
    Favorites
    subsciptions
    edit

    and place them on a buddypress page?

    Is that correct?


    Azinfiro
    Participant

    @azinfiro

    my wife would be delighted if I had a six pack, but suspect thatโ€™s not what you are talking about !

    I hear you can get crafty six pack-making belts on the shop***g channel that work wonders at the same price though! ๐Ÿ™‚

    Is that correct?

    Not exactly, I’m trying to move the content of the edit page from bbPress over to the settings page on BuddyPress, or any other page for that matter.

    Maybe I should add that I’m making a custom WP/BBP/BP theme, so if it’s something that can easily be done by working with the template files as opposed to drawing up plugins then I’m happy to do it that way.

    I started reading up on how PHP forms work, but I figure it’s safer to ask someone who knows what they’re doing when it comes to things like user inputs.


    Robin W
    Moderator

    @robin-w

    ok, but what exactly do you mean by “the content” – can you post a utl to the page that you want to be a buddypress page?


    Azinfiro
    Participant

    @azinfiro

    The site is hosted locally so I can’t give you an actual live URL if that’s what you mean?

    The page is a ‘customized’ version of the BuddyPress Settings page located at DOMAIN/members/USER/settings/.

    Just think of it as a blank WordPress page with that URL.

    By “the content” I mean the <form id="bbp-your-profile> element, and everything within it, on the Edit page at DOMAIN/forums/profile/USER/edit/.

    The template file that contains the form is called form-user-edit.php.


    Robin W
    Moderator

    @robin-w

    ok, you could just call each by their url

    or if you know the username you could call the form from within a page using the ‘insert php’ plugin

    https://wordpress.org/plugins/insert-php/

    then

    [insert_php]
    $user_id = whatever you used to get the user-id
    $filelocation=”wp-content/plugins/bbpress/templates/default/bbpress/form-user-edit.php”;
    include($_server[‘DOCUMENT_ROOT’].$filelocation);
    [/insert_php]


    Azinfiro
    Participant

    @azinfiro

    Thanks for the reply.

    I can’t actually access the BuddyPress Settings page in the backend. Are you suggesting I use the shortcode inside the template file?

    I’m making a theme, so I would really prefer not to rely on plugins. Besides, I would love to know how the form-user-edit.php actually works. ๐Ÿ™‚

    Can you say what I need to edit or add to the content of form-user-edit.php get to get it to work somewhere else?

    I’m not sure what you mean by calling each by their url. Can you elaborate?


    Robin W
    Moderator

    @robin-w

    Yes, we will get there, but I’m not totally clear on how you are doing your bit, so am struggling to help !

    ‘Iโ€™m not sure what you mean by calling each by their url. ‘

    Basically if you hover over the links in the profile page you get

    profile http://www.mysite.com/forums/users/%username%/
    topics started http://www.mysite.com/forums/users/%username%/topics
    replies created http://www.mysite.com/forums/users/%username%/replies
    favorites http://www.mysite.com/forums/users/%username%/favorites
    subscriptions http://www.mysite.com/forums/users/%username%/subscriptions
    edit http://www.mysite.com/forums/users/%username%/edit

    where %username% is the username

    so if in your coding you already know the username, then you can simply put these usls on your landing page.

    alternately you can just call the forum-user-edit.php from your page.

    What I still don’t understand is what ‘page’ you are trying to do this one.

    is this what you are describing as the template file? and which file is that and is it a php file?

    Sorry if I’m sounding thick, but come back and I’ll try and help further


    Azinfiro
    Participant

    @azinfiro

    is this what you are describing as the template file? and which file is that and is it a php file?

    Let’s start with this. The file is a BuddyPress template file called settings.php. It’s wiped clear of any code though. You can find it in buddypress/bp-templates/bp-legacy/buddypress/members/single if you have downloaded BuddyPress.

    This template file controls the BuddyPress user Settings page and I am trying to turn it into a working copy of the bbPress user Edit page.

    ok, so if I understand you correctly, you are trying to have the links that are … and place them on a buddypress page?

    I can’t figure out why you’re listing the URLs you mentioned in above quote again. I’m really sorry if I’m missing something, but I feel like I need to reaffirm that this is not what I’m doing.


    Robin W
    Moderator

    @robin-w

    I’m sorry but I know nothing of buddypress, but I thought you wanted your page to look like the bbp profilepage, and that simply uses code to create the urls hence why I quoted them !!

    If you just type these urls in, they work, they don’t need any code.

    so what happens if you just rename the form-user-edit.php to settings.php and drop it in the right directory?


    Azinfiro
    Participant

    @azinfiro

    Gotcha, glad we’re on the same page now. ๐Ÿ™‚

    What happens when I rename the form-user-edit.php to settings.php and drop it in the right directory is that I get the right markup, but the forms don’t work when submitted. They also don’t display any pre-submitted values like they would if they did work.

    In fact, they don’t work anywhere except at their original location at example.com/forums/profile/%username%/edit so it doesn’t really matter whether I’m trying to make them work in BuddyPress or any other page.

    I’m sure it’s just a matter of understanding how WordPress or specifically BuddyPress implement PHP forms and the rest should be a cakewalk.


    Robin W
    Moderator

    @robin-w

    ‘Iโ€™m sure itโ€™s just a matter of understanding how WordPress or specifically BuddyPress implement PHP forms and the rest should be a cakewalk.’

    Absolutely. Most answers are simple once you’ve found them!

    I don’t quite know what to suggest next !


    Azinfiro
    Participant

    @azinfiro

    Right, I guess I’m moving on to the Stack Exchange. Worst case, I’ll have to figure out how PHP forms are done in general, figure out some MySQL in relation to WordPress and sprinkle with security precautions.

    Do you have a donation link? I don’t think anybody else is going to drop by and help me out before I figure it out elsewhere ๐Ÿ™‚


    Robin W
    Moderator

    @robin-w

    Do you have a donation link?

    I do, but it’s probably not etiquete to put it on this forum !

    But when you do find the solution, PLEASE post it back here, so that others searching later can find it !


    Azinfiro
    Participant

    @azinfiro

    I will if I find an acceptable solution. It would be better if one of the developers could drop by and share their wisdom though.

    There is also a small chance that BuddyPress Trac ticket #5619 will materialize and effectively solve my problem before I do.

    Anyway, thanks for the help!

Viewing 16 replies - 1 through 16 (of 16 total)
  • You must be logged in to reply to this topic.
Skip to toolbar