userfrosting / UserFrosting

Modern PHP user login and management framework
https://www.userfrosting.com
Other
1.63k stars 366 forks source link

SB Admin 2 #132

Closed alexcroox closed 9 years ago

alexcroox commented 9 years ago

Noticed this is built off SB Admin, there is SB Admin 2 which looks pretty nice.

http://startbootstrap.com/template-overviews/sb-admin-2/

Is it a case of straight replacement or is there a lot of heavy customisation on the theme?

alexweissman commented 9 years ago

There is a good deal of customization in css/bootstrap-custom.css. However, I would like to switch over to SB Admin 2 (or some other template) at some point, mainly because it would let us upgrade to a newer version of Bootstrap.

So yes, good call!

andreasf2012 commented 9 years ago

Interesting issue...

Is it presently possible to combine sb-admin-2 and userfrosting? Should I add userfrosting into the sb-admin-2-template or the other way? Which specifics I have to consider?

Thank you in advance!

alexweissman commented 9 years ago

The main issue is that we use some custom modifications of sb-admin.css in css/bootstrap-custom.css. Since sb-admin-2 is designed differently, we'd have to implement those modifications differently.

So, you can start by replacing sb-admin.css with sb-admin-2 (doing this for both the master template and the regular template), and then figure out what needs to be fixed in bootstrap-custom.css to get it to look right again.

andreasf2012 commented 9 years ago

Thank you!

If I understeand you right, I have to substitute the files "sb-admin.css" AND "sb-admin-master.css" by the file "sb-admin-2.css"? I am asking, because I can't find a second css-File like "sb-admin-master-2.css".

lilfade commented 9 years ago

