Link | site_create |
Author | Jason Huck |
Category | Administration |
Version | 8.5.x |
License | Public Domain |
Posted | 19 May 2007 |
Updated | 19 May 2007 |
More by this author... |
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.
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.' );
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;
No comments
©LassoSoft Inc 2015 | Web Development by Treefrog Inc | Privacy | Legal terms and Shipping | Contact LassoSoft