Fonctionnalité Galeries de fichiers | |
Cette page est en voie de traduction Veuillez revenir plus tard... La galerie de fichiers de Tiki est un gestionnaire de téléchargement. C'est également une collection de fichiers. On peut utiliser une galerie de fichiers pour distribuer du multimedia gratuit (mp3, podcasts), du logiciel (mises à jour, correctifs, documentations) et pour emmagasiner des fichiers que les utilisateurs peuvent télécharger à partir de pages Wiki, d'articles ou de blogues. 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
Le diaporama 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: New file types recognized by tiki
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
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 | |
![]() Old File Gallery listing
From this screen you can create a new gallery, edit existing galleries, remove existing galleries, upload a file to a gallery or list the contents (files) of an existing gallery. The options you see as a user depend on the permissions the admins have set for your groups. |
Creating file galleries | |
To create a new file gallery click the create new gallery link and the following form will be displayed.
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. If you want to allow uploads to this gallery from other users check the checkbox above the edit/create button. If the checkbox is not checked then only the gallery creator or admins can upload files to the gallery. |
Uploading files | |
To upload a file you use the following form:
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]
{img src="tiki-download_file.php?fileId=x&thumbnail=y" link="tiki-download_file.php?fileId=x" alt="alternate file name"}
<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...
__As of 4.0 and 4.1...__ 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.__ If you have the right permission to batch file uploads then you will be able to make a batch upload of files by uploading a .zip file to the gallery and checking the batch-upload checkbox (if you don't check it the zip is uploaded as a single file). 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 following permissions can be set for the file galleries section:
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 | |
To use file galleries, first you must activate the feature. Admin>Home>Features. |
File galleries | |
![]() From the Tiki Admin Panel, click the File galleries icon to display its settings panel, the top of which appears like so: Clicking the File Galleries icon on the Admin Panel (see TikiAdminSettings ) takes you to the File Galleries settings. ![]() This panel is almost identical to the image galleries panel. Select the home file gallery, the comment settings for file galleries and if rankings/comments are used or not for file galleries. 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:
The differences and settings needed for each option are explained below: |
Storing files on the database | |
If you decide to store files on the database then each file data will be stored on a database column (field) this has the following advantages and disadvantages:
|
Storing files on a directory | |
If you decide to store files on a directory you must indicate the path to a directory where you will store files. The directory can be absolute or relative to the Tiki directory for example: Storing files on a directory has the following advantages and disadvantages
You must ensure that:
You may need to ask your ISP/hosting service for an upload strategy and instructions if the ISP/hosting allows uploads (some PHP's have file uploads disabled for unknown reasons, maybe to prevent disk space consuming). Since Tiki can be configured to store fles on the database or a directory if there's a way to handle uploads then Tiki can use it 😊 choose the strategy that is best for you. |
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 | |
You can set up filters for filenames so filenames will be checked and maybe rejected depending on their filenames. Filters are regular expressions perl-like without the // delimiters. |
Filename must match | |
A regular expression that must be matched to accept the file example [A-Za-z]* (filename can only have a-z letters) 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 | |
A regular expression that if matched rejects the file, example \.gif (rejects gif images note that the period must be escaped since we are using regular expressions) If you don't know anything about regular expressions just leave the fields blank and all the files will be accepted. |
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.
Several tools can be used to extract search strings; many Unix sites have "strings", which can detect things which appear to be text within files although without the accuracy of more specialized tools. 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 change your php.ini, You will need to re-start your apache or other webserver for the change to take effect. |
If you are storing your files in the database, you need to check this MySQL variable: | |
max_allowed_packetThis variable can be located in the "my.ini" file as shown in the figure below. "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,
The second one,
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 | |
Chose file (step 1 in the image below), file gallery to set the image to (step 2), optional parameters (step 3, quite self explained), and click on upload (step 4). |
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
|