[opencms-dev] Default to 'Offline' project

Thomas M�rz thomasmaerz at gmx.de
Fri Apr 23 18:40:02 CEST 2004


"Dylan Milks" <DMilks at greenridge.ca> writes:

> Is there a way of configuring the OpenCMS installation files so that
> right from the first install the default project is 'Offline'? I know
> you can configure this after install by going to 'Preferences -
> Startup Options'. But I want to know if you can do it right from the
> first install. If yes, what file do I need to configure?

Maybe take a look at opencms_src_5.0.1/opencms/etc/ocsetup/cmssetup.txt

,----[ cmssetup.txt ]
| createTempfileProject
| setCurrentProject 2
| importResources "ocsetup/vfs"
| publishProject "2"
| writeExportPath "export/"
| createDefaultProject "Offline" "The Offline Project"
| importModuleFromDefault "org.opencms.default.zip"
| importModuleFromDefault "org.opencms.welcome.zip"
`----

,----[ com.opencms.boot.CmsMain ]
|     /**
|      * Used to launch the OpenCms command line interface (CmsShell).<p>
|      * 
|      * @param fis file input stream of a scrfipt containing commands
|      * @param base base folder for the OpenCms web application
|      * @param mode can be C_MODE_CLASSIC or C_MODE_ECMASCRIPT
|      */
|     private static void begin(FileInputStream fis, String base, int mode)  {
|         String classname = "com.opencms.core.CmsShell";
|         if(base == null || "".equals(base)) {
|             System.out.println("No OpenCms home folder given. Trying to guess...");
`----


It seems to me the file is a script for the CmsShell. So maybe you can
modify the file for your needs.  Or even export a files from an existing
project including the users and then import it by this script.

HTH




More information about the opencms-dev mailing list