Tornado API Library - V12.30.08

z.dbArc Property

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.

Product Version

All
[VisualBasic]
PublicPropertydbArcAsString
[C#]
publicstringdbArc{set;}

Property Value

Obj.dbArc="(;,|)Vdirs|SubDir|ExcPat=pat1,pat2...; Caption|Exts|Type|Col|Opt; Repeat Groups....."

KeywordDescription
VdirsVirtual directories delimited by ','. Directories will be searched in recursive mode in retriving sub-directories files. e.g. - /project1, /project2
SubDirTreu/False. Def = true - Sub-Directories of the Vdirs will be searched.
ExcPatExclude 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.
The above group is a single occurance.
KeywordDescription
CaptionCaption of the group display.
ExtsSearch 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
TypeGroup type - The type of files to display under the group.
  • Thumbnail : Def col=5; Opt = Height of Thumbnail - Def = 96.
  • FileList : Def Col=3. Opt = LI
  • Data: Display data file content. Def = data.html (filename). If this file exists, it'll be displayed if no filename(s) are specified.
  • TheRest: Catch all. All other files not specified in the search patterns. Def col=3; Opt=LI
ColColumns of the grid where applicatble.
ColNumber of columns in a grid type display. Def=5 for tn and 3 for files.
OptDisplay option according to the type. For thumbnail, it is the height of the image - '96'. For Files, it is list bullet - 'LI'.
The above are repeat groups - One for each type of files.

dbArc defaults to the following when Obj.dbArc = "" and absence of the config file ->

QuickProp Keyword Abbreviation

arc

Remarks

Example

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.

See Also

z Class | Tornado Namespace | ASPdbArc