- Joined
- Apr 7, 2010
- Messages
- 1,699
- Reaction score
- 420
Any updates? :laugh:
I've been kinda busy with school this week, planning on doing a lot today. Anyways, I think I'm going to recreate the core so it allows for you to update your files without wiping all of your edits and settings. Also, I want to make it easier for the general user to push their updates if they want to, and I want to create a cron script that automatically pushes your updates for the public to download, and also downloads the newest edits. So I'm basically going to create a Developer or User switch for the cron. So getting any actual content updates might take some time, as I'll have to code all of that now tt1:
Okay, so I've got this now:
All pages and widgets have a column 'lastedit' with a timestamp
If $devmode is true, a cronjob will load all pages onto a serialized file every 12 hours instead of a simple .sql file
A cronjob will also download the new content every 24 hours from the $updates link, then insert settings you don't have yet into your db, replace all your defaults and ONLY update the pages that have a lower lastedit value.
Also I did a lot of cleanup and directory/file renaming + moving.
Now I'll have to get the management working with this again, seeing as the method I'm using now is quite different from what I did before.
Anyways, for now it can update itself, and only the things that were actually newly added, so if you translate everything you only have to translate the edited pages and widgets everytime a new update is available. Also for devs that would like to put their 'builds' online for users to use, all they have to do use the CMS on a hotel and visit it once a day (which they probably already do if they are make edits..). No need to export tables from phpmyadmin anymore!
Updating from management now works, but it applies the original build everytime you clear the cache (it doesn't overwrite any edits because of the lastedit column though) from there which I'm going to fix now.
Completed that aswell :fanny:
First-time use is now flawless, it's just copying a directory to /htdocs/, editing the config.php to connect to your db, and it will automatically update everything the first time you visit the page. My only problem now is that I'm going to need a place to store my builds for people that want to update my CMS when my PC is offline