WSN Knowledge Base
Featuresspacer Showcasespacer Reviewsspacer Demosspacer Purchasespacer Manualspacer Support
Introduction to File Attachements
Introduction to File Attachements
By Paul

To allow files to be uploaded with articles, you must first CHMOD your attachments directory to 777 if it has not already been CHMODed.

On your admin panel's settings->files page, set the maximum file size and the file types (extensions) you wish to allow to be uploaded. You may also set the maximum width and height of images when an image is being uploaded, and various other options.

After saving these settings, click 'manage usergroups' in your admin panel and select which usergroups you wish to allow to upload and download files, as well as how many files per article/comment.

To access attachments, you need to be within the scope of a specific article. Whenever you are, you can use
[code\<IF >
Attached files:
<!-- BEGIN LINK ATTACHMENTS -->
<a href="http://scripts.webmastersite.net/wsnkb/manual/{ATTACHDOWNLOADURL">{ATTACHFILETITLE}</a> ({ATTACHKB} KB, {ATTACHDOWNLOADS} downloads)
<!-- END LINK ATTACHMENTS -->
</IF>[/code]
to display them.

You can limit the number of attachments shown using <!-- BEGIN 1 LINK ATTACHMENTS --> to show just 1.

In cases where the attachments are images, you may wish to automatically display the image. To do this, use
<IF {ATTACHISIMAGE}><img src="http://scripts.webmastersite.net/wsnkb/manual/{ATTACHDOWNLOADURL}"></IF>
.

To show thumbnails of image attachments, use this:
<IF {ATTACHISIMAGE}><a href="http://scripts.webmastersite.net/wsnkb/manual/{ATTACHDOWNLOADURL}"><img src="http://scripts.webmastersite.net/wsnkb/manual/{ATTACHTHUMBURL}" border="0" alt="click for full size version"></a> </IF>


You can resize image attachments by using
download.php?id=79&attachid={ATTACHID}&width=800&height=600
(this would resize to 800x600).

Rating:


4/5 based on 1 vote. The median rating is 4.

Submitted: 10/24/03 (Edited 09/19/07)

Description: Instructions on controlling file attachments.

Views: 1303 views. Averaging 1 per day.
In the most recent 30 day period, there've been 8 views.

Previous Article


Home    |    Features    |    Showcase    |    Reviews    |    Demos    |    Purchase    |    Manual    |    Support