Martijn Geerts Posted January 10, 2013 Share Posted January 10, 2013 Just a wild thought, It's maybe convenient when the ProcessWire gives you the opportunity to select a profile before installing PW. After the install is finished, ProcessWire & the profile are ready to use. 2 Link to comment Share on other sites More sharing options...
arjen Posted January 10, 2013 Share Posted January 10, 2013 Maybe a WordPress style themeswitcher? Note: sarcastic. 1 Link to comment Share on other sites More sharing options...
Pete Posted January 10, 2013 Share Posted January 10, 2013 It's not a bad idea (the first idea, not the second one ). The easier you make it to install a particular profile the better, but my idea (which I remember posting ages ago) was to have the PW download page a bit like the jQuery download page where you build a package. Think of it - the core and default profile are ticked for download. You can select a different profile and that's your basic options. On top of that though, there could be a list of useful modules - by this I mean the most often used/searched for (there must be some stats from the modules directory - I'm looking for them now on Google Analytics). The downloader would then fetch the relevant packages from GitHub and merge them together into one zip file on the fly. I seem to recall the biggest issue for this being how to fetch stuff from GitHub, but someone's already solved that with the ModulesManager EDIT: There is obviously some overhead to this, but this is a dedicated server after all, plus this idea makes us look quite slick, gives users what they want and puts it all together so all they need to do is install it. Version 2 is a single file they upload to their server and they do the same thing but it fetches all the files to their server and installs it based on the settings in the single file installer 5 Link to comment Share on other sites More sharing options...
Pete Posted January 10, 2013 Share Posted January 10, 2013 In fact, I've got a little time tonight and I also have experience with manipulating zip files in PHP so I might have a little test of some of this - certainly the merging for profiles etc. 1 Link to comment Share on other sites More sharing options...
Martijn Geerts Posted January 10, 2013 Author Share Posted January 10, 2013 Pete, I like the idea of how you say it could work on the browser screen. All that advanced stuff heavily depends on how the server is configured etc. Gonna be brain shaking to make it work for most installs. (if even possible I don't know) 1 Link to comment Share on other sites More sharing options...
Pete Posted January 10, 2013 Share Posted January 10, 2013 Yeah, probably just best to try the first idea for now with the choices on a download screen on this server rather than get a headache supporting everyone else's servers too 1 Link to comment Share on other sites More sharing options...
Joss Posted January 10, 2013 Share Posted January 10, 2013 Do you actually have to merge it on download? In theory, you could add something to the installer that looks for a profile zip archive and if it sees that it unzips it and overwrites its normal profile first before starting the install. That means that you can get a profile from anywhere and just shove the zip file in the root of your site before you get installing. Mind you, that could also be seen as clumsy (having to download two archives and unzip one of them) Although, you could do half and half (getting back to where this started) where on the install page you can opt to download a profile from the main repository, or upload one from your local file system or give the external URL to a profile file or use the default. It knows what to then do because you have just told it what file to mess around with. Another extension of that is if you just download an install file (tiny one) and start that. It then downloads PW and a profile as two zips and then proceeds from there. The installer can do all I said in the previous paragraph, plus let you choose from Stable or Dev for the core Wire installation. Maybe chuck in the module manager while it is about it! Just thought I would throw a few spanners around - I am having MIDI issues and I needed the distraction! 1 Link to comment Share on other sites More sharing options...
Pete Posted January 10, 2013 Share Posted January 10, 2013 So far the biggest hurdle has to be GitHub as it creates awkward filenames when you download the zip files from there. I've mentioned this somewhere a long time ago, but I think the way this actually needs to work is two-fold. Every time someone adds/updates a module in the Modules directory, this needs to flag a module on the main PW site at processwire.com to then fetch and download that module. I'm sure there's code in the ModulesManager module that makes sense of the filename and the contents so that's fine. Older versions of the module that have been downloaded this way are deleted from the PW server The contents of the zip file are then extracted to a folder on the PW server From the choices the user makes, a special packaging script can then scan these folders for the relevant parts and add them to a zip file on the fly. The zip side of things is pretty easy so long as we know where the files are. For example, not a lot of people know that you can do something like this in such a small amount of code (although I know a few here do, but it's fun to share): $zip = new ZipArchive; if ($zip->open($config->paths->root . '/site/files/ryancramerdesign-ProcessWire-2.2.9-9-gd453a76.zip') === TRUE) { $zip->extractTo($config->paths->root . '/site/files/processwire/ryancramerdesign-ProcessWire-2.2.9-9-gd453a76/'); $zip->close(); echo 'pw229 ok'; } else { echo 'pw229 failed'; } if ($zip->open($config->paths->root . '/site/files/ryancramerdesign-BlogProfile-cca31eb.zip') === TRUE) { $zip->extractTo($config->paths->root . '/site/files/site-profiles/ryancramerdesign-BlogProfile-cca31eb/'); $zip->close(); echo 'blog ok'; } else { echo 'blog failed'; } Well that's the core and the blog unpacked easily into separate folders (yes those filenames are the horrible GitHub ones). Then, assuming you can get past the fact that GitHub puts in a folder with a similar stupid name you can then just copy the various elements to a temporary folder and zip them up (if you selected a site profile for example, you would want to delete the site-default folder first, put the profile's folders in the right place in the PW installation structure and then zip it). I'm not saying any of it would be simple, but I can see how it's doable. Some of it may be a bit beyond me though! Link to comment Share on other sites More sharing options...
Nico Knoll Posted January 10, 2013 Share Posted January 10, 2013 It's not a bad idea (the first idea, not the second one ). The easier you make it to install a particular profile the better, but my idea (which I remember posting ages ago) was to have the PW download page a bit like the jQuery download page where you build a package. Think of it - the core and default profile are ticked for download. You can select a different profile and that's your basic options. On top of that though, there could be a list of useful modules - by this I mean the most often used/searched for (there must be some stats from the modules directory - I'm looking for them now on Google Analytics). The downloader would then fetch the relevant packages from GitHub and merge them together into one zip file on the fly. Like I mentioned here: http://processwire.com/talk/topic/2105-custom-installation-generator/ 1 Link to comment Share on other sites More sharing options...
Pete Posted January 10, 2013 Share Posted January 10, 2013 It's one of those things that keeps cropping up, definitely, as I mentioned it too somewhere. That post didn't have a reply until just now I thought someone had replied to all the topics with no reply. Link to comment Share on other sites More sharing options...
joshuag Posted January 10, 2013 Share Posted January 10, 2013 I would love a choice between demo and blank profile at the start of an install. Link to comment Share on other sites More sharing options...
Joss Posted January 10, 2013 Share Posted January 10, 2013 That post didn't have a reply until just now I thought someone had replied to all the topics with no reply. Hey I just went through the general boards and answered one of the two that hadn't a reply .... I was leaving the rest to you, since you have so much time on your hands .... 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now