Manual way to convert module XML to files for manual installation?

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
Locked
nivekiam

Manual way to convert module XML to files for manual installation?

Post by nivekiam »

This post http://forum.cmsmadesimple.org/index.ph ... l#msg90480 along with several modules I've looked at that only have an XML file for the most recent version, got me to thinking.

Is there a way to manually install or convert that XML file to the sets of files it represents so someone could manually install the module instead of having to allow CMSms have write permissions to the modules directory?
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Manual way to convert module XML to files for manual installation?

Post by calguy1000 »

The best overall solution is to install a local CMS install that you can use for testing, staging, etc.

I'd use either xamp, or a real linux install inside of vmware (if you're running a windows desktop).

Then, you can use modulemanager to download whatever module you want,
and then upload the files from /modules/ModuleName to /modules/ModuleName via ftp or whatever mechanism you have handy.

This provides numerous benefits:
1) You have an install you can play with to try out these modules before corrupting a live site
2) You can test compatibility without corrupting a live site
well... I could think of more, but they're all similar :)
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
nivekiam

Re: Manual way to convert module XML to files for manual installation?

Post by nivekiam »

Good points.  I've just been testing out different CMS packages so I haven't had a real need for a dev environment yet.
Pierre M.

Re: Manual way to convert module XML to files for manual installation?

Post by Pierre M. »

Hi,
calguy1000 wrote: ..., you can use modulemanager to download whatever module you want,
and then upload the files from /modules/ModuleName to /modules/ModuleName via ftp or whatever mechanism you have handy.
On the "file side" this looks very nice. Thank you for this. (and for the staging best practice)

But there are modules that require database processing too (table creation or alter...) Won't these modules be at trouble with "only" an FTP move ?

Pierre M.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Manual way to convert module XML to files for manual installation?

Post by Dr.CSS »

It's not moving that is a concern they just want a way to install w/o using module manager or xml files, like I was doing for a while for some ppl. that had problems with xml only module files...
Pierre M.

Re: Manual way to convert module XML to files for manual installation?

Post by Pierre M. »

Hello,
mark wrote: It's not moving that is a concern they just want a way to install w/o using module manager or xml files, like I was doing for a while for some ppl. that had problems with xml only module files...
Here is another try to explain what I don't understand : does a module install only require files to be deployed or does it require the database to be altered too (in which case only FTPing files should't work as the database remains untouched) ? What am I missing here ? I feel unconfortable with module installation/uninstallation/upgrade.

Pierre M.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Manual way to convert module XML to files for manual installation?

Post by calguy1000 »

The code for modifying the database is in the php files.  To deploy a module to a site you can either use a .tar.gz/.zip file or an XML file from the forge.

The installation/upgrade stuff is handled either in the XXXXXXX.module.php file or in the method.install.php or method.upgrade.php. 

Therefore all you really need to do is 'get the files into the right spot'... the system will take care of it from there.

The XML file does little more than encapsulate all of the files from the module directory into a .XML (there are other things that are used by module manager, but lets put that aside).

The question was.... essentially, how to convert a .xml file into a .tar.gz or a .zip....

The best method for doing this (because it kills a few birds with one stone), is to have a local installation of CMS made simple that you can 'fool with'.  then you can download whatever module you want from the module manager (if the module is only available in .xml form)..... and install it on your local installation.

When you're happy that this module will work and do what you want, you can go to /modules and create a .zip of the directory ModuleName and all the files underneath it.  Or, if you want.... you can simply use your favorite file transfer tools to transfer the files recursively to your remote host.  Then once logged into the admin section of the CMS install on the remote host, simply go to 'Modules >> Extensions' and 'install' the desired module.  That will execute the installation script.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Manual way to convert module XML to files for manual installation?

Post by Dr.CSS »

This is my take on it, I'm no programmer so take this with a grain, or 2, of salt.... ;)

When you install a module it writes info into DB tables then when you use the module it will add or change that info in DB, say you use the News module...

Install writes tables to DB, you add article and it's content and other pertinent data is written to DB tables either changing newly created tables or adding more in the News DB tables such as what's in the summary and content and date, author, whether it's set for expiry or when it should be published, category, etc...

Now you can take all the folders/files from that install and move them to another and it will need to be reinstalled but the articles and all related info will still be in the original DB on the other site, if you uninstall news on the original site it will wipe most all DB news tables and articles etc.**, if you want to move articles etc. you will need to move the news DB tables, export and import...

But to the original ? you have no way to change an XML file to a module w/o installing it, I've offered in the past to convert modules that came only as XML files to zip files for those that had a hard time with them, but most modules have XML, tar, and or zip files so it shouldn't be a problem...



** I've uninstalled news and reinstalled it to find some of my original work reappear so it seems that it will wipe mostly the tables related to the functioning of news itself, but if you do this there is no guarantee it won't wipe all your articles so always do a BACKUP
Pierre M.

Re: Manual way to convert module XML to files for manual installation?

Post by Pierre M. »

Calguy, Mark, thank you very much for these answers.

Have a nice week

Pierre
Locked

Return to “[locked] Installation, Setup and Upgrade”