Simple Machines Community Forum

SMF Support => SMF 2.1.x Support => Topic started by: mariusfv on July 07, 2019, 02:51:45 AM

Title: CSS box in forum administration panel?
Post by: mariusfv on July 07, 2019, 02:51:45 AM
Question

Has SMF 2.1 on admin side a CSS box to made customization's (font, padding, color etc) and to not be affected the CSS by feature upgrades of SMF?
In our days all CMS have this feature as default.

Is so frustrating every-time to go to syle.css file on server to made a customization.
Title: Re: CSS box in forum administration panel?
Post by: Aleksi "Lex" Kilpinen on July 07, 2019, 03:10:09 AM
As far as I've used CM systems, can't think of a single one that actually has this as default - so out of curiosity, what CMSs actually have it?

But 1.1 or 2.1, won't matter - if you create a copy of the default theme you get a theme that you can edit as much as you like, without css beiing touched by updates (unless you choose so). Never has been a problem with SMF, and css changes in updates are rare as is too....

(But do note, as long as 2.1 is RC, things may be different, that's why it is RC. )
Title: Re: CSS box in forum administration panel?
Post by: mariusfv on July 07, 2019, 05:34:44 AM
"Since WordPress 4.7, users can now add custom CSS directly from WordPress admin area."
https://www.wpbeginner.com/plugins/how-to-easily-add-custom-css-to-your-wordpress-site/

Other CMS approach this idea too.
I know SMF is in RC version, but to can customize CSS in admin panel is a must in our days. I hope SMF developers will consider to add this option, to avoid each customization to force you to login on server / hosting side (ftp, dangerous for beginners to edit system files, etc).
Title: Re: CSS box in forum administration panel?
Post by: Illori on July 07, 2019, 05:37:35 AM
technically you can modify the css from within the admin panel, we do NOT recommend doing this as if something goes wrong you have no backup to restore.
Title: Re: CSS box in forum administration panel?
Post by: mariusfv on July 07, 2019, 05:42:09 AM
If you know, technically everything is possible.  ;D

But, why to not be easy: SMF to add additional CSS box? 
Title: Re: CSS box in forum administration panel?
Post by: Illori on July 07, 2019, 05:47:47 AM
SMF already has a css editor built in, but we dont recommend using it full time.

in other words, the feature you want already exists.
Title: Re: CSS box in forum administration panel?
Post by: mariusfv on July 07, 2019, 05:56:35 AM
Yes, exist... but is not recommend.  ;D

And can be so simple, to add additional CSS box that override existent CSS but not give you access to full existent CSS code. In this way is not dangerous and is recommended.  ;D
Title: Re: CSS box in forum administration panel?
Post by: Aleksi "Lex" Kilpinen on July 07, 2019, 06:10:44 AM
Quote from: mariusfv on July 07, 2019, 05:34:44 AM
"Since WordPress 4.7, users can now add custom CSS directly from WordPress admin area."
https://www.wpbeginner.com/plugins/how-to-easily-add-custom-css-to-your-wordpress-site/

Other CMS approach this idea too.
I know SMF is in RC version, but to can customize CSS in admin panel is a must in our days. I hope SMF developers will consider to add this option, to avoid each customization to force you to login on server / hosting side (ftp, dangerous for beginners to edit system files, etc).

I use WP, I can tell you that is not what you asked. You can add custom css, but any edits you make to the themes in WP will be overridden on update. Unless you make a copy of the theme, just like in SMF.
Title: Re: CSS box in forum administration panel?
Post by: drewactual on July 07, 2019, 07:36:47 AM
I too use WP.  I can't stand it, to be forward, but it's hard to argue with when publishing for widespread syndicate- others are set to collect the feeds in a form they are familiar with even if they aren't using WP while retaining the formatting I provided from my instance.... anyway:

the beauty of SMF, and why I was drawn to it, is the simplicity and thoroughly elegant coding.  Before anyone laughs, crack open WP and look it over.  It's a nightmare- and contributors aren't held to the same standards as the staff here at SMF demand.  It's not a 'lay man's' tool as WP is, and that is fine... attempting to push it in that direction, in my humble opinion, would be foolish.  Once a SMF is properly set-up and presented, it can simply do what it's supposed to do with minimal back-end interaction from admin's.  Introducing items to make it easier for lay men is a parallel trajectory as introducing opportunity to really screw it up and cause headaches for the responsive staff here.   

my $.02, anyway... and no personal insult intended. 
Title: Re: CSS box in forum administration panel?
Post by: Bloc on July 10, 2019, 01:43:38 AM
Wordpress custom themes often have the ability to add your own CSS code and it will not be overwritten by theme updates - its one of their features. They do not however, prevent you from doing specific changes to any styles. Not anyone I've encountered anyhow, but they may exist.

Actually, SMF-wise I think this idea is better off in a theme custom settings page instead, as it allows you to switch back to default theme in case you did something severe(like body { display: none; } :D )..but in most cases a broken CSS will just render the page style-free - not stop working as a PHP error might do.

So in short: add a extra "CSS addons" textarea inside a custom theme settings page and make the theme fetch it as the last stylesheet when starting up. It will carry over even when uploading new versions of the theme and generally be easier to maintain once the changes gets bigger.

Thats on custom theme makers to implement of course, not a core SMF function.(unless the SMF team decides its that too)

Title: Re: CSS box in forum administration panel?
Post by: Bloc on July 10, 2019, 01:52:40 AM
Quote from: drewactual on July 07, 2019, 07:36:47 AM
I too use WP.  I can't stand it, to be forward, but it's hard to argue with when publishing for widespread syndicate- others are set to collect the feeds in a form they are familiar with even if they aren't using WP while retaining the formatting I provided from my instance.... anyway:

the beauty of SMF, and why I was drawn to it, is the simplicity and thoroughly elegant coding.  Before anyone laughs, crack open WP and look it over.  It's a nightmare- and contributors aren't held to the same standards as the staff here at SMF demand.  It's not a 'lay man's' tool as WP is, and that is fine... attempting to push it in that direction, in my humble opinion, would be foolish.  Once a SMF is properly set-up and presented, it can simply do what it's supposed to do with minimal back-end interaction from admin's.  Introducing items to make it easier for lay men is a parallel trajectory as introducing opportunity to really screw it up and cause headaches for the responsive staff here.   

my $.02, anyway... and no personal insult intended. 

I used to think this way too, WP isn't all that fantastic as it may be perceived..but as everything else it can be tweaked. I tweak the functions file quite a lot and do not rely on plugins to do post types etc....so the admin area remains clutter-free. (It might also help using a fork of WP called ClassicPress, it ditches Gutenberg and is forked from WP 4.9 I believe.) Some argue functions.php is not to be used like that - and it may be - but it sure makes WP(or CP if you like :) ) more attractive to use.

Its the same with SMF really, you can add so many mods to it that it hardly moves..and have tons of extra pages and whatnot, not to mention headaches if one or several mods don't work nice togehter. If *some* of that can be ported into a theme the better, thats what I been doing in the past..but its a temporary fix. Most often the problem is that you add lots of stuff you don't *really* need to be there.
Title: Re: CSS box in forum administration panel?
Post by: drewactual on July 13, 2019, 11:32:33 AM
Quote from: Bloc on July 10, 2019, 01:52:40 AM
I used to think this way too, WP isn't all that fantastic as it may be perceived..but as everything else it can be tweaked. I tweak the functions file quite a lot and do not rely on plugins to do post types etc....so the admin area remains clutter-free. (It might also help using a fork of WP called ClassicPress, it ditches Gutenberg and is forked from WP 4.9 I believe.) Some argue functions.php is not to be used like that - and it may be - but it sure makes WP(or CP if you like :) ) more attractive to use.

Its the same with SMF really, you can add so many mods to it that it hardly moves..and have tons of extra pages and whatnot, not to mention headaches if one or several mods don't work nice togehter. If *some* of that can be ported into a theme the better, thats what I been doing in the past..but its a temporary fix. Most often the problem is that you add lots of stuff you don't *really* need to be there.

i think we're saying the same thing and as usual i'm having a harder time expressing myself accurately.

the bottom line in my mind is: SMF could pursue the market of 'doing most the website designers job for them' by introducing functions such as the css block mentioned, and even offering theme plugin's that can be reviewed and further customized before 'activating' from the front end.... but then it would cease being 'simple'. 

i'm thinking it's about perspective- from the lay man's perspective, 'simple' would include the things that WP includes... from the moderately skilled site manager/developer, 'simple' is better described as elegant and concise coding with as little bloat as possible. 

all those bells and whistles required to make a site easier to manage for the lay man or general public offers more area for something to go wrong.... WP does a decent job of mitigating this and they should be commended for that- BUT- they also 'cover their tracks' by doing things like installing/turning on mod_pagespeed, by adding cache rules and expire rules, and whatever else they can as a band-aide.  it's difficult to harm a WP page because each function is wrapped in it's own call- almost like a 'include' instead of a 'require'... their entire basis is to make it simple for novices while hardening it for failures due to sloppy code. 

SMF is clean out of the box, and yes- mod's and mod's head butting can screw with that... and is a practice best avoided. 

there are a couple things SMF did that are head scratchers to me, but.... you gotta remember the 'times' when many of these were introduced.  for instance, the calendar.... it was a big deal to have a 'planner' at one time, but no longer... i would rather have seen the calendar functions expressly regulated to a mod to keep all that code that hardly anyone (now) uses off the source and core/default theme files... obviously, it isn't a deal breaker though!  and..... it was one nifty thing back in its day. 
Title: Re: CSS box in forum administration panel?
Post by: Sesquipedalian on July 15, 2019, 08:06:02 PM
As Illori said, a built-in CSS editor already exists in SMF. Moreover, in SMF 2.1 we made some improvements to it. I have no problem recommending it for people who don't like using FTP to work with the files directly.
Title: Re: CSS box in forum administration panel?
Post by: Bloc on July 16, 2019, 01:50:58 AM
Quote from: Sesquipedalian on July 15, 2019, 08:06:02 PM
As Illori said, a built-in CSS editor already exists in SMF. Moreover, in SMF 2.1 we made some improvements to it. I have no problem recommending it for people who don't like using FTP to work with the files directly.

It depends on what the OP is really after:

In both cases a separate theme-settings-based-CSS-box WILL preserve own styles in a SMF upgrade, theme upgrade or even as easy revert function, since it does not touch the actual file(s). The downside to just a custom theme adding that, is that it would be better if the styles were placed in a rewriteable extra CSS file, rather than dynamically added through the headers - as a custom theme settings would have to do. (well, not necessarily, but at least its more "clean" if you don't want themes to write to the server). The extra CSS file could be minimized and even merged with index.css along with other css files for better optimisation(I believe that is a SMF2.1 core feature)

...On the other hand, if the OP is just not wanting to use FTP for changing files - and is otherwise fine with the above scenarios - then YES, the built-in editor is quite handy.
Title: Re: CSS box in forum administration panel?
Post by: Diego Andrés on July 16, 2019, 02:40:20 AM
For 2.0.x I don't remember CSS updates in patches, but since you can just install them from the package manager the file will never get replaced so any modifications are very unlikely to get lost.
Title: Re: CSS box in forum administration panel?
Post by: Bloc on July 16, 2019, 02:50:50 AM
True, index.css might not be the most risky to change :D but I have very seldom changed any of the core/default theme files, simply to keep the integrity of the installation.


Title: Re: CSS box in forum administration panel?
Post by: Antechinus on July 16, 2019, 07:12:50 PM
Yes Bloc, but you're notorious for rewriting every file in custom themes. :D