[site_export]

Description

Link: [site_export]
Author: Jason Huck
Category: Utility
Version: 8.x
License: Public Domain
Posted: Jun. 05, 2007
Updated: Jan. 01, 0001
More by this author...
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.

Parameters

-username string, required Valid SiteAdmin username.
-password string, required Valid SiteAdmin password.
-path string, required Path (including filename) where the export file should be written.

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.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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

none

Email:


Password:



Newest

Most Popular

Support tagSwap.net