Skip to:
Content
Pages
Categories
Search
Top
Bottom

Multiple user types – possible?

  • @devweb

    Participant

    Hi all

    I would like to setup BP so that you can have different user types, for example a ‘visitor’ user that can’t have blogs but has access to certain profiles, and another that can have everything.

    Obviously each of these will require a seperate signup – is this possible?

    I noticed that there are different ‘profile groups’ does this have anything to do with it?

    Thanks, DW

Viewing 25 replies - 1 through 25 (of 37 total)
  • @johnjamesjacoby

    Keymaster

    dw, anything is certainly possible! ;)

    Right now, there is no built in “rank” structure, but it wouldn’t be too hard to build one. As it stands right now, the permissions plugin for BuddyPress is going to get a brief make over to accommodate some changes to WordPress MU. Once we have a look at how that is going to work, the best way to make user ranks without worrying about backwards compatibility will probably be fairly obvious.

    @devweb

    Participant

    Is it worth me taking a look at permissions plugin in that case?

    And any idea what ‘profile groups’ are for in the admin of WPMU? There doesn’t appear to be any use, but it sounds like the foundations of what I am looking for.

    Thanks for the great reply J : )

    @johnjamesjacoby

    Keymaster

    The permissions plugin will be an integrated part of BuddyPress when version 1.1 comes around. As it stands today, it isn’t available to anyone but the developer(s). :D

    If I am understanding you correctly, profile groups and fields are used as pages of user editable information within their profiles, so you can have a group for “Personal” one for “Contact” one for “Pets” one for “Vehicle” etc… It’s part of the Extended Profiles plugin, and will also get a bit of a facelift for 1.1.

    If you need to set permissions right now today, unfortunately I don’t have a real great answer for you yet, other than kind of side stepping what you need until a built in option comes available.

    @jeff-sayre

    Participant

    Hi John:

    Is the permissions plugin the same thing as the privacy component Andy mentions in this thread (post #4)? https://buddypress.org/forums/topic.php?id=39#post-158

    I literally just started (i.e. this morning) coding a bare-bones privacy plugin for BP that in essence controls privacy at the profile subgroup level.

    A simple radio button array appears in each subgroup’s title bar with options to grant or deny viewing access. It offers the following granular subgroup level of control:

    • allow/deny anyone (i.e. globally public or private)
    • allow/deny only logged in users
    • allow/deny only friends

    It’s not much of a privacy filter, but it is a start.

    If it is the case that V1.1 will have the first generation of the privacy component, then perhaps I should simply wait. I’m sure the core developers will provide a more powerful (and better) solution than I could.

    Jeff

    @johnjamesjacoby

    Keymaster

    Yes sir that’s exactly what I’m speaking of. The goal is to be able to control all ends of a process inside a component, and this will come with time.

    This means the scope from an administrative perspective, a preferential scope from an individual user perspective, and then of course a viewers perspective. Intertangle groups and friends into this mix, and what results is a very large array of conditionals that need to align to allow/disallow a specific process.

    What if I only want friends to view my contact info? And then also my feed? What if an admin wants to force that info to always be visible if you’re registered? So all users have all access and no one can block it? I think you get the idea…

    @jeff-sayre

    Participant

    Thanks for the detailed response, jjj!

    I knew the official BP privacy solution would be (much) more advanced than mine. In the meantime while v1.1 is incubating, I’ll finish my basic profile privacy plugin. It will help me learning about coding BP components.

    @devweb

    Participant

    J

    So how might I go about creating different user accounts now? I mean, different signup credentials? For example, two types of user: Main (With all the current stuff, username, password, etc etc) then another say, visitor (with a signup consisting of maybe username, name, address and email) account?

    I envisage this being – you click on ‘create an account’ and go to a screen where you choose from two radio buttons and click ‘next’, then you go to the appropriate signup page.

    Any ideas?

    Cheers J

    @jeff-sayre

    Participant

    devweb, sorry about the little thread jacking :(

    There is a plugin on WPMU Dev ( http://wpmudev.org/project/default-user-role ) that allows admins to set the default user role on signup. There’s also this plugin ( http://agapetry.net/news/introducing-role-scoper/ ) that seems to offer significant role customization in WP. However, I cannot find this particular plugin in the WP repositry so beware.

    You may also get some useful ideas from this thread on the Mu forums: https://mu.wordpress.org/forums/topic.php?id=8217

    Granted, these are all WPMU-specific ideas, not BuddyPress. But Mu is the platform on which BP sits, so this may be of some use if you’re planning to code your own solution.

    @devweb

    Participant

    Jeff – thanks!

    No worries about the jacking! lol

    Will check out the answers, atleast there appears to be some hope! I’ve got to get to grips with the coding a bit more before I can confidently get something sorted. What you have suggested is a great start though so thanks!

    DW

    @psyber

    Participant

    I would like to bring up this topic again, as it is very crucial to the development of my website and I want to see if there have been any updates in the 10 months since this was posted. Right now I have blogs disabled, the main purpose of the site is to have different types of users interact on the site, and be able to search the site based the different details in their profiles..

    Multiple profile types:

    For my website I would like to have 4 profile types, all profiles have the same permissions, they just have different details listed in their public profile. These details can be defined during the registration process.

    2-Stage registraion:

    When the user decides to register, they are prompted with a page where they will select their profile type. Upon selecting their profile type, they will be taken to a second part of the registration process where they will fill in their profile information, each type of profile having a different form to fill in.

    This should go along the lines of what Dev posted, minus the permissions. This is a huge hurdle for me to overcome, and if I can there will be one more addition to the Buddypress Community. :-) Any help or direction is appreciated.

    @anonymized-96400

    Inactive

    @psyber

    You can just add to the existing registration process via the available hooks. So basically you add a dropdown field where the user has to select an option. Then you use a bit of jQueryness to display the various profile fields you want that user-type to fill in. I’ve done something similar for group types. Took about 20 minutes to code, so it’s not really hard :)

    @bowromir

    Participant

    I don’t have a solution for all your problems but assigning different “user” types to your site is easy:

    – Create a xprofile field in your BuddyPress admin. For example: What kind of user are you:

    a. Swimmer

    b. Skater

    c. Surfer

    – Install the BP Member filter plugin: https://buddypress.org/forums/topic/bp-member-filter

    – Users can now filter members on the member directory page to find certain usertypes

    The only thing you might want to look into is to show/hide specific xprofile fields for different groups. That’s more advanced and requires some new code to be written by someone ;)

    Good luck!

    edit: Maybe if you combine both tips from Boris and me you just got your solution ;)

    ps: I’m interested in the jquery profile fields stuff as well.. sounds handy!

    @anonymized-96400

    Inactive

    Bowe, I’d store user types as usermeta. Might be a bit more work code-wise, but I think more flexible.

    Showing certain profile fields by user-type with jQuery is just your basic conditional stuff. If this user-type is selected, then show these fields, if another type is selected show some other fields.

    @peterverkooijen

    Participant

    Will this type of functionality – multiple user types stored as usermeta, two-stage registration process – ever become part of the core? Is it on the roadmap?

    Many site developers are not php programmers; they know html/css with perhaps a bit of jquery and php customizing skills, but not enough to code it in 20 minutes.

    @bowromir

    Participant

    A plugin would be a good solution.. Extend Member Profiles or something. I certainly would not be able to creating something like this with my zero PHP skills :-)

    @djpaul

    Keymaster

    The only thing you might want to look into is to show/hide specific xprofile fields for different groups. That’s more advanced and requires some new code to be written by someone ;)

    This is possible without too much effort, I have recently done it for a client. I considered using usermeta to indicate the type but it worked better for my client’s site to have it is an xprofile field. I wrote some code to not display or permit changes to it after registration, too.

    @bowromir

    Participant

    You think you can make it a plugin DJPaul or maybe a documented php file/tutorial, basically anything that might help the average non-techie out ? :D

    @psyber

    Participant

    Gentlemen, thank you for the feedback. While I have no experience with JQuery, I envision exactly what you mentioned Travel-Junkie. I would like to build off of the existing reg form because it is so easy to setup on the backend. I’m gonna keep my eye on this one, I have been really happy with BP and the community so far.

    @designodyssey

    Participant

    OK, I know this might not be well-received, but learning a bit of PHP will allow you to do almost anything with WP (and break some stuff too). It’s not that different in syntax than javascript (at least functions).

    I’m not a programmer, but a guy who bought a book on PHP/MySQL awhile back and WP is so easy you could teach yourself the basic stuff.

    If you’re not comfortable building things from scratch, start with a plugin that does 70%+ what you want and then toy with it. I’ve been able to butcher a few plugins into exactly what I need. Also learned JQuery from w3Schools and JQuery is amazing.

    I’ll be trying to solve the challenge presented here sometime in March. I believe some future BPCONTENTS plugin should do it, but until then there should be enough WP functions/hooks to make this relatively simple with a nice JQuery front end.

    If you run across an example that has different levels (some needing approval), please share.

    @peterverkooijen

    Participant

    OK, I know this might not be well-received, but learning a bit of PHP will allow you to do almost anything with WP … I’m not a programmer, but a guy who bought a book on PHP/MySQL awhile back and WP is so easy you could teach yourself the basic stuff.

    I’m being dragged kicking and screaming into learning PHP. I don’t have the time and can’t afford to hire a PHP programmer, but keep running into things that I’d consider basic core functionality that isn’t up to standard.

    I’m not asking for new features, I just need a solid core that will let me get things done, starting with member management, including things like multiple user types.

    When WordPress first arrived the point was to separate layout (html/css), functions (php) and data (mysql) as much as possible, so anyone with basic web development skills (html/css/design/content) could build and maintain sites. In Buddypress it all starts to mix again.

    @jeffsayre

    Participant

    Just a little heads up about JQuery. If you rely solely on JQ to display or hide certain fields, sometimes you will not get the intended behavior if a user has disabled javascript in their browser. It all depends on what methods/actions you are using to accomplish the hiding.

    BP and WP are relying more heavily on JQ scripting to accomplish certain tasks. So, whenever you are coding JQ functions to hide or show certain objects, you have to be doubly sure to test your JQ scripts on all browser types with javascript turned off just to make sure that the behavior is consistent across the board. In other words, will the very small subset of users who turn off JS be able to inadvertently gain access to fields that they are are not supposed to see.

    I struggled with this when coding my BuddyPress Privacy Component. It would have been a lot easier to simply have relied on JQ to accomplish many of the privacy filtering functions, but by doing so I would have been risking a given user’s requested privacy by exposing their data to users who had JS turned off.

    The lesson here is that if your intent is to truly sequester a subset of data from certain users, JQ is probably not the best solution. I now look at JQuery as simply a nice tool for effects, for UI/UX experience. It is not a tool for basic security protocols.

    @takeo

    Participant

    @Peter Separation of logic, data and presentation doesn’t mean that you don’t have to know how to code if a program doesn’t have the logic you require. And I disagree that the layers are less separate in BuddyPress than WordPress.

    If you want to learn PHP… I would highly recommend lynda.com. I use their training videos all the time and they are worth every cent.

    @designodyssey

    Participant

    @David, thanks for Lynda.com. I find most of what I need on php.net, w3schools.com and youtube.com, but always looking for additional resources.

    I’d have to disagree though about separation. From Andy’s response, I take that separation to be less than desirable, but workable. See https://buddypress.org/forums/topic/buddypress-theme-with-wptheme#post-32424 and https://buddypress.org/forums/topic/buddypress-theme-with-wptheme#post-32593 and http://themehybrid.com/community/topic/hybrid-version-08-discussion#post-2398.

    This is not an indictment of BP, but an acknowledgement that at current form is very tightly linked to function and separating them won’t be easy, particularly without some php skills.

    @peterverkooijen

    Participant

    …if a program doesn’t have the logic you require

    That is the key for me. Buddypress misses a lot of things that I think should be part of the core. I’m not asking for features like galleries and event management, but basic standard member registration stuff, getting data to/from xprofile, etc. BP is still very new of course, but this attitude that, “hey, you can program it in 20 minutes” is worrisome. Andy has also made some comments that suggest separation of logic, data and presentation is not exactly a priority for him.

    If you want to learn PHP…

    I really don’t… ;-)

    I don’t have the time. I can’t afford it. I’m on the content/publishing site. I don’t make any money from web development, although I’m kinda forced into a career change recently…

    @bowromir

    Participant

    My problem is basically that I’ve spent years learning myself all kinds of stuff (xhtml/css/photoshop/marketing/journalism/community manager) but always skipped the PHP part. If I decided to pick up programming PHP 6 years ago, instead of waisting countless hours drawing ugly designs in photoshop, I would now be a very happy programmer :P

    I’ll look into Lynda, because I’ve learned a lot from them in the past (I followed a few audio production courses, which were great!)

Viewing 25 replies - 1 through 25 (of 37 total)
  • The topic ‘Multiple user types – possible?’ is closed to new replies.
Skip to toolbar