Lasso Soft Inc. > Home

[site_export]

Linksite_export
AuthorJason Huck
CategoryUtility
Version8.x
LicensePublic Domain
Posted05 Jun 2007
Updated05 Jun 2007
More by this author...

Description

This tag automates logging into SiteAdmin.LassoApp and clicking the "Export" button in the "Import/Export" tab. It requires the SiteAdmin username and password, and the path where you want the export file saved. Returns nothing if successful, or an error message if there was a problem.

Sample Usage

site_export(
	-username='xxxxxx',
	-password='xxxxxx',
	-path='/export.txt'
);

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(
	'export',
	-namespace='site_',
	-req='username',
	-req='password',
	-req='path',
	-priority='replace',
	-description='Exports the settings for the current Lasso Site.'
);
	local('getparams') = array(
		'tab1' = 'setup',
		'tab2' = 'global',
		'tab3' = 'importexport',
		'action' = 'Export...'
	);
	
	protect;
		local('export') = include_url(
			'http://' + server_name + '/siteadmin.lassoapp',
			-getparams=#getparams,
			-username=#username,
			-password=#password,
			-timeout=30
		);
		
		inline(
			-username=#username,
			-password=#password
		);
			file_create(#path, -fileoverwrite);
			file_write(#path, #export, -fileoverwrite);
		/inline;
		
		handle_error;
			local('e') = error_msg;
			return('[site_export] failed: ' + #e);
		/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