File list

FIXME translate

Using the content part "File list" you can offer files from the file center for download.

Since version V1.4.2 r354 it is possible to generate a picture preview with the help of the LightBox. In addition still an output for picture parameter was added.

Template

Structure

The Template is divided into three parts:

1. The Initialisation part

<!--FILE_SETTINGS_START//-->
; this is formatted like WIN.INI
; please: do not use comments for value lines
...........
...........
<!--FILE_SETTINGS_END//-->


2. The data division is parsed for every file, here the formatting and tags are placed.

<!--FILE_ENTRY_START//-->
..........
..........
<!--FILE_ENTRY_END//-->


3. part everything outside of these limiters is only once processed.


The ini part

Here some parameters can be adjusted:

<!--FILE_SETTINGS_START//-->
; this is formatted like WIN.INI
; please: do not use comments for value lines
icon_path         = "img/icons/"
icon_name         = "small_icon_{FILE_EXT}.gif"
; alternatively use "small_icon_pix.gif" for all images/files
thumbnail         = 1
thumbnail_width   = 100
thumbnail_height  = 100
thumbnail_crop    = 1
; lighbox_init [0|1] since V1.4.2 r354 available: Enable only when really needed
lightbox_init     = 0
file_size_round   = 1
file_size_space   = " "
date_format       = "%d.%m.%y"
set_locale        = "de_DE@Euro"
<!--FILE_SETTINGS_END//-->


The entire tag set

within

<!--FILE_ENTRY_START//--> ......... <!--FILE_ENTRY_END//-->


with [examples] looks now in such a way:

<!--
      Description          {TAG............}      [Examplel....................]
      ====================+======================+==============================
      FILE_ICON:           {FILE_ICON}            [img/icons/small_icon_pix.gif]
      FILE_IMAGE:          {FILE_IMAGE}           [content/images/7c25932294ae4e89df1dabf651df06ef.jpg]
      FILE_LINK:           {FILE_LINK}            [download.php?f=3769b40d14b0a2e01872947a773fdc46]
      FILE_TARGET:         {FILE_TARGET}          [target="_blank"]
      FILE_TITLE:          {FILE_TITLE}           [File-Title]
      FILE_NAME:           {FILE_NAME}            [File-Name]
      FILE_ID:             {FILE_ID}              [136]        (Ab V1.4.2 r353)
      FILE_IMAGE_WIDTH:    {FILE_IMAGE_WIDTH}     [600]        (Ab V1.4.2 r352)
      FILE_IMAGE_HEIGHT:   {FILE_IMAGE_HEIGHT}    [800]        (Ab V1.4.2 r352)
      FILE_IMAGE_MIME:     {FILE_IMAGE_MIME}      [image/jpeg] (Ab V1.4.2 r352)
      FILE_IMAGE_CHANNEL:  {FILE_IMAGE_CHANNEL}   [RGB]        (Ab V1.4.2 r352)
      FILE_IMAGE_LANDSCAPE:{FILE_IMAGE_LANDSCAPE} []           (if width >= height)  (Ab V1.4.2 r352)
      FILE_IMAGE_PORTRAIT: {FILE_IMAGE_PORTRAIT}  [portrait]   (if width <  height)  (Ab V1.4.2 r352)

      FILE_DESCRIPTION:  {FILE_DESCRIPTION}   [File-Description]
      FILE_EXT:          {FILE_EXT}           [jpg]
      FILE_SIZE:         {FILE_SIZE}          [12.3K]
      FILE_DATE:         {FILE_DATE}          [08/26/09]
      FILE_DOENLOADS:    {FILE_DOWNLOADS}     [2]
//-->


With the tag {FILE_ID} it is now possible to offer pictures in increased form as preview.

Example LightBox:

<!--FILE_ENTRY_START//-->
         <a href="img/cmsimage.php/800x600/{FILE_ID}.{FILE_EXT}" rel="lightbox[XYZ{FILE_ID}]" title="{FILE_TITLE}" target="_blank">
         <img src="{FILE_IMAGE}" alt="{FILE_NAME}" border="0" />

A picture with the maximum dimensions 800x600px was generated and spent in the LightBox (without Next/Prev). Is the before/back shifting desired , change rel=“lightbox[XYZ{FILE_ID}]” –> rel=“lightbox[XYZ]”. (The demarcation of the individual pictures is waived against each other).


Example template:

using a LightBox call (template/inc_cntpart/filelist/filelist_lightbox01.html)



filelist_lightbox01.html

