Diff: Help/PhotoAlbumPlugin

Note: You are viewing an old revision of this page. View the current version.

Differences between version 2 and previous revision of Help/PhotoAlbumPlugin.

Other diffs: Previous Major Revision, Previous Author

Newer page: version 2 Last edited on 22 May 2014 3:01 by harold Revert
Older page: version 1 Last edited on 17 January 2022 18:35 by harold Revert
@@ -1,15 +1,25 @@
-The **~PhotoAlbum** [[Help:WikiPlugin|plugin]] makes an 'album' by displaying a set of photos listed in a text file with optional descriptions. 
+The **~PhotoAlbum** [[Help:WikiPlugin|plugin]] makes an 'album' by displaying a set of photos listed in a text file  
+ with optional descriptions. 
  
 == Usage == 
  
 {{{ 
-<<PhotoAlbum arguments >> 
+<<PhotoAlbum  
+ src=http://server/textfile  
+ mode=[column|row]  
+ align=[center|left|right]  
+ desc=true  
+ sort=false  
+ height=100%  
+ width=100%  
+ weblocation=>false  
+ >> 
 }}} 
  
 == Arguments == 
  
-Only the ## src## parameter is required. 
+// Only the =' src'= parameter is required.//  
  
 {| class="bordered" 
 |- 
 ! Argument 
@@ -17,74 +27,71 @@
 ! Default value 
 |- 
 | **src** 
 
-URL or local path to a CSV textfile which separates filename and 
+Url or local path to a CSV textfile which separates filename and 
 description of each photo. Photos listed in the text file have to be in same 
 directory as the file. Descriptions are optional. 
  
-If the local path points to a directory, is relative from PHPWIKI_DIR,  
-and the main script is in PHPWIKI_DIR, ##url## must not be given, and 
+If the the local path points to a directory, is relative from PHPWIKI_DIR,  
+and the main script is in PHPWIKI_DIR, weblocation must not be given, and 
 all pictures from this directory are displayed. 
 
 |- 
 | **url** 
-| Defines the webpath to the srcdir directory.  
-| //empty//  
+| Defines the the webpath to the srcdir directory (formerly called weblocation)  
+
 |- 
 | **mode** 
 
 Specifies how the images are arranged. 
 * "normal" - Normal table which shows photos full-size 
 * "thumbs" - WinXP thumbnail style 
 * "tiles" - WinXP tiles style 
 * "list" - WinXP list style 
-* "row" - inline thumbnails  
-* "column" - photos full-size, displayed in 1 column  
 * "slide" - slideshow mode, needs Javascript on client 
-| normal  
-|-  
-| **numcols**  
-| photos per row, columns  
-| 3  
+
 |- 
 | **showdesc** 
 
 * "none" - No descriptions next to photos 
 * "name" - Only filename shown 
 * "desc" - Only description (from textfile) shown 
 * "both" - If no description found, then filename will be used 
-| both  
+
 |- 
 | **link** 
 
-Boolean. If true, each image will be hyperlinked to a page where  
- the single photo will be shown full-size. Only works when mode  
-is different from 'normal'  
-| true  
-|-  
-| **attrib**  
-| attrib arg allows multiple attributes: attrib=sort,nowrap,alt  
-* "sort" sorts alphabetically,  
-* "nowrap" for cells,  
-* "alt" to use descs instead of filenames in image ALT-tags  
+true or false  
+  
+ If true, each image will be hyperlinked to a page where the single  
+ photo will be shown full-size. Only works when mode != 'normal'  
+
 |- 
 | **align** 
 | center, right or left 
 | center 
+|-  
+| **desc**  
+| Display any descriptions given in the text file  
+| true  
+|-  
+| **sort**  
+| Sort images by file name  
+| By default the order in the text file is followed  
 |- 
 | **bgcolor** 
-| Cell background color  
+| cell bgcolor  
 | #eae8e8 (lightgrey) 
 |- 
 | **hlcolor** 
-| Highlight color 
+| highlight color 
 | #c0c0ff (lightblue) 
 |- 
 | **height**, **width** 
 
 Height and width are calculated compared to original metrics 
-retrieved by [ [php-function:getimagesize] ] and can be absolute (50px) 
+retrieved by [php-function:getimagesize] and can be absolute (50px) 
 or a percentage (e.g. "50%"). 
 
 |- 
 | **attrib** 
@@ -106,25 +113,17 @@
 |- 
 | **tablewidth** 
 
 table (75|100%) 
-| false  
+
 |- 
 | **p** 
 | "displaythissinglephoto.jpg" only 
-| false  
+
 |- 
 | **h** 
 | "highlightcolorofthisphoto.jpg" only 
-| false  
-|-  
-| **duration**  
-| in slide mode, duration in seconds  
-| 6  
-|-  
-| **thumbswidth**  
-| width of thumbnails  
-| 80  
+
 |} 
  
 == Examples == 
  
