chadamas Posted January 18, 2017 Share Posted January 18, 2017 Hello again, ProcessWire gurus! I'm getting started on a new project, which I really want to build on ProcessWire, but it has some unique considerations and I'm having trouble wrapping my head around a few key details that will ensure that it grows from a solid foundation. I can provide additional details, if you'd like, but here's the gist: Users create a "master" account upon registration (I'm thinking simply an e-mail address, username, and password). Users can create up to three sub-accounts. Users can switch between all linked accounts--including the master account--without logging out/back in. (Here's where it gets fuzzy for me.) The currently-active account should be able to access our forum, create topics, and post replies, independent of the other associated accounts. I've attempted to approach this from a number of different directions and keep encountering roadblocks, so I'm hoping someone here has some ideas. Maybe even a forum suggestion that would work well with these requirements as they relate to ProcessWire. I'd love to use Luna, but haven't had much luck there. I could use SMF, but I built an entire website on that previously and am afraid that I'll end up abandoning PW completely (and that my code will suffer and become less-maintainable as a result). Beyond that, my shortlist so far consists of Codoforum (which looks fairly promising) and Vanilla. Honestly...this is just hard to wrap my head around. I have read many, many discussions on ProcessWire + forum integration, and I 100% understand and appreciate the difficulties and nuances of making a website more community-focused, but...how would you approach this task? If you have any thoughts, ideas, or suggestions, I'd love to hear from you. Thank you very much in advance! Link to comment Share on other sites More sharing options...
clsource Posted January 18, 2017 Share Posted January 18, 2017 Maybe using a forum software with a nice REST API will help you accesing data and performing actions like creating users and log them in. some good modern software are http://flarum.org/docs/api/ http://www.discourse.org 4 Link to comment Share on other sites More sharing options...
MindFull Posted January 18, 2017 Share Posted January 18, 2017 Interesting ideas. I think I would probably allow the subaccounts be properties/fields of the master account that are required to be unique. Maybe create a template for subaccounts and have a select option for specific privileges. Then, based on the page being visited, the appropriate sub-account can be retrieved and the privileges set accordingly. That allows a way to determine which sub-account is being used and if a post is created, can use the appropriate account name associated with the master account. In conjunction with clsource's suggestion for a decent REST api, I don't think it would be too difficult. 2 Link to comment Share on other sites More sharing options...
chadamas Posted January 19, 2017 Author Share Posted January 19, 2017 My. Goodness. I find new reasons to love ProcessWire every time I use it. Wordsworth had it right when he said "To begin, begin." (And Ryan Cramer had it right when he began building this beautiful system/framework.) Anyway, back to the topic at hand: I decided to stop overthinking it and just try something. Admittedly, I have a long way to go and I'm sure that I'll encounter more than a few problems, but I think this is actually off to a decent start. I'll probably be back for more help, but I really appreciate your advice, clsource and MindFull. If I manage to get this off the ground the way it was envisioned, I'll try to come back here and provide some additional details in case it will be beneficial for others...but in the meantime, I'll say that I began by taking a step back and remembering that in ProcessWire, everything is a page. Which means that even user accounts can have child pages if you "Show system templates" on the Templates page and allow it. From there, I selected which template was allowed for children (after creating said template, of course). With that, and the fact that ProcessWire's API allows you to easily manipulate sessions, I was off. If anyone has done this before (allowing subpages for users) and has any additional insight or considerations, please let me know. Thanks again! Link to comment Share on other sites More sharing options...
adrian Posted January 19, 2017 Share Posted January 19, 2017 @chadamas - glad it's coming together for you. You might also find this useful: https://processwire.com/blog/posts/processwire-core-updates-2.5.14/#multiple-templates-or-parents-for-users 2 Link to comment Share on other sites More sharing options...
chadamas Posted January 19, 2017 Author Share Posted January 19, 2017 @adrian, thank you very much! I didn't know about this feature but can see it being useful in all kinds of scenarios. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now