wsGallery v1.3 documentation. 6 June 2022 Using request line parameters to control wsGallery By default, when wsGallery is invoked without any request variables: a) The "defaultGallery", specified in wsGallery/data/wsGallery_params.php, is used as the gallery By default, this is the `main` gallery b) The ".showTree:", specified in wsGallery/galleries/main/wsGallery_treeList.php, is used as the tree (within the chosen gallery). By default, this is the _default tree. c) A list of trees is shown at the top of the "directory list" box; with the directories (in the .showTree tree) listed below d) On selection of a directory, the "single viewer" layout is used. Once wsGallery is running, these can be changed by the user. However: you can change several of the the defaults by using request line parameters. Usage: Invoke wsGallery using something like: http://mysite.org/wsGallery/wsGallery.php?param1=avalue1¶m2=avalue2&.... For example: View vacation photos for 2/21 The valid request line parameters are: collection, dir, desc, entry, favorites, file, filelist, gallery, info, layout, thumb, tree Note that most of these: the values are case sensitive. Details (in alphabetical order): collection: name of an existing collection entry : name of an entry in the collection (ignored if collection not specified) If collection and entry are specified, and point to an existing collection (and an existing entry in this collection). The gallery, tree, and directory of this entry is displayed. Thus: when specifying request line paratmers: 'collection' and 'entry' override 'gallery', 'tree', and 'dir'. You can also specify 'file', to display a file (such as a jpg) in this collection/entry. You can use either a number (0=first file in subdirectory) or a file name (no path). collectionTitle: a title to display at the top of the "select a collection" menu If not specified: "Available collections" is used. dir: the name of a directory (within the tree) to view. If specified, the files in the directory (using a case-sensitive match) are displayed in the file-list box. If not specified, no directory is selected. Note that the only way to auto-open a directory is by using this request line parameter. desc: the description of the directory. If specified, this is inserted at the top of the "directory description (at the top of the file list) entry : name of an entry in a collection. See description of collection (above) favorites: name of a public favorite-list (a favorite-list stored in data/favorites) file: an integer. the file "number" to display. Or a CSV of several file numbers. A value of '1' refers to the first file listed in the file-list box If you select a 'tab' or 'rot' layout (described below), you can specify several files to display. To do this, use a CSV of the format: n1,n2-n3,n4' Note the use of 'n2-n3' -- used to specify a range of file numbers Example: '3,5-9,20,22,30-35,40' will display file numbers: 3,5,6,7,8,9,20,22,30,31,32,33,34,35, and 40 Notes: * file is ignored if dir is not specified (or is specified incorrectly) * file numbers greater than the number of files (in a directory), or less than 0, are ignored. * a file number of '0' is converted to '1' * if displaying a collection, you can use a single file number, or a single file name -- the matching file number (or file name) is displayed. If there is no match (no such file, or a number that is out of range), file is ignored. filelist : how to display the "buttons" in the file list 0 : As a running list covering several rows -- with as many as can fit on a row. Just the button (with name or thumbnail). No descriptive information. This is the default. 1 : As a table -- 1, 2, or 3 columns (depending on screen width) Displays the button, short file date and file size, and descripition 2 : As a list -- one row per file. Displays the button (and name), mimetype, file data and file size, and description gallery: the name of a gallery to view. If not specified, the "defaultGallery" is used. If a non-existent gallery is specified, wsGallery will issue an error message. Note that the only way to view a `gallery` other than the "defaultGallery" is by using this request line parameter! info: -1, 0, 1, 2, 3, 4 (default =-1). If not -1, display the "directory and file" info (at the top of the list-of-files). 0 to 4 control how this information is displayed: 0: 2 line dir description, no file description 1: 2 line dir description, 2 line file description (displayed when a file is chosen) 2: no dir description, 2 line file description (updated when a file is chosen) 3: 2 line dir description, 2 line file description updated when a file is chosen) 4: multi-line dir description, multi-line file description (updated when a file is chosen) layout: select which screen layout to use. If not specified, a "dual viewer/large file list/ combo" layout is used. The following values are supported rot: Rotating viewers: a 2x2 grid of a small file box, and 3 viewer boxes. sin: Single viewer. A viewer filling 2/3 of the width, and a file list in the other third. lar: Large single viewer. A mid-size file list, and a near full screen file viewer. With the ability to expand to fill the entire screen. Mostly DEPRECATED (june 2022) tab: There are several "tableau" variants tab1: Multiple mid-sized snapshots per row tab2: Multiple shrunken mid-sized (~200px) snapshots per row tab3: Two smaller (~400px) snapshots per row tab4: Two larger (~400px) fullPhotos per row Note: any other value of "tab" (such at 'tab' or 'tableau') yields the default tableau layout (shrunken snapshots -- similar to tab1). v0: Dual viewers: larger file box, small & medium viewer boxes. This is the default. v1: Dual viewers: medium file box, small & large viewer boxes. v2: Dual viewers: small file box, small & largest viewer boxes. Note: the default screen layout (used if layout not specified) can be set in wsGallery_params.php. mainTitle: A string to use as the main title of the wsGallery screen If not specified: 'wsGallery: display image & other files', followed by a box with the name of the current gallery If mainTitle is specified, the following containers are NOT displayed: Logon button, and admin setting button. Thus, if mainTitle is specified, admin logon can not happen The 'scroll viewer" and "auto scroll viewer2" buttons. These are used in dual viewer modes. Thus, these informational boxes will NOT be displayed in dual viewer screen layouts. mainTitleClass: A class to use if a mainTitle is displayed (ignored if no mainTitle specified). Should be one of the classes specified in wsGallery.css. Do NOT precede with a "." Some classes in wsGallery.css that might be amusing: cMainTitle, cMainTitle2, doGoButton, cdirListStatu, headerEmphasizer, collectionReshowButton Short cut: mainTitleClass=0 : do not use a class (same as not specifying mainTitle) mainTitleClass=1 : same as mainTitleClass=cMainTitle mainTitleClass=2 : same as mainTitleClass=cMainTitle2 noCompact : Suppress display of the compactViewer button If 0, nothing is done. If 1, the compactViewer button is not displayed. This overrides doCompact paramers in params.php, and a showCompactLink cookie thumb: How to display files in the file-list N: Use file names. This is the default (if thumb is not specified) S: use small (40x40) thumbnails M: use small (65x65) thumbnails L: use large (90x90) thumbnails Any other value yields 'N' (name). Note that you can use longer strings -- only the first character is examined (case insensitive). Thus: 'n', 'Name', and 'nAm' are the same as 'N' tree: the name of a tree (within the gallery) to view. If not specified, the ".showTree" is used. If a non-existent tree is specified, wsGallery will issue an error message. Note: one can specify a 'favorites'; a 'collection' and 'entry'; and a 'gallery','tree','dir' -- but do not specify more than one of these sets. What is displayed is unpredictable!