<!--FILE_SETTINGS_START//-->
; this is formatted like WIN.INI
; please: do not use comments for value lines
icon_path       = "img/icons/"
icon_name       = "small_icon_{FILE_EXT}.gif"
; alternatively use "small_icon_pix.gif" for all images/files
thumbnail     = 1
thumbnail_width   = 70
thumbnail_height  = 70
thumbnail_crop    = 1
; lighbox_init [0|1] since V1.4.2 r354 available: Enable only when really needed
lightbox_init     = 1
file_size_round   = 1
file_size_space   = " "
date_format     = "%d.%m.%y"
set_locale      = "de_DE@Euro"
<!--FILE_SETTINGS_END//-->
[TITLE]<h4>{TITLE}</h4>[/TITLE]
[SUBTITLE]<h5>{SUBTITLE}</h5>[/SUBTITLE]
[TEXT]{TEXT}[/TEXT]
<div style="margin-top: 15px; padding-top: 10px; border-top: 1px dotted #CCCCCC;">
<!--FILE_ENTRY_START//-->
 
  <div class="fileEntry" style="margin-bottom:10px; padding-bottom: 10px; border-bottom: 1px dotted #CCCCCC; height: 110px; ">
 
    <h2 style="padding-bottom: 5px;">
      <a href="{FILE_LINK}&amp;target=0"{FILE_TARGET}>[FILE_TITLE]{FILE_TITLE}[/FILE_TITLE][FILE_TITLE_ELSE]{FILE_NAME}[/FILE_TITLE_ELSE]</a>
    </h2>
 
      [FILE_IMAGE_ELSE]<img src="{FILE_ICON}" alt="" border="0" />[/FILE_IMAGE_ELSE]
      [FILE_IMAGE]
      <div style="float: left; margin-right: 10px;">
        <a href="img/cmsimage.php/800x600/{FILE_ID}.{FILE_EXT}" rel="lightbox[XYZ{FILE_ID}]" title="{FILE_TITLE}" target="_blank">
        <img src="{FILE_IMAGE}" alt="{FILE_NAME}" border="0" /></a>
      </div>
      [/FILE_IMAGE]
 
 
    <div style="float: left;">
    <p>[FILE_DESCRIPTION]
    <strong>{FILE_DESCRIPTION}</strong><br />[/FILE_DESCRIPTION]
    Dateiname: {FILE_NAME}<br />
    <!--{ FILE_EXT}//-->
        Erstellt am: {FILE_DATE} - Größe: {FILE_SIZE}
    </p>
    [FILE_IMAGE_WIDTH]
    Format: [FILE_IMAGE_LANDSCAPE]quer[/FILE_IMAGE_LANDSCAPE][FILE_IMAGE_PORTRAIT]hoch[/FILE_IMAGE_PORTRAIT]
    &nbsp; - B x H: {FILE_IMAGE_WIDTH} x {FILE_IMAGE_HEIGHT}px<br />
    Modus: {FILE_IMAGE_CHANNEL} &nbsp; - MIME type: {FILE_IMAGE_MIME}<br />
    {FILE_DOWNLOADS} Downloads
    </div>
    [/FILE_IMAGE_WIDTH]
  </div>
 
<!--
      Description          {TAG.................}
      +===================+======================
      FILE_ICON:           {FILE_ICON}
      FILE_IMAGE:          {FILE_IMAGE}
      FILE_LINK:           {FILE_LINK}
      FILE_TARGET:         {FILE_TARGET}
      FILE_TITLE:          {FILE_TITLE}
      FILE_NAME:           {FILE_NAME}
      FILE_ID:             {FILE_ID}
      FILE_IMAGE_WIDTH:    {FILE_IMAGE_WIDTH}
      FILE_IMAGE_HEIGHT:   {FILE_IMAGE_HEIGHT}
      FILE_IMAGE_MIME:     {FILE_IMAGE_MIME}
      FILE_IMAGE_CHANNEL:  {FILE_IMAGE_CHANNEL}
      FILE_IMAGE_LANDSCAPE:{FILE_IMAGE_LANDSCAPE}
      FILE_IMAGE_PORTRAIT: {FILE_IMAGE_PORTRAIT}
 
      FILE_DESCRIPTION:  {FILE_DESCRIPTION}
      FILE_EXT:          {FILE_EXT}
      FILE_SIZE:         {FILE_SIZE}
      FILE_DATE:         {FILE_DATE}
      FILE_DOENLOADS:    {FILE_DOWNLOADS}
//-->
 
    <div style="clear:left;"><!--clear//--></div>
<!--FILE_ENTRY_END//-->
</div>


Content Part

The data in the description line override the data in ini-part.

The description line follows this sample:

File-Description|File-Name|File-Title|File-Target|WxHxCxQ
File-Description|File-Name|File-Title|_blank|120x100x1x80

The small preview picture was represented in the quantity 120x100px, cropped and quality 80 (only jpg).

If in ini-part no Thumbnail is activated or in the description line no WxHxCxQ indicated , no picture is spent.

english/phpwcms-system/article/contentparts/filelist.txt · Last modified: 2009/08/28 22:01 by Knut Heermann (flip-flop)
www.planmatrix.de www.chimeric.de Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0