Fonctionnalité Galeries de fichiers | |
Cette page est en voie de traduction Veuillez revenir plus tard...
L’outil de la galerie de fichiers vous permet de créer et d’éditer des galeries. Vous pouvez utiliser le système Tiki de gestion des permissions pour spécifier qui peut créer des galeries, téléverser ou télécharger des fichiers. Des statistiques sont conservées pour chaque téléchargement. Vous pouvez ainsi produire des statistiques pour la plupart des fichiers téléchargés, la plupart des galeries de fichiers ainsi que pour les derniers fichiers téléversés. |
Améliorations à partir de Tiki5 | |
Depuis Tiki5, on peut accéder aux galeries de fichiers avec WebDAV. |
Améliorations à partir de Tiki3 | |
Depuis Tiki3, les galeries de fichiers supportent les collections d'images, incluant la navigation, et l'insertion dynamique de la syntaxe wiki nécessaire pour l'addition d'une image à une page wiki. Comment créer une collection d'images avec la galerie de fichiers
Moreover, File galleries are closer to replace image galleries, since they include most (if not all) the previous functonality from image galleries, and benefit from the improvements in the file galleries. Examples:
|
UTILISER les Galeries de fichiers | |
The file galleries section of Tiki is a download manager, you can create/edit file galleries which are collections of files, you can define with the permission system who can create file galleries, upload files and download files. Statistics are recorded for each download, rankings where defined for the top downloaded files, most visited file galleries and last uploaded files. Modules are also available to display last changed file galleries, last uploaded files, top downloaded files and top visited file galleries. You can use file galleries to distribute free multimedia (mp3, avis, etc), to distribute software (versions, patches, releases), to add files that users can download from Wiki pages, articles or weblog posts, etc.
If you enable the file galleries section from the admin menu you ll see a menu section in the main menu for file galleries. From the menu according to the permissions you have you will be able to list existing file galleries (where you can create a new gallery) or upload a file to a gallery. A file gallery is just a collection of files that can be downloaded, files are kept in the Tiki database and the number of downloads for each file are registered. The List galleries option in the main menu will take you to the following screen: |
Listing File Galleries | |
|
Creating file galleries | |
The same form is displayed to edit and existing gallery, you have to fill the gallery name, a description and the maximum number of rows (files) that will be displayed for each page in the file gallery listing. You can make a gallery invisible to normal users unchecking the gallery is visible to non-admin users checkbox. This can be used to set-up galleries that can t be browsed but contain files that you will make available for downloading in your site using direct links to download the file.
|
Uploading files | |
In this form you enter a title and description for the file, the gallery where the file will be stored and then the file from your local disk to upload. If everything goes well you will see a message indicating that the file was uploaded.
Bug in Tiki 5.0 In Tiki 5.0, if you have specified that files are stored in the database rather than the file system, and if you can upload files but uploaded image files don't display correctly, try commenting out the last line of the file db/local.php. This bug will be corrected in the next release.
|
Access to the file in the gallery | |
Link to the file using Wiki syntax (substitue in fileId=x: x = the fileId number): [tiki-download_file.php?fileId=x|file name that you want to display] Imbed an image {img src="tiki-download_file.php?fileId=x&thumbnail=y" link="tiki-download_file.php?fileId=x" alt="alternate file name"} Link to the file using html syntax <a href="tiki-download_file.php?fileId=x">file name </a> |
Batch uploads | |
(click to expand) Batch Upload Bug in 4.0 and 4.1
There are essentially three ways to upload mutliple files using the file gallery (not image gallery) feature...
The "upload multiple files one-at-a-time" (#1 above) feature still works on CentOS, but not on Windows XP. The "upload and unzip zip file" feature (#2 above) is broken for Tikis installed on CentOS (likely all Linux versions) and on Windows XP. The bug seems to be connected to a new file quota feature. A more detailed description can be found here: Batch-Upload Bug Reported Here This bug exists whether or not the user chooses to store the files in the MySQL database or in a system file directory.
Note that you must only give batch uploading permissions to admin since if users can make batch uploads the results can be unpredictable.
Tiki does not unzip files in the subdirectories of the zip. Once you have some files uploaded to the gallery you can visit the gallery from the gallery listing menu and see the uploaded files: |
Listing file galleries and downloading files | |
From this screen you will see the gallery description and the files uploaded to this gallery (the number of files per page varies), you can order the list by any of the columns in the listing. Clicking the get link in the actions column will download the file to your local disk. |
Permissions | |
The tiki_p_admin_file_galleries is a master permission that automatically includes the other permissions. You could add a discussion of how to create a link in a Wiki page that links to a file in a File Gallery. While this information might probably belong here, to cover linking to this item from anywhere, it be referred to in or copied into Wiki-Syntax Links .
|
ADMINISTRER les Galeries de fichiers | |
|
Admin Access | |
To access administration, go to Home Page and, on the Menu, click on "Admin (click!)". |
Activate the feature | |
|
File galleries | |
File galleries
Clicking the File Galleries icon on the Admin Panel (see TikiAdminSettings ) takes you to the File Galleries settings.
There's an important setting for the file galleries: the storage strategy for files. You can choose one of two options to store file gallery files:
|
Storing files on the database | |
|
Storing files on a directory | |
Storing files on a directory has the following advantages and disadvantages
|
Move files between them | |
Since Tiki5 (and backported to Tiki4.2) you can move the file in the database to the file system and the other way round, which is very helpful when migrating a tiki from one hosting to another one, for instance. |
Quota | |
tw >=4
|
Backlinks | |
tw >=5
|
Filtering file uploads | |
|
Filename must match | |
For example, if you want to require that uploads must have a wordprocessing file extension, you could enter .*\.(odt|sxw|doc|dot|rtf|wpt|frm|wpd|txt|ODT|SXW|DOC|DOT|RTF|WPT|FRM|WPD|TXT) |
Filename must not match | |
|
File galleries search indexing | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
If you want the files content of your files galleries to be accessible by a search, and if you have a script that extracts the file content into a text, you can associate the script to the Mime type and the files content will be indexed. If you want to search on files in the file galleries, you must provide handlers to extract the text for the file's MIME type. The commands, such as strings or pdftotext must exist on your server. The type-command associations are defined in the Admin->File Galleries page.
Ensure that the system command entered prints its output to the screen (standard output) and not to a file. Try the command on a console and check the manual. E.g. you have to add a trailing "-" to pdftotext. |
Automatic deletion of old files | |
tw >=5.0
|
Admin view | |
Administrateur can use an admin view of the file galleries.
|
Setting the maximum upload size. | |
If your Tiki is hosted by an ISP, you'll need to find out how set the maximum upload size. If you have command line access, you'll need to adjust some parameters setting in your server's php.ini file. The example below shows an maximum upload size of 10 megabytes. Copy to clipboard
If you can not change your php.ini, you can modify your .htaccess by adding these lines Copy to clipboard
|
If you are storing your files in the database, you need to check this MySQL variable: | |
max_allowed_packet
"C:/Program Files/MySQL/MySQL Server 5.1/my.ini" If you can't find a my.ini file, look for "/etc/my.cnf" instead.
Open the "my.ini" file and find the [[mysqld]] section. If there is not already an entry for your "max_allowed_packet" variable, then add one as shown
Make sure that you have enough storage allocated to your database to handle the size of your files! Once you have added an entry to set this variable as in the figure above, save
Again, on a typical Windows development box, you can locate your "mysql" service
You can use the phpMyAdmin console to check the value of your "max_allowed_packet" variable. Select the "Variables" tab on the main phpMyAdmin screen. Scroll down until you find the
|
Podcast | |
This type of files allows to have file directly accessible from an url
|
Trouble shooting | |
|
Galeries de fichiers pour les images | |
Since Tiki3, file galleries have more features to support image galleries also from your local images. For images already elsewhere in internet, use the simple {img src=http://domain/foo.jpg} as usual. Enable the setting
Let's see an example of this new usage of the file galleries. |
Upload an image | |
Through editing a wiki page | |
In Tiki3, you could do that through the following option of the wiki edit interface: Starting in Tiki4, and being improved in Tiki5, the edit interface has been revamped and you can open the form to upload images through the appropriate icons in the toolbar area on top of the editing area of the wiki page:
The first one, , opens the plugin helper to add references to images available on Internet somewhere (inside or outside tiki).
The second one, , opens the interface to upload images. By default, that interface shows in the basic mode to allow uploading a single image:
However, if we click on the appropriate button on top of the previous type of window, we will see the advanced interface to upload several files with images at once or even a single compressed zip file with many images to be processed in batch mode, as well as selecting the user or categories to link those images to.
|
Directly through file galleries | |
Select the image/s to upload from disk | |
|
Get the link and syntax to use that image | |
Once the image is successfully uploaded, you will see a screen like the following: There you can click on the button "Additional info", and it will display the links and syntax you need to copy in order to re-use that image in youru wiki page, forum, tracker, etc., or in external web sites. Proceed as usual then onwards. Keep in mind that if you add png images with transparencies, then many url's shown by tiki from file galleries have the &preview or &thumbnail" attached to them, and thus, they will be converted to .jpg (without transparency) by GD on the fly for that modified smaller display. Just remove that param if you wish and the png will be shows as png. You can also add the extra param "class=reflect" for nice visual effects if you have JQuery and its corresponding JQuery plugin enabled in your site. |
Use existing images | |
Moreover, in order to use existing images from file galleries you can just use the url of the file, for instance, and use the IMG tag as usual: You will also have the option to display the image in preview mode when passing your mouse pointer over each image.
Or you can use the new image browser within the file galleries, which will allow you to, while editing a wiki page, click on an image from the image browser from the file gallery window and insert the needed code to display where you had your cursor.
Liens utiles
|