Loading...
 
Skip to main content

History: PluginFile

Source of version: 19 (current)

Copy to clipboard
            ! Plugin File
Use this ((wiki plugin)), introduced in ((Tiki3)), to display a link to an attachment to a wiki page and can display an image attachment. Since ((Tiki5)).0, it can display a link to file in the file gallery or to a specific archive. And Since ((Tiki6)).1, it allows easily selecting a file from a file gallery in a visual way, similarly to what can be achieved for images with the equivalent tool in the default toolbar. Moreover, it is included in the default toolbar shown in tiki textareas.

!! Parameters
{pluginmanager plugin="file"}
{REMARKSBOX(type=>tip, title=>More tips on how the plugin works in tw <5 )}Only files listed as an attachment at the bottom of a page are captured by this plugin.
''That means that images that have been uploaded through the "Upload picture:" option on the edit panel or uploaded to an image or file gallery and only linked to on the page will not be included. Other types of files (other than images) uploaded in the edit panel will be included because they appear in the list of attachments.''{REMARKSBOX}
!! Examples
!!! Using name and page parameters
{SPLIT(colsize="200|50|350")}

''This code,''
{CODE(colors="tiki")}
{file name="doctwo.png" page="PluginAttach" showdesc="0" image="0"}
{CODE}
---
{ATTACH(page=>Module and Plugin Includes, file=>arrow-right.png, image=>1)} {ATTACH}
---
''Would produce on this site:''
%%%
{file name="doctwo.png" page="PluginAttach" showdesc="0" image="0"}
@@@
!!! Using custom link text
@@@
''This code,''

{CODE(colors="tiki")}
{file name="tikigold.jpg" desc="Custom link text" showdesc="0" image="0"}
{CODE}
---
{ATTACH(page=>Module and Plugin Includes, file=>arrow-right.png, image=>1)} {ATTACH}
---
''Would produce on this site:''
%%%
{file name="tikigold.jpg" desc="Custom link text" showdesc="0" image="0"}
@@@
!!! Using image parameter
@@@
''This code,''

{CODE(colors="tiki")}
{file name="tikigold.jpg" image="1"}
{CODE}
---
{ATTACH(page=>Module and Plugin Includes, file=>arrow-right.png, image=>1)} {ATTACH}
---
''Would produce on this site:''
%%%
{file name="tikigold.jpg" image="1"}
@@@
{SPLIT}

!!! With a link to a file in a file gallery
''This code:''
{CODE(colors="tiki")}
{FILE(fileId="1")}Link to this file{FILE}
{CODE}

''Would produce on this site:''
{FILE(fileId="1")}Link to this file{FILE}

The -+fileId+- can be the ID of a file or an archive.
If date is specified, the archive with the closest smaller creation date will be linked. The format of the date is described [http://us2.php.net/manual/en/function.strtotime.php|here]. If the date parameter is specified with no value, it will use the last date specified in the page.
!!!Technical documentation linked to specific version of paper
{CODE(colors="tiki")}
On the 01/20/2010
{FILE(fileId="1" date="2010/01/20")}The specification{FILE}
{FILE(fileId="2" date="")}The estimation associated to the specification{FILE}
On the 01/25/2010
{FILE(fileId="1" date="2010/01/25")}The specification{FILE}
{FILE(fileId="2" date="")}The estimation associated to the specification{FILE}
{CODE}
-+fielId+- can be any fileId of the archive tree.
!!Related pages
* ((PluginAttach)) - a similar plugin.