@@ -141,33 +140,16 @@
 === Sample Albums === 
  
 local dir: 
 {{{ 
-<<PhotoAlbum  
- src="themes/Hawaiian/images/pictures/"  
- mode=slide  
- duration=1  
- >> 
+<<PhotoAlbum src="themes/Hawaiian/images/pictures/" >> 
 }}} 
-  
-<<PhotoAlbum  
- src="themes/Hawaiian/images/pictures/"  
- mode=slide  
- duration=1  
->>  
-  
 or via external URL: 
 {{{ 
-<<PhotoAlbum  
- src="http://phpwiki.demo.free .fr /themes/Hawaiian/images/pictures/PhotoAlbum.csv"  
-mode=tiles  
- >> 
+<<PhotoAlbum src="http://phpwiki.sourceforge .net/demo /themes/Hawaiian/images/pictures/PhotoAlbum.csv" >> 
 }}} 
  
-<<PhotoAlbum  
-src="http: //phpwiki.demo.free.fr/themes/Hawaiian/images/pictures/PhotoAlbum.csv"  
-mode=tiles  
->>  
+[[ /Slides]]  
  
 == Authors == 
  
 * [[mailto:teddy@jouwfeestje.com|Ted Vinke]]: original author 

version 2

The PhotoAlbum plugin makes an 'album' by displaying a set of photos listed in a text file with optional descriptions.

Usage

<<PhotoAlbum
         src=http://server/textfile
         mode=[column|row]
         align=[center|left|right]
         desc=true
         sort=false
         height=100%
         width=100%
         weblocation=>false
>>

Arguments

Only the ='src'= parameter is required.

Argument

Description

Default value

src

Url or local path to a CSV textfile which separates filename and description of each photo. Photos listed in the text file have to be in same directory as the file. Descriptions are optional.

If the the local path points to a directory, is relative from PHPWIKI_DIR, and the main script is in PHPWIKI_DIR, weblocation must not be given, and all pictures from this directory are displayed.

url

Defines the the webpath to the srcdir directory (formerly called weblocation)

mode

Specifies how the images are arranged.

  • "normal" - Normal table which shows photos full-size
  • "thumbs" - WinXP thumbnail style
  • "tiles" - WinXP tiles style
  • "list" - WinXP list style
  • "slide" - slideshow mode, needs Javascript on client

showdesc

  • "none" - No descriptions next to photos
  • "name" - Only filename shown
  • "desc" - Only description (from textfile) shown
  • "both" - If no description found, then filename will be used

link

true or false

If true, each image will be hyperlinked to a page where the single photo will be shown full-size. Only works when mode != 'normal'

align

center, right or left

center

desc

Display any descriptions given in the text file

true

sort

Sort images by file name

By default the order in the text file is followed

bgcolor

cell bgcolor

#eae8e8 (lightgrey)

hlcolor

highlight color

#c0c0ff (lightblue)

height, width

Height and width are calculated compared to original metrics retrieved by php-function:getimagesize and can be absolute (50px) or a percentage (e.g. "50%").

attrib

attrib arg allows multiple attributes: attrib=sort,nowrap,alt 'sort' sorts alphabetically, 'nowrap' for cells, 'alt' to use descs instead of filenames in image ALT-tags

cellwidth

cell (auto|equal|image|75|100%)

Width of cells in table. Either absolute value in pixels, HTML style percentage, "auto" (no special action), "equal" (where all columns are equally sized) or "image" (take height and width of the photo in that cell).

tablewidth

table (75|100%)

p

"displaythissinglephoto.jpg" only

h

"highlightcolorofthisphoto.jpg" only

Examples

Text file

Possible content of a valid text file:

photo-01.jpg; My girlfriend and I
photo-02.jpg
christmas.gif; Merry Christmas!

Sample Albums

local dir:

<<PhotoAlbum src="themes/Hawaiian/images/pictures/" >>

or via external URL:

<<PhotoAlbum src="http://phpwiki.sourceforge.net/demo/themes/Hawaiian/images/pictures/PhotoAlbum.csv" >>

/Slides

Authors