Fullscreen
[Show/Hide Left Column]
[Show/Hide Right Column]

Link to a file that's attached or in a gallery or archive
3d browser Print

Plugin File

This Wiki Plugin displays a link to an attachment to a wiki page and can display an image attachment.
In tw >=5, it can display a link to file in the file gallery or to a specific archive.

Close
note Note
This plugin is very similar to PluginAttach.


Table of contents



Usage and Parameters

To use this plugin in a wiki page, use the syntax:

Syntax for the FILE plugin
{FILE(name=>file.ext, desc=> , page=>WikiPage, showdesc=>0|1, image=>0|1)} {FILE}


Parameter Accepted values Default Effect Required? Since
name The file name of an attachment none Results in a link to the given file using the file name as the link text as long as desc and showdesc parameters are not specified. If the page parameter is not set, the file name must be for a file attached to the page where the plusin is being used. n
page A wiki page name none To specify an attachment on another page n
desc Any text string none Custom text that will be used for the link instead of the file name or file description. The file name will be used as the link text if the desc or showdesc parameters are not set. n
showdesc 0 or 1 0 The description for the attachment will be used as the link text instead of the file name or custom text when set to 1. The file name will be used as the link text if the desc or showdesc parameters are not set. n
image 0 or 1 0 Identifies the attachment as an image, which will be displayed inline using the img tag (see Wiki-Syntax Images) with no link generated. n
fileId ID Numeric ID of a file in file gallery n tw>=5
date date Look the archive witht he closest smaller creation date (see explanation below) n tw>=5



Close
tip 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.


Examples

Using name and page parameters

This code,
Using name and page parameters
{FILE(name=>doctwo.png, page=>PluginAttach, showdesc=>0, image=>0)}{FILE}


arrow-right.png
Would produce this:


doctwo.png
This code,

Using custom link text
{FILE(name=>tikigold.jpg, desc=>Custom link text, showdesc=>0, image=>0)}{FILE}


arrow-right.png
Would produce this:


Custom link text

Using image parameter

This code,

Using the image parameter
{FILE(name=>tikigold.jpg, image=>1)}{FILE}


arrow-right.png
Would produce this:


tikigold.jpg

simple link to a file
{FILE(fileId=1)}Link to this file{FILE}

will produce the wiki code
Result
[tiki-download_file.php?fileId=1|Link to this 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 (external link). If the date parameter is specified with no value, it will use the last date specified in the page.
Example of technical documentation linked to specifi version of paper
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}

fielId can be any fileId of the archive tree.









Contributors to this page: lindon1699 points  and sylvie3000 points  .
Page last modified on Wednesday 03 March, 2010 03:59:50 UTC by lindon1699 points .

SourceHistorySlides 1 File Attached

To register

To have an account at this site, please register at Tikiwiki.org (external link), and then use that user name and password to log in here.

Find by Page Name

Exact match

Keywords

The following is a list of keywords that should serve as hubs for navigation within the Tiki documentation and should correspond to development keywords (bug reports and feature requests):

Accessibility (WAI – 508)
Action log 2.x
Alert 3.x
Articles & Submissions
Backlinks
Banners
Blog
Bookmark
Browser Compatibility
Cache
Calendar
Category
Chat
Clean URLs
Comments
Communication Center
Compression (gzip)
Contacts Address book
Contact us
Content template
Contribution 2.x
Cookie
Copyright
Custom Home (and Groups Home Page)
Date and Time
Debugger Console
Directory (of hyperlinks)
Documentation link from Tiki to doc.tikiwiki.org (Help System)
DogFood
Dynamic Content
Dynamic Variable
External Authentication
FAQ
Featured links
File Gallery
Forum
Friendship Network (Community)
Gmap Google maps
Groups
Hotword
HTML Page
i18n (Multilingual, l10n, Babelfish)
Image Gallery
Import-Export
Install
Integrator
Interaction
Inter-User Messages
InterTiki
Karma
Live Support
Login
Look and Feel
Lost edit protection
Mail-in
Map with Mapserver
Menu
Meta Tags
Mobile Tiki and Voice Tiki
Mods
Module
MultiTiki
MyTiki
Newsletter
Notepad
Payment
Performance Speed / Load
Permissions
Platform independence (Linux-Apache, Windows/IIS, Mac, BSD)
Polls
Profile Manager
Quicktags
Quiz
Rating
Feeds
Score
Search engine optimization
Search
Security
Semantic links 3.x
Shadowbox
Shoutbox
Slideshow
Smarty Template
Smiley
Spam protection (Anti-bot CATPCHA)
Spellcheck
Spreadsheet
Stats
Surveys
System log
Tags 2.x
Task
Tell a Friend + Social Bookmarking 2.x
TikiTests 2.x
Theme
Trackers
TRIM
User Administration including registration and banning
User Files
User Menu
Watch
WebHelp
Webmail
Webservices
Wiki 3D
Wiki History, page rename, etc
Wiki Page Staging and Approval 2.x
Wiki Plugins extends basic syntax
Wiki Syntax
Wiki structure (book and table of content)
WYSIWYCA
WYSIWYG 2.x
XMLRPC