[opencms-dev] Default to 'Offline' project
M Butcher
mbutcher at grcomputing.net
Fri Apr 23 23:34:33 CEST 2004
I believe the "project" key in the CmsUser properties Hashtable stores
the value for the default project. If this is not set, then I think it
uses Offline by default (see com.opencms.workplace.CmsWpMain around line
100).
I suppose you could either automatically add the property in user
creation process, or modify either the CmsObject.addUser() or
CmsWpMain.getContent() method.
Matt
Dylan Milks wrote:
> Thanks for the quick response.
>
> However, the default project is always set to 'Offline' when you first install (in cmssetup.txt):
> createDefaultProject "Offline" "The Offline Project" (this is the default)
>
> I'm not clear on what the CmsShell.bat file has to do with changing the default project? And what does exporting have to do with this?
>
>>From what you've said to me, I'm really not sure what it is I need to change to get this to work. Could you please provide me with more specific details, like how the default project is related to CmsShell.bat and exporting.
>
> Thanks,
> - Dylan
>
> -----Original Message-----
> From: Thomas März [mailto:thomasmaerz at gmx.de]
> Sent: Friday, April 23, 2004 11:39 AM
> To: opencms-dev at opencms.org
> Subject: Re: [opencms-dev] Default to 'Offline' project
>
>
> "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
>
> _______________________________________________
> This mail is send to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://mail.opencms.org/mailman/listinfo/opencms-dev
>
> -------------------------------------------------------------------------------------------------------------------
> This communication, including its attachments, if any, is intended solely
> for the recipient; it is confidential and may contain personal or private
> information, or proprietary and/or privileged material. As such, any
> unauthorized use, retention, copying, disclosure or other distribution of
> this communication, or the taking of any action in reliance on its contents
> is strictly prohibited. If you have received this communication in error,
> please notify us immediately and delete this communication (and any
> attachments.)
>
> _______________________________________________
> This mail is send to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://mail.opencms.org/mailman/listinfo/opencms-dev
More information about the opencms-dev
mailing list