Skip to:
Content
Pages
Categories
Search
Top
Bottom

URL Translation

  • Avatar of Thezohan10
    thezohan10
    Member

    @thezohan10

    Dear Buddypressers,

    Well, i have a tought one here! i would like to translate or let´s say rewrite the URLs, For Example: testbp.com/members – testbp.com/miembros.

    Which would be the best aproach? Changing the *uri*.php? Maybe with HTACCESS??…

    What i need are ideas, suggestions… insults!! …

    Tnx n´Cheers,

    Z.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Avatar of Andy Peatling
    Andy Peatling
    Keymaster

    @apeatling

    members can be changed at the top of bp-core.php. The other URLs are not translatable right now.

    Avatar of Thezohan10
    thezohan10
    Member

    @thezohan10

    Excellent, thank you very much

    Avatar of Dudboi
    Dudboi
    Participant

    @dudboi

    Sorry to hijack this thread, but I’ve been wanting to change the groups URIs, and ok, so I know that groups is hardcoded in.

    But I tinkered around with it and basically created a GROUP_SLUG and set that, in my case, to “projects”. Everything works fine (I had to change a few template things but otherwise it’s ok) except I have a teensy weensy problem with the catchuri function

    So now all my pages are something like siteurl.com/members/username/projects/action

    (siteurl.com/members/username/projects/, siteurl.com/members/username/projects/my-groups, siteurl.com/members/username/projects/group-finder. You get the idea)

    And it works fine until I create a wordpress page called projects, then for some reason siteurl.com/members/username/projects rewrites to siteurl.com/projects, which in my case would be the wordpress page instead of the groups memberpage. I’ve tried taking a look at catchuri, and playing around with the is_page function, but even if I try to name the page something else, like say “projects main”, it still ends up trying to add the template into the page, which naturally fails and ends up with the 404 template.

    I also don’t know if it’s related, but my wordpress mu is in a subdirectory, which looking at the catchuri code, doesnt seem to deal with subdirectories at the first explosion of the uri to rewrite (but I may be mistaken), so before the explosion of the actual site_uri function, $bp_uri[component_index] ($bp_uri[0]) actually returns me the subdirectory that my wp mu is in. I’m not sure if this is a bug and/or if it affects muy uri rewriting, but I thought I’d mention it.

    p.s. when I delete the projects page, members/username/projects rightfully shows me the my-group template.

    you can take a look at it here http://donicethings.org/beta

    If anyone could help me I’d be most grateful, thanks!

    Avatar of Andy Peatling
    Andy Peatling
    Keymaster

    @apeatling

    I committed a fix today that should stop the above from happening.

    Avatar of Dudboi
    Dudboi
    Participant

    @dudboi

    Hey Andy, thanks for the great work, I just checked out r571 and merged the necessary differences. Now it seems that any member page gets rewritten to index.php!

    Avatar of Andy Peatling
    Andy Peatling
    Keymaster

    @apeatling

    Line 11 of bp-core.php:

    define( 'BP_CORE_ROOT_COMPONENTS', 'groups' . ',' . MEMBERS_SLUG );

    Make sure you have changed ‘groups’ to ‘projects’.

    Avatar of Dudboi
    Dudboi
    Participant

    @dudboi

    Hmm I have that already. I’ve been trying to figure it out and all that’s turned up so far is my firebug is reporting any component page with a 302 header (Moved Temporarily). I didn’t change my .htaccess file prior upgrading to the latest revision (which only involved file movements. Unless there’s some upgrade process that I’m unaware of).

    Very weird.

    Avatar of Dudboi
    Dudboi
    Participant

    @dudboi

    Ah I figured it out! Textbook case of failure to RTFM. I uploaded member-themes into the themes directory instead of the wp-content directory.

    Well, at least I learned a little bit more about how buddypress works through the wonderful invention that is var_dump!

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

The topic ‘URL Translation’ is closed to new replies.