ADD Maintenance to CMSimple_XH 1.6.5

Discussions and requests related to new CMSimple features, plugins, templates etc. and how to develop.
Please don't ask for support at this forums!
Holger
Site Admin
Posts: 3470
Joined: Mon May 19, 2008 7:10 pm
Location: Hessen, Germany

Re: ADD Maintenance to CMSimple_XH 1.6.5

Post by Holger » Wed Dec 17, 2014 9:02 pm

svasti wrote:as far as I remember — it looked strange, when the template was dark, to have suddenly a fully white screen with a small login form in the middle.
svasti wrote:I'd propose for the detached login form that either the template remains in the background with a dark overlay and the login form will be in the foreground, or alternatively that the surrounding area of the login form be middle gray.
I think that guys from google should think about their search-result page, which is mostly white, too. If they link to pages with a dark background... :lol:
Ok, kidding aside. I thought we discuss a technical implementation of a feature. A background - colour should not be the problem. Beside this, that detached login must not be the default -- it should only be easy possible.
A workaround could be to add "&print" and inject some css for styling on the fly. So it's fine with me as it is.


cmb wrote:I'm not sure if that really would be helpful. For one thing, it is not necessarily clear, if there should be a common some_new_filename.php for all languages or separate files for each language. The former would simplify things, but it would make it harder wrt. internationalization. For another thing, depending on the storage place of some_new_filename.php, the file(s) could not be uploaded from the backend. If the user has to use FTP anyway, they could (temporarily) replace index.php (or maybe cmsimple/cms.php) with something else.
Hmm, I can't follow your objections :? ...
In short: I only want to propose to have the same as userfuncs.php for cms.php -- but for index.php -- nothing more.
cmb wrote: For one thing, it is not necessarily clear, if there should be a common some_new_filename.php for all languages or separate files for each language. The former would simplify things, but it would make it harder wrt. internationalization.
That file gets included by index.php. Since cms.php isn't loaded at that time, there is in fact not yet a multi - language -system available. So we need only on file.
cmb wrote:For another thing, depending on the storage place of some_new_filename.php, the file(s) could not be uploaded from the backend.
So let's put it into /cmsimple, beside userfuncs.php. Why should it be an issue not to be able to upload that file in the backend? I can't remember a request for that until now.
cmb wrote:If the user has to use FTP anyway, they could (temporarily) replace index.php (or maybe cmsimple/cms.php) with something else.
Just see this proposal "detached" from the topic-title. It should be a simple feature (or a dirty workaround for missing / userdefined hooks and autoloading) like userfuncs.php is. You have to use userfuncs.php for things not possible by a plugin and this file to do things before cms.php gets loaded.

It seems to me having such a default file for index.php (I have no idea for a name of that php file yet) makes a lot of things possible.
And wrt. a maintenance mode: I would put only the few necessary lines of code to that file, the rest (configuration, internationalisation and so on) could be made as a plugin as usual.

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: ADD Maintenance to CMSimple_XH 1.6.5

Post by cmb » Wed Dec 17, 2014 10:16 pm

Holger wrote:I thought we discuss a technical implementation of a feature. A background - colour should not be the problem. Beside this, that detached login must not be the default -- it should only be easy possible.
FWIW: the code to detach the login form is still in cmsimple/cms.php. If anybody wants to see it in action, it is sufficient to uncomment line 1042-1043 in cmsimple/cms.php (CMSimple_XH 1.6.4). It might be good to get some more opinions whether the detached login form would be disturbing.
Holger wrote:Just see this proposal "detached" from the topic-title. It should be a simple feature (or a dirty workaround for missing / userdefined hooks and autoloading) like userfuncs.php is. You have to use userfuncs.php for things not possible by a plugin and this file to do things before cms.php gets loaded.
Ah, I see. Well, in this case I'm not against including such a file instead of cms.php, if the file exists.

I'm not sure how to handle the voting, though. :?
Christoph M. Becker – Plugins for CMSimple_XH

svasti
Posts: 1660
Joined: Wed Dec 17, 2008 5:08 pm

