Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to find way around code


  • JMunce
    Participant

    @jmunce

    Is there a resource that tells us more or less where we can find the files that will effect various parts of BuddyPress?

    For example, if I want to edit my profile/edit/(group/1) template, where can I find that file?

    I read through the Documentation, which provides some information for the various users of BuddyPress (including devs), but I didn’t find this sort of thing. Is there a guide or some way we can understand how the screens and files break down?

    Thanks,
    JM

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

  • danbp
    Moderator

    @danbp

    Hi,

    before finding something, you have to search. What do you search ? Nobody knwos ! 😉

    Generally, custom work in Bp is done around template files.
    bp-templates/bp-legacy/buddypress/

    Custom code can be added via bp-custom.php (you have to create this file manually and install it in wp-contet/plugins/ folder

    And here a good ressource to search (if you know what) and to get any needed information around that search: http://hookr.io/plugins/buddypress/#index=a

    Another tool to use locally and which can be helpfull is notepad++, which has an incredible built-in search engine. But like with the online tool, you have to know what to search.


    JMunce
    Participant

    @jmunce

    Hi @danbp and thank you for responding.

    I had been searching the files inside the plugin, trying to find one that directed the layouts so I could edit that. I figured I would back up the entire plugin, then make notes on the files I was going to edit, then edit them and add comments so I could move my edits to future versions.

    I tried searching for page elements, like ” Editing ‘Base’ Profile Group ” which appears on the profile/edit page, but when I tried searching “contents of files, too” I didn’t come up with anything. Maybe you or someone has some suggestion for a good program to drop the files into so I can “search file contents”? I also tried “inspect element” and searched some code there but wasn’t successful. (I’m not a veteran coder by any means — self-taught and have only coded 3 or 4 websites ground up, so there’s a lot I’m not aware of from the coder world).

    Thanks for providing that resource. That will be useful when I need to build something with BuddyPress code. I think for editing the existing code though I need to try to find the files that match up with the BuddyPress pages (profile / profile/edit / etc).


    shanebp
    Moderator

    @shanebp

    It can be bit confusing at first.

    The profile templates are here:
    buddypress\bp-templates\bp-legacy\buddypress\members\single\profile\

    Don’t edit them.
    Create template overloads and edit those.


    JMunce
    Participant

    @jmunce

    @danbp This is just an idea, but maybe it would be possible to harness the power and motivation of us bunch of developers who want to work on additions to BuddyPress but don’t know our way around the BuddyPress code if one of you guys responsible for the code were to do a basic YouTube video where you just, say, set out to make 3 changes to it (maybe along the lines of whatever people are requesting the most), then just looked at the page before, went into the code and found that, made the edit, then returned. Even though the actual code might not be useful for what others are doing, just seeing what it looks like when you do it and getting a feel for someone navigating the code / editing it may give us a good footing?


    JMunce
    Participant

    @jmunce

    @shanebp Thank you for pointing me towards the files and towards “overloads.” I’ll be on that today.


    JMunce
    Participant

    @jmunce

    @danbp and @shanebp

    Working on a tutorial for people unfamiliar with BuddyPress on one of my blogs: http://blogunity.net/front/how-to-customize-your-buddypress/

    Obviously just a work in progress but I think it will help introduce the task. Any thoughts welcome.


    JMunce
    Participant

    @jmunce

    Stumped. How can I link a button to logged-in-user’s-activity-stream? (the same thing clicking on “Activity” does) ?

    I have the button, but how to I link it? or where can I find this link code for the header items “Profile” “Activity” “Notifications” etc.?


    danbp
    Moderator

    @danbp

    @jmunce, nice extension effort ! Why not contributing to BP’s codex ?

    An answer to your question:
    https://buddypress.org/support/topic/my-contributions-tab-with-subtabs/

    Note, related to ” the right way”: BuddyPress is filtrable to 95% (or so).
    https://codex.buddypress.org/type/action/
    https://codex.buddypress.org/type/filter/


    JMunce
    Participant

    @jmunce

    Thanks @danbp , Yes when I have something presentable I’ll offer it to the codex.

    I’ve been able to edit the header (profile and group), but

    where can I find the code for undernieth the header? The section that has Activity Profile Notifications Messages etc on “Profile” and Home Members Send Invites on “Groups”?

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘How to find way around code’ is closed to new replies.
Skip to toolbar