× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
More modular
I've only been using US for a few days (and liking it a LOT), so this may be way off base especially if a lot of it is already available/in the works, but my early observations are that UserSpice a) does a great job of covering the bases it says it will, and b) does get in the way a bit.

What I mean is, there are quite a lot of areas where I feel I HAVE to edit files in /users or /usersc, even though that's really not a good idea. 

(Aside: why two directories anyway? I'd rather see all the US core stuff in one folder, and everything a user is likely to edit in another, but even then I'd rather they be under a single folder because I'm a neatness freak Smile)

For example, I want to disable the ability of site visitors to list all subscribers, but the only way to do that is to hack it out of the php. This isn't really a criticism of US since it's not hard to make those edits directly, but if there were a more cleanly defined module approach, it wouldn't need tweaking at code level, and it would make extensibility easier. There are other small examples - again, nothing serious, but it feels like it's due for a bit of a cleanup.

For another - US outputs the entire header and then the start of the body, in one go. I may have overlooked it, but I can't find a way for me to add headers, js/css includes, and so on, without directly editing header.php. I'd really like to be able to affect that directly from within files, because I don't always want the includes. Maybe provide a US equivalent of header() so pages can inject header material before the page renders?

I'd also like to be able to do multi-project management, with users and pages grouped per project, and role-based management including project-limited access. And while I'm thinking about that, I'd also like to be able to include user template files, on a per-project basis. I use global php classes, and I'd quite like to be able to say "For all files in this project, include that file." You may have to resolve issues like conflicting versions of jquery though.

Lastly - the video of "how to do a minimal use" Honey Badger site looks out of date. Far as I can see, all you need to invoke US is this:
require_once 'users/init.php';
if (!securePage($_SERVER['PHP_SELF'])){die();}

Which is pretty darned lean, and I really like that minimalist approach. I have to ask, though, why isn't the second line just moved to init.php? Given that you always want it to be present, it kinda looks like the single require_once line should be all you really need. (One line, for a complete user management backend? That's neat.)

All of this is fairly minor though. I'm liking how US (mostly) takes care of the messy user management stuff and lets me focus on rolling out pages. And that's really the win for me, in a nutshell; just let me focus on my stuff, and take care of your stuff. So a non-function suggestion would be to focus some of the documentation on exactly that. The docs are good from a technical standpoint, but could maybe do with some more focus on the use-case stuff.

Thanks for a great project. Glad I found it!
Hi Jon,

First off, thanks for your contributions and questions in the community so far. We truly do love responding to people and helping them advance their projects with your framework. Fortunately, a lot of what you are requesting is already available, but not heavily documented. I will go into some details here.

The reason for two directories is as follows:
users/ for core UserSpice files only
usersc/ © standing for custom, you can copy and files in the root of users/ directly to this file and the users/ file will never be produced, it will be redirected to the usersc/ version. The usersc/ version, if not in the pages table will be automatically inserted with matching permissions. We try, in EVERY circumstance to never deploy updates to usersc/ with the exception of NEW files for customization. 

To invoke data into the header, you can use one of two files in usersc/includes (I think) head_tags.php or bootstrap_corrections.php, both are called within the header and we do not generally post updates to.

The second line in the minimalist requirements is what invokes the UserSpice permission management. 
init.php is required to use ANY UserSpice Functionality.
securePage only controls access to the page, IF you want UserSpice to control this.

Some projects don't want UserSpice to handle their permissions so they would exempt securePage.

Multi-project Management is something Dan and I have talked out about individually and its a large problem that is hard to tackle but rewarding when done. This would be a huge undertaking and would be more in the likely for a UserSpice 5 release versus 4.4 (currently in development.)

I hope this answers your questions,
Hiya Brandin

Thanks for the userc info - that makes sense. Good to understand that better, and thanks for taking the time to go through it in detail. I get that a lot of my issues are likely to be lack of familiarity for at least a while still to come!

(10-10-2018, 05:31 PM)Brandin Wrote: Multi-project Management is something Dan and I have talked out about individually and its a large problem that is hard to tackle but rewarding when done. This would be a huge undertaking and would be more in the likely for a UserSpice 5 release versus 4.4 (currently in development.)

Well yes. Isn't this the Userspice 5 forum? Smile
It definitely is! I was just more advising when to more expect it since we have a release coming soon!


Forum Jump:

Users browsing this thread: 1 Guest(s)