Re: ADD Maintenance to CMSimple_XH 1.6.5

Post by svasti » Wed Dec 17, 2014 11:04 pm

Why not simply put the file ".maintenance.htm" into the downloads folder? Probably this folder won't change in the near future, so it sould be relatively update proof and the path could be hardcoded in index.php. To activate the maintenance mode the webmaster would simply rename the file without the starting dot. One could even make the file editable.

Holger
Site Admin
Posts: 3470
Joined: Mon May 19, 2008 7:10 pm
Location: Hessen, Germany

Re: ADD Maintenance to CMSimple_XH 1.6.5

Post by Holger » Thu Dec 18, 2014 8:26 am

cmb wrote:Ah, I see. Well, in this case I'm not against including such a file instead of cms.php, if the file exists.
Fine :) . But why instead of cms.php?
I think just load that new file before cms.php if exist -- same as userfuncs.php before the plugins -- is much more flexible.
This way a lot of other things become possible. For example setting up a scheduled and safe backup with a "pseudo" cron-job and much more... (But let's not start to discuss on that at this time.) And it's still possible to drop loading of cms.php with a simple exit() / die() if necessary.

But I've still no idea for a name of that optional file in ./cmsimple :? .
cmb wrote:I'm not sure how to handle the voting, though. :?
It seems to me that voting on the topic "Add maintenance to the core" is useless anyway, because all involved people in this thread has stated that there is no real need for that and that it's easy possible to work around potential issues (me included).
So let's just vote about the possibility to include a file before index.php instead, which is required to make things like the maintenance possible. And if the feature will be available, I'll provide a plugin-based solution for those who want or need a safe maintenance mode.
svasti wrote:Why not simply put the file ".maintenance.htm" into the downloads folder?
Should be possible, why not?. But in that case I would prefer not to use a hidden file. And, beside this, it would not work out of the box if a user has changed the path or name of the folder, which is possible since a long time.
But I think we must not longer discuss details of a built-in maintenance mode, because I think we can drop that request as I wrote above.

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: ADD Maintenance to CMSimple_XH 1.6.5

Post by cmb » Thu Dec 18, 2014 12:01 pm

Holger wrote:And it's still possible to drop loading of cms.php with a simple exit() / die() if necessary.
ACK.
Holger wrote:But I've still no idea for a name of that optional file in ./cmsimple :?.
No good idea here either; maybe before.php, forerun.php, or pre*.php (e.g. prelude.php)?
Holger wrote:But I think we must not longer discuss details of a built-in maintenance mode, because I think we can drop that request as I wrote above.
I agree that we don't need to discuss this any more. I suggest to change the task name to "add optional file inclusion before cms.php" on the roadmap (and add a resp. note there), and vote about that. A small issue I see is with existing second language's index.php, which won't be updated automatically -- probably not much of an issue in practise.
Christoph M. Becker – Plugins for CMSimple_XH

Holger
Site Admin
Posts: 3470
Joined: Mon May 19, 2008 7:10 pm
Location: Hessen, Germany

Re: ADD Maintenance to CMSimple_XH 1.6.5

Post by Holger » Thu Dec 18, 2014 2:25 pm

cmb wrote:I suggest to change the task name to "add optional file inclusion before cms.php" on the roadmap (and add a resp. note there), and vote about that.
+1
Could you make that change? I have not yet voted for 1.6.5 but will do that until voting ends.

cmb wrote:No good idea here either; maybe before.php, forerun.php, or pre*.php (e.g. prelude.php)?
Nice would be user*.php to have both files (the new one and userfuncs.php) next to each other.
So maybe "userprelude.php" could be choice...

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: ADD Maintenance to CMSimple_XH 1.6.5

Post by cmb » Thu Dec 18, 2014 2:38 pm

Holger wrote:Could you make that change?
I've just send a PM to notify the others about that issue.
Holger wrote:Nice would be user*.php to have both files (the new one and userfuncs.php) next to each other.
So maybe "userprelude.php" could be choice...
That's okay for me. Maybe others can come up with a better name?
Christoph M. Becker – Plugins for CMSimple_XH

Post Reply