I spent a bit looking around on the internet for userfrosting related content and found a bunch of stuff (mostly a bunch of people claiming UF to be © as there work which is no biggie but i did find quite alot of people looking for some way to "customize" the template to there own. This looks like a feature thats wanted pretty good ill take a stab at it and see what i come up with but if anyone else wants to try to change the themes around if you find anything can you document your findings with what needed to be changed and such.

Edit: should we make this a drop in replacement for "themes" like unzip the bootstrap theme you want and drop it in a folder and bam done or maybe mysql storage for the themes or something else maybe?

alexweissman commented 9 years ago

@andreasf2012 sb-admin-master.css is just a modified version of sb-admin.css. The point is to provide the special red styling for when a user is logged in as the root user, vs any other user. Honestly, there is probably a better way to do this than having two separate css files.

@lilfade theming is a good idea. Actually, if we're going to do theming, we should allow customizable themes for different groups, or even users. So, we might have a "public" theme, "root" theme, "admin" theme, "user" theme, etc. What do you think?

lilfade commented 9 years ago

I don't think it would be too hard but we'd have to get it just right to be extensible for plugin to take advantage of the system as well. I think it's a good idea should we store this in the db I think this would be the best way and cache it to file upon changes to the db, this will require some chmod but I think for this purpose it should be fine.

lilfade commented 9 years ago

I'll take a look at it tonight and see what I can come up with I have another idea about something else that may tie in with this we shall see. If you have any other input let me know unless you have time for this one haha.

alexweissman commented 9 years ago

Sounds good. Time...hmmm...what's that?

andreasf2012 commented 9 years ago

@alexweissmann Thanks! I think, the easiest way for me as a beginner is to use the "normal" uf with the modules of sb-admin!

I would support you in creating templates, but my knowledge is not sufficient, sorry!

But I like your way, to create software/frameworks which can be used by programmers like me, thanks a lot!

UnicornDelight commented 9 years ago

I think having different "themes" for different user groups is a brilliant idea. In addition to changing the general look & feel per each group, this could also bring that proper "split" between the customer & the site admins/employees or a bit deeper if we add "client" between the customer & the employees.

Now I was ready to write up a long explanation on my thoughts (I can't seem to find the best way to explain it via text), but I think I'll give this custom drop in "theme" thing a spin in the next few days and share the concepts I'm currently thinking of.

@alexweissman Regarding the custom css, what if each "theme" has the ability to drop in custom css, via file upload or textarea entry, that would saved for that theme to use. Or maybe instead/additionally, we could utilize "theme" styling options via colour picker, checkboxes, etc for various core things? This could make it easy to switch/add "themes" while keeping and/or allowing the proper "custom" styles to be in sync. Just a quick few random thoughs; I'm sure there are other/better options out there as well.

lilfade commented 9 years ago

I was originally going for a "drop in" of the bootstrap themes as UF is built upon bootstrap I think in the long run we'd like to decouple the sb admin theme from the core code while still allowing the administration to choose what custom theme shows to who as this would enable the end user to say upload or add a new style sheet on the fly without ever opening a php file.

Some things I was thinking of though, if we go this route a expansion of the template no functions could go hand in hand with this as well. We could allow the user to use css files to add themes or have them added via the acp and cache the db output upon the saving of the theme to css files so it would make it really easy on the end user who would like to just copy and paste the css rather then figuring out the file location. We could do this for the js and Images as well.

I think in the long run if we do this correctly we could update the bootstrap and associated files without ever touching the css theme files. If we update the templating system to start using some variables as place holders or more hooks so a end user could add new pages with minimal css or php knowledge.

Just some ideas to float around and knock at and see what comes out of it all, I really like the fact someone new is ready to kick at UF ' under belly instead of just passing through after not finding they like a certain feature ^_^.

alexweissman commented 9 years ago

Yeah, @lilfade makes a good point. To summarize, there are really two aspects to a "theme":

  1. The colors, fonts, stylings, etc which could be represented entirely via CSS.
  2. The actual layout and organization of the different components of the page. This would require modification of the HTML, either directly or through a templating system.

We could do something like Wordpress, which I believe has themes that consist of templated HTML/PHP, custom CSS, custom JS, and maybe even some extra PHP functions. See their guide here: http://codex.wordpress.org/Theme_Development#Anatomy_of_a_Theme

@UnicornDelight I know that many Wordpress themes support customization of colors, text, etc. So, our themes could provide hooks for developers to easily modify colors, fonts, etc - perhaps even through a frontend interface.

lilfade commented 9 years ago

So we basically need to move to a decoupled mvc type of system, in the way that our account/ pages will be our logic and render our templates separate. This would cut down on the learning curve for the end user as little as it is already. We would need to add a few more template functions if we go this route but could also cut down on some repetitive code and filesize.

alexweissman commented 9 years ago

Yeah. It doesn't necessarily need to be MVC, or even MOVE, but we do need better decoupling. And abstraction.

UnicornDelight commented 9 years ago

First off, I'm sorry I haven't been around, but will be more available at the end of the month.

@lilfade When I see something that doesn't have what I need, but see it's potential, I get unreasonably exited. I originally tried out UserCake, but slowly ended up leaving it behind due to various reasons. So when I read about UserFrosting many years later and saw that it was very active in a more open environment/community, I was beyond excited. Plus, WHO passes up Frosting? :P

@lilfade @alexweissman Some very good ideas there, though I'm really not a wordpress fan as it lies now. Although, after some picking at it, I couldn't really break it down to one way to do it. Mostly due to conflicts I had with my opinion on what would be best for the Developer/User crossed with what UserFrosting is all about.

Warning: The following is relevant to the thread and what we have been talking about, but it may be suited for it's own thread. I've cut it down drastically to make it quick, but I can see I have left out a lot of things and may have included the worst analogy ever. So if I should move it to it's own thread and make everything more complete, let me know. If I'm being completely idiotic and rude here, let me know; I tend to over-think things and love to break boundaries that I shouldn't.

So, UserFrosting.... In general, it's a (minimum dependencies) UserManagement system that is awesome and easy for developers of all skill levels to use as a starting point for their projects. Clean, secure, flexible, lightweight, up-to-date, and fun, right? Or what is it REALLY all about? WHERE is it heading? Is it built for the Developer, or the Client (Is it something the client can do mostly without the developer)? Or is it pushing to be a barebones kit for the developer to build anything they can think of quickly and efficiently? Maybe something completely different?

Breaking down "Barebones", does this mean the developer can layout the foundation (Yes I'm using a weird house analogy :P) and then add on some prebuilt rooms (Messaging System, Multisite, SuperBasicStore, etc) while also going to the stockpile/catalog of various readily available materials (This one is very wide to describe quickly) to build a new room with? Maybe in the same stockpile/catalog, you have options/things to furnish the newly built house with (Design/Frontend/Bootstrap/Etc)? Maybe a mixture or even something completely different? Have I gone mad? Yes, I have, but I really hope that made even a little sense.

There are other questions such as Why/WhatFor/How/Etc and much more details and opinions that I believe can be asked. I'm digging quite deep into UserFrosting, because I'm certain it can become something awesome regardless of what path it goes down. I have my opinions and starting December/January, I'll be pushing a lot of awesome (current & future) features I've been working on for the last few months (and have planned) for a huge ongoing project of mine.

alexweissman commented 9 years ago

Haha, no problem. At this point we really need a full-fledged forum (possibly built on UF ) to carry on and encourage conversations like these :-D

You've asked some really good questions, many of which have been on my mind as well. Let me do my best to give you my angle on these issues:

Clean, secure, flexible, lightweight, up-to-date, and fun, right? Or what is it REALLY all about?

These are definitely goals for UF that I feel in some places (secure, flexible, up-to-date, fun), we've done quite well with, but in other places (clean, lightweight) we still have some work to do. On top of that I would add:

Is it built for the Developer, or the Client (Is it something the client can do mostly without the developer)? Or is it pushing to be a barebones kit for the developer to build anything they can think of quickly and efficiently?

Not sure what you mean by "client", but I'm guessing you're talking about this guy. It sounds like you're asking whether we're trying to build another Wordpress - which I will say at this point, emphatically, no. Sure, Wordpress makes it easy for someone without any programming experience to set certain kinds of websites. But, it is no substitute for the full power of a [Turing-complete language(https://en.wikipedia.org/wiki/Turing_completeness), which PHP, Python, Java etc happen to be.

The "target consumers" for UF are new developers who know how to program, and need a web solution that doesn't require massive development and design teams. They are small teams, or one-man operations like me, who don't want to get locked in to one of the full-stack frameworks. Which is great! Full-stack frameworks are passe.

That being said, the end user/client/whatever should still be able to do some configuration, like authorization control, group management, etc. So, we will try to build nice frontend interfaces for this where appropriate.

...the developer can layout the foundation (Yes I'm using a weird house analogy :P) and then add on some prebuilt rooms (Messaging System, Multisite, SuperBasicStore, etc) while also going to the stockpile/catalog of various readily available materials...

An apt metaphor for modular design and a plugin system ;-)

Have I gone mad? Yes, I have, but I really hope that made even a little sense.

Pretty sure we wouldn't be trying to pull this off if we weren't a little mad in the first place:

Men have called me mad; but the question is not yet settled, whether madness is or is not the loftiest intelligence. ― Edgar Allan Poe

UnicornDelight commented 9 years ago

I 100% agree with the forum. Maybe something extremely basic to start?

I don't even need to say much as it looks like we both thinking similar here. Honestly, your response was so brilliantly crafted; makes me even more excited to work on this project with this awesome community. :D

ghost commented 9 years ago

At this point we really need a full-fledged forum (possibly built on UF ) to carry on and encourage conversations like these :-D

@alexweissman, I highly recommend phpBB. It won't be built on UF but it's ready to go out of the box. I am looking to contribute to this project so i'd be happy to run the forum if you're too busy to manage it. I manage one already and am familiar with how it works. I have hosting space as well.

alexweissman commented 9 years ago

Thanks, yeah I know phpBB is pretty popular. Send me an email at at alexanderweissman.com, we can talk about it.

alexweissman commented 9 years ago

I'm starting to work on the implementation of groups for the new version of UF, and I need to sort out how we're going to do theming. I've already implemented the structure for adding themes (it is similar to Wordpress' themes, but more elegant and using Twig ;-) )

The question is, how should themes be assigned? To individual users? Or to groups, and then users will get the theme associated with their primary group?

alexweissman commented 9 years ago

Alright, theming has been implemented: https://github.com/alexweissman/UserFrosting/tree/dev-0.3.0/userfrosting/templates/themes. Basically, it consists of theme directory containing a collection of HTML templates and a theme stylesheet (theme.css).

There is a base collection of HTML files in the default theme, which represent the core renderable content of the UF system. Other themes can override these files simply by creating new versions of the files in their own folders. Twig (templating engine) will try to load the theme's files first, falling back on the default theme files. Then, the theme stylesheet will be loaded (or the default stylesheet, if the theme stylesheet is not present).