Set up archive files in virtual directories for display.Instead of a library call, this is a stand alone mini-application by itself. The procedure is to setup virtual directories in the Intranet. Upload all the archive files and place a simple execution file in the lead directory, the one which the execution file (.aspx) will be executed from. Optionally, the config file can be in a separate text file such that the execution .aspx file does not have to be changed. No databse is required and the entire project can be ported to another server w/o adjustments (use curdir) by just copying.
Obj.dbArc="(;,|)Vdirs|SubDir|ExcPat=pat1,pat2...; Caption|Exts|Type|Col|Opt; Repeat Groups....."
|Vdirs||Virtual directories delimited by ','. Directories will be searched in recursive mode in retriving sub-directories files. e.g. - /project1, /project2|
|SubDir||Treu/False. Def = true - Sub-Directories of the Vdirs will be searched.|
|ExcPat||Exclude file(s) patterns delimited by ','. The files retrived by these patterns will be used to build an exclude list. Filename only and no path. e.g. - excfile*.dat or excfile1.html, excfile2.html.|
|Caption||Caption of the group display.|
|Exts||Search file extensions delimited by '.' (files group) or file patterns (for data group) delimited by ','. File pattern (used by the laguage) or the file extensions according to the data type. e.g. - .jpg.gif.png or mydata*.html|
|Type||Group type - The type of files to display under the group. |
|Col||Number of columns in a grid type display. Def=5 for tn and 3 for files.|
|Opt||Display option according to the type. For thumbnail, it is the height of the image - '96'. For Files, it is list bullet - 'LI'.|
dbArc defaults to the following when Obj.dbArc = "" and absence of the config file ->
Minimum Code -
<script language="VB" runat="server"> Sub Page_Load(Src As Object, E As EventArgs) Dim ar As New Tornado.z ar.ASPdbArc() End Sub </script>
The above code will take all the internal defaults. The effective directory will be the virtual directory the application .aspx file is located.
Normal Code -
<script language="VB" runat="server"> Sub Page_Load(Src As Object, E As EventArgs) Dim ar As New Tornado.z ar.dbUnit = 1 ar.dbTextHolder = "Tit=Project Pictures (click to Enlarge)|sub=2007" Dim arc As String = "vdirs=/project,/project1|sub=true|excpat=noinc*.html;" arc = arc & "caption=Image|type=thumbnail|Exts=.jpg.gif|col=5|opt1=96;" arc = arc & "caption=Doc|type=FileList|Exts=.doc.pdf|col=2|opt1=LI;" arc = arc & "caption=Data|Exts=data*.html|type=data" arc = arc & "caption=MISC|type=therest|opt=LI" ar.dbArc = arc ar.ASPdbArc() End Sub </script>The above code assumes your project dir is c:\inetpub\wwwroot\project and c:\inetpub\wwwroot\project1. All the sub-directories under the two project directories will be searched. Instead of displaying a single data file. All the data*.html files in the project directories will be displayed. You can also use data1.html, data2.html in the data file pattern. All the file with pattern noinc*.html will be excluded. Note that the execution file and the corresponding config file (.dbarc) are excluded in the search. There are 4 groups of display, Images, Doc files and Data, the rest are displayed as a group called MISC.