bp member profile path in edit group url for membership plugin

Ive been trying to look for the answer for hours, but Im sure theres a simple answer. Im using bu mu and the membership plugin with buddypress, In edit group urls, I have http://mysite.com/member and http://mysite.com/groups etc... I am restricting these for strangers. But even though a stranger cant go to /member or /groups they are able to click on a group or member icon and go directly to /member/usernameexample or /groups/groupnameexample or whatever comes after that path. Is there a tag that I can use after /member/ that will be like a asterik as in searching for a doc in windows like /member/*? Is there a better way other people are restricting access to url pages of buddypress?

  • tishimself

    Hi,

    I set up a BuddyPress URL group that included only "my-woodcraft.com/blogs/.*" & enabled a negative rule for visitors. I did remove my bp-custom.php slugs since I was unsure how they would be handled.

    When openning the home page I get a message on my browser the webpage ..../access-restricted_to_paying_members/ has "resulted in too many redirects. When I remove the negative URL Group rule from the visitors level, the redirect message goes away.

    I tried using only "my-woodcraft.com/blogs/" and a vistor can open the home page, but the same message is displayed when I go /blogs/ or /members/ etc.

    Any ideas?

    Larry

  • tishimself

    Hi,

    I don't know what a posiitive rule would do as they have access to the blogs by default, but I added a POSITIVE rule and yes they still have access to the blogs. No redirect loop.

    I added a URL Group for my SiteMap page and a negative rule and it redirects to the noaccesspage just fine. (my-woodcraft.com/sitemap/.*).

    The I tried testing my Buddypress URL Group (my-woodcraft.com/blogs/.*) with my About page and then my Sitemap page as the noaccesspage. The Redirect loop was still a problem, so it has nothing to do with my noaccesspage.

    Rather then provide a screen shot I stripped down the Visitor rule to be just the Negative URL rule for the Buddypress URL Group(my-woodcraft.com/blogs/.*). The result was still a redirect loop.

    Regards,
    Larry

  • tishimself

    Hi,

    I set up seperate URL Groups for testing access to groups, members, forums, blogs & activity seperately. Having multiple URL Groups will add flexibility for each membership level too.

    I also added a URL Group for an individual blog using the form "subsitename.mydomain.com/.*" This would make it possible to some blogs available to Visitors to give them a sample of what is available to members.

    Oddly enough, using the seperate URL Groups eliminated the Redirect Loop problem. I used a negative rule for visitors to block access to each of these areas individually. Just for grins I went back to BuddyPress URL group where all the rules reside and the Redirect Loop occured.

    One issue is that I can view the Members Directory, but get blocked when I select a member to view the individual's details. This behavior is different from any of the other URL Groups I used. I *need* to block the Members Directory as a whole. Is there a way to accomplish this?

    Two, The URL Group listing the individual subsite blog did not work. Is there a rule that will accomplish this? This would be "needed* to permit different levels access to different subsite content.

    Three, all blocks are redirect to the same page. It would be nice to have multiple redirect pages for specific situations rather than try to explain everything on one page. I think I can live with one page, but would rather have multiples.

    Regards,
    Larry

  • tishimself

    Hi,

    >>Two, The URL Group listing the individual subsite blog did not work. Is there a rule that will >>accomplish this? This would be "needed* to permit different levels access to different subsite content.

    If I can add such a URL Group it would probably best be a Positive Rule, so only the listed subsites would be available to Visitors. But I can't have both Positive and Negative URL Group rules for a given level, eg. a Negative for Members but a Positive for some blogs.

    Regards,
    Larry

  • tishimself

    Hi,

    So I am trying every syntax I can think of in my Group URL to control access to one blog.
    Most blogs will be available to registered free users, but they require one that is for members only so my syntax hunt continues:

    myprojects.mydomain/.*
    mydomain/myprojects/.*
    mydomain/.myprojects/.*
    mydomain/mywoodcraftblogs/.myprojects/* (Where mywoodcraftbogs is my bp-custom slug.)
    etc.

    Any suggestions?

  • tishimself

    Hi,

    I appreciate your suggestions.

    The Redirect Loop was caused by my hitting enter at the end of a Group URL. Actually I pasted the rules in place and there was a blank line, but both will cause the loop. It seems like the plugin could have a safeguard against this.

    I have not deleted & reinstalled the membership plugin. I have no reason to think it is not working properly. And sInce that would take hours to reconfigure, I would need a pretty good reason to do so. I have disabled/reneabled and upgraded it to the latest version.

    The notion of using a positive rule for accessing a BuddyPress page is confusing to me. By default the blogs are all accessable, including to one I'm trying to control. I can't have both Positive and Negative URL rules for a membership level. I don't see how it will help or for that matter even be testable. Maybe membership level scheme will clarify what I'm am trying to accomplish, but it is probably more than you wanted to know :slight_smile: :

    Visitors or Strangers:
    -No access to blogs, membership directory, Groups or Forums. (works fine, wish I could specify seperate redirect pages for each of these, but I can make do.)

    Free Registered users (must accept the TOS to view blogs):
    -No access to Groups or Forums
    -No access to Membership Directory (Would like to exclude Free Users from the directory, but how? Best I can think of is to make these subscriptions finite of short duration to miminize their numbers.)
    -Access all blogs but one, which is for Paid Members Only (I can't make this work but it will require a negative rule.) Except for the one blog, these blogs are to advertise individual paid member private practices.

    Paid Members
    -Full access to blogs, groups, forums, members directory as well as some Membership only pages.
    -Access to all blogs, but I will need to modify the BuddyPress blog index page to put the Members Only blog on top for ease of access. This is not a problem, I have already modified the blogloop to ensure visted blogs have a _blank target. Modifying the Index page to add a link at the top for the MembersOnly blog will also be easy using the Child Theme.

    Regards,
    Larry

  • tishimself

    Hi,

    I moved my URL rules to positive and selected just the rule for my one blog. As a result there was no access to the blog index page or much of anything else. However, I could still directly address any blog using the URL. Maybe I could add a positive rule to add the blogs index page, but I'm not sure that that would look like. Besides, I think it would be impractical to maintain a positive URL rule.

    What I need is the definitive syntax for specifying a negative rule for a blog so that I can see if it works or not, this is what I am curently and it does not work:

    http://myprojects.my-woodcraft.com/.*

    Larry

  • tishimself

    Hi,

    Please confirm that this is correct:

    VeBailovity: after some inspection, yes, I believe that url group restrictions are limited to
    current domain.

    and so I am unable add URL group controls for blog subsite subdomains.

    Now for alternatives, do I have any?
    Is there a way for me to change the Membership plugin to allow subdomain controls?

    If Buddypress knows $levelid,then I can add code to blogs-loop.php to not display this specific blog based on the levelID. Does buddypress have access to the memberhsi $levelid variable?

    I can't think of another alternative.
    Larry

  • DavidM

    Hi Larry,

    Yes, actually. The following functions are available when Membership is active:
    current_user_is_member()
    current_user_on_level($level_id)
    current_user_on_subscription($sub_id)

    The $level_id and $sub_id can be found out by hovering your mouse over the respective membership level and subscription in the membership lists at Membership > Edit Levels and Membership > Subscriptions.

    Those should work just fine within that BuddyPress blogs-loop.php as well, and in fact there was another member here on site who used those within the members loop.

    There's also a bit of discussion surrounding customizations like that at the following thread:
    https://premium.wpmudev.org/forums/topic/getting-membership-level-for-a-particular-user

    Cheers,
    David

  • tishimself

    Hi,

    By using the info on the topic in the link you provided I was able to pull (based on the memberhsip level) the one blog from the BuddyPress directory. Presuming that blog is not made public it will be available only to paid members. Not very secure, but they can "password protect selected content" for which they have a security concern.

    I was also able to use simillar code to make the BP Members Directory not list Free Users. Using the URL Group the directory is only available only to paid members.

    Thanks,
    Larry

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.