Lasso Soft Inc. > Home

[site_create]

Linksite_create
AuthorJason Huck
CategoryAdministration
Version8.5.x
LicensePublic Domain
Posted19 May 2007
Updated19 May 2007
More by this author...

Description

This tag creates a new Lasso Site by submitting the Add Site form in ServerAdmin.LassoApp. Uses the same defaults as that form for the optional params, and runs asynchronously.

Sample Usage

site_create(
	-username='yourserveradminusername',
	-password='yourserveradminpassword',
	-name='Name of New Site',
	-adminusername='Admin User for New Site',
	-adminpassword='Admin User Password',
	-description='This Lasso Site was made from a ctag.'
);

Source Code

Click the "Download" button below to retrieve a copy of this tag, including the complete documentation and sample usage shown on this page. Place the downloaded ".inc" file in your LassoStartup folder, restart Lasso, and you can begin using this tag immediately.

define_tag(
	'create',
	-namespace='site_',
	-async, -atomic,
	-req='username',
	-req='password',
	-req='name',
	-req='adminusername',
	-req='adminpassword',
	-opt='description',
	-opt='duplicate', -type='integer',
	-opt='installdocs', -type='boolean',
	-opt='hostname',
	-opt='hostroot',
	-opt='initialize', -type='boolean',
	-opt='smtphost',
	-opt='smtpusername',
	-opt='smtppassword',
	-priority='replace',
	-description='Creates a new Lasso Site via ServerAdmin.'
);
	protect;		
		local('getparams') = array(
			'tab1' = 'sites',
			'tab2' = 'sites',
			'tab3' = 'sites',
			'dialog_action' = '',						// (empty string)
			'site_name' = #name,
			'site_description' = local('description'),
			'site_duplicate' = local('duplicate'),		// (site id)
			'site_reference' = (!local_defined('installdocs') || !#installdocs ? 'No' | 'Yes'),
			'site_host_new' = (local_defined('hostname') ? #hostname | '%'),
			'site_root_new' = (local_defined('hostroot') ? #hostroot | '/%'),
			'site_username' = #adminusername,
			'site_password' = #adminpassword,
			'site_confirm' = #adminpassword,
			'lasso_site_initialized' = (!local_defined('initialize') || !#initialize ? 'N' | 'Y'),
			'lasso_smtp_host' = local('smtphost'),
			'lasso_smtp_username' = local('smtpusername'),
			'lasso_smtp_password' = local('smtppassword'),
			'action' = 'Add Site'
		);

		local('url' = 'http://127.0.0.1/serveradmin.0.lassoapp');
					
		include_url(
			#url,
			-getparams=#getparams,
			-username=#username,
			-password=#password
		);
		
		handle_error;
			log_critical('[site_create] failed: ' + error_msg);
			return;
		/handle_error;
	/protect;
/define_tag;

Related Tags

Comments

No comments

Please log in to comment

Subscribe to the LassoTalk mail list

LassoSoft Inc. > Home

 

 

©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft