SMF2.1:Attachments and Avatars: Difference between revisions From Online Manual

Jump to: navigation, search
m (1 revision imported)
m (→‎Attachment Directories: fix contracton)
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{versions|versions}}
{{WIP}}
{{versions|versionsmore}}


{{TOCright}}
{{TOCright}}
From here, you can administrate the attached files on your system and you can also delete attachments by size and by date to your requirements. This is a useful area to work out how much your server is storing in the way of general attachments and users uploaded avatars, which over time can soon become a large figure especially if you have a large membership.
In ''Admin Center > Forum > Attachments and Avatars'', administrators can manage attachments: files which have been attached to messages and uploaded to the server; as well as avatars, and thumbnails of attachments. The thumbnails are made automatically, according to settings, at upload. This is a useful area to work out how much space your server is using to store attachments and user-uploaded avatars, which over time can soon become a large figure especially if you have a large membership. Of course the decision whether to delete attachments, when, and how, is personal to every forum and admin. If you are unsure, perhaps discussing it in the [https://www.simplemachines.org/community/index.php Community Forum] with other admins would be helpful?


===Browse Files===
There are five pages/sub-menus here: ''Browse Files, Attachment Settings, Avatar Settings, Attachment Directories,'' and ''File Maintenance''.
Here you can view the Attachments, Avatars, and Thumbnails uploaded to your forum, and browse and delete the uploaded files by your members listing in order of:
*'''Attachment Name
*'''File Size
*'''Posted By
*'''Date


You can click the Remove Selected button to delete attachments.
==Browse Files==
On these pages, administrators can browse and/or view the Attachments, Avatars, and Thumbnails (of attachments) uploaded to the forum and server. At the top left area, you can choose whether to view Attachments, Avatars, or Thumbnails. The lists have six columns each:
*'''Attachment Name''' - This column shows the name of the file that was uploaded, whether attachment, avatar, or thumbnail. The name is also a text link which will open the image or file.
*'''File Size''' - This column shows the size of the file that was uploaded.
*'''Posted By''' - This column gives the name of the member who uploaded the file. It is also a link to the member's profile.
*'''Date''' - This shows the date this image or file was uploaded. Beside or below the date is the subject or topic title of the thread in which the attachment was made.
*'''Downloads''' - This column shows the number of times either the file was opened or the image was viewed, depending on the type of file.
*There is no title for this column but it is the checkboxes. By checking the boxes beside file you want to remove, and clicking the '''''Remove Selected''''' button, you can remove attachments, avatars, or thumbnails of attachments.
 
==Attachment Settings==
Here you can configure how your forum handles attachments, including thumbnails.  Data such as number, size and type of allowed files, including security options can be set here. There are three sections: Attachmennt Settings, Attachment Security, and Thumbnail Settings.


===Attachment Settings===
===Attachment Settings===
Here you can configure your [[Attachment]] settings with information, such as choosing a location to store the uploaded files, maximum visible sizes, and limiting file extension use.
*'''Attachments mode''' - From the dropdown menu, choose Enable attachments, Disable attachments or just Disable ''new'' attachments. These are explained in the little question mark icon to the left of the option.
*'''Attachments mode''' - Enable attachments, disable attachments or just disable new attachments.
*'''Choose the method for the management of the attachment directories''' - By default, SMF puts new attachments into a single folder. For most sites this is not a problem, but as a site grows it can be useful to have multiple folders to store attachments in. The five options are self-explanatory.
*'''Check attachment's extension''' - Select this box to enable attachment filtering. If enabled, you can specify in the box below this area which extensions are allowed to be uploaded by your members such as Text Documents (txt).
*'''Attachments directory''' - This displays the directory or directories of attachments, depending on previous settings.
*'''Allowed attachment extensions''' - If ''Check attachment's extension'' is enabled, you can specify here which attachments are allowed to be written; for example: txt, doc, mp3. These three extensions would enable members to upload Text Documents, Word Documents and MP3 Audio files. You can alter this to your own requirements and remember to be careful in your choice of file extension. Some file extensions can cause a major security risk to your website's security.
*'''Maximum number of files per directory''' - Enter the number of files you want here, or enter zero for no limit.
*'''Recode line endings in textual attachments''' - Select this when you want to change the line endings in textual attachments.
*'''Do not show attachments under the post if they are already embedded in it.''' - Attachments normally appear under a posted message (either as a thumbnail or text link). But if you embed an attachment, then it will appear both within the message, and below it. This option, when the box is checked, makes the attachment show only once.
*'''Attachments Directory''' - Select where you want the files uploaded to be stored on your server. This can be located outside your public html directory for additional security.
*'''Max attachment size per post''' - Set the maximum size for the total of all attachments in a single post. If this is lower than the per-attachment limit, this will be the per-attachment limit.
**'''Configure multiple attachment directories''' - This link will take you to another screen which allows you to configure multiple directories for your attachments. This is particularly useful as your site gets bigger, since there is a limit to the total number of files in (or total size of) a directory.
*'''Max size per attachment''' - Set the maximum size for a single attachment. Note that the maximum size per post and per attachment allowed by php.ini is 32768 kb.
*'''Max attachment folder space''' - Specify how large in capacity the upload area can store. This is useful for servers with limited web space.
*'''Max number of attachments per post''' - Set the maximum number of attachments per post. Set to zero for no limit.
*'''Max attachment size per post''' - Specify how big a single post's upload by a [[Member|member]] can be.
 
*'''Max size per attachment''' - Specify how big a single attachment upload by a member can be.
===Attachment Security Settings===
*'''Max number of attachments per post''' - With SMF, you can allow members to upload more then one attachment with each single post. Here you can specify how many attachments can be made with each post.
*'''Check attachment's extension''' - Check this box to enable attachment filtering. If enabled, you can specify in the option below this, which extensions are allowed to be uploaded by your members.
*'''Re-encode potentially dangerous image attachments''' - Check this box to enable this function.  Selecting this option will enable trying to re-encode the uploaded image attachments. Image re-encoding offers better security. Note however that image re-encoding also renders all animated images static. This feature is only available if the GD module is installed on your server.
*'''Allowed attachment extensions''' - If ''Check attachment's extension'' is enabled, you can specify here which attachments are allowed to be uploaded; for example: TXT, DOC, MP3. These three extensions would allow members to upload Text Documents, Word Documents and MP3 Audio files. Type the extensions without caps, dots, or spaces, just a comma between extensions. For the previous example, it would look like "txt,doc,mp3". ''Warning! - Be careful in your choice of file extension. Some file extensions, such as HTTP, PHP, or JS are a major security risk to your forum or website!''
*'''Perform extensive security checks on uploaded image attachments''' - Check this box to enable this function.  Selecting this option will enable very strict security checks on image attachments. Please be aware that these extensive checks can cause valid images to fail too. It is strongly recommended to only use this option together with image re-encoding, in order to have SMF try to resample the images which fail the security checks. If this is successful, they will be sanitized and uploaded. Otherwise, if image re-encoding is not enabled, all attachments failing checks will be rejected.
*'''Re-encode potentially dangerous image attachments''' - When this box is checked, SMF will try to re-encode potentially dangerous attachments, which offers better security. Note however that image re-encoding renders all animated images static. Also note that this feature is only possible if the GD module is installed on your server.
*'''Display image attachments as pictures under post''' - If a member has attached an image to a post, the image will automatically be displayed if enabled.
*'''Perform extensive security checks on uploaded image attachments''' - ''Warning! - The extensive security checks can result in a large number of rejected attachments.'' Read the details in the question mark icon on the left.
*'''Resize images when showing under post''' - Limit the size of the image when displaying within the forum. This is useful when you have specified a width for your entire forum and you do not want the image to stretch further distorting your forum look.
 
*'''Save thumbnails as PNG''' - Selecting this option allows higher quality thumbnails to be saved.
===Thumbnail Settings===
*'''Maximum width of thumbnails''' - Set the maximum width of the thumbnails to be displayed.
*''' Display image attachments as pictures under post''' - When this box is checked, if the attachment is an image, it will be displayed as an image. Otherwise, there will only be a text link, so that the reader must click on the link to view the image.
*'''Maximum height of thumbnails''' - Set the maximum height of the thumbnails to be displayed.
*'''Resize images when showing under posts''' - If the option above is checked, this option will save a separate (smaller) attachment for the thumbnail, to decrease bandwidth.
*'''Save thumbnails as PNG'''- Checking this creates a higher quality thumbnail.
*'''Adaptive thumbnail memory''' - When this box is checked, SMF estimates the amount of memory needed to create the thumbnail, and then requests that amount from the server. In rare cases, webhosts might not want to provide this information, so the thumbnail is not created. Or more commonly on shared servers, there might not be enough memory to create a thumbnail. If you notice that thumbnail creation fails often, even on moderately sized images, try unchecking this option. Otherwise, keep it checked.
*'''Maximum width of thumbnails''' - Set the maximum width you want for thumbnails. This is only used when ''Resize images when showing under posts'' is enabled.
*'''Maximum height of thumbnails''' - Set the maximum height you want for thumbnails. This is only used when ''Resize images when showing under posts'' is enabled.
*'''Max display width of posted or attached images''' - Set the maximum width of displayed images when thumbnail is clicked on. Set to zero for no limit.
*'''Max display height of posted or attached images''' - Set the maximum height of displayed images when thumbnail is clicked on. Set to zero for no limit.


===Avatar Settings===
====Server-stored avatars====
Server stored avatars are already on the server, placed there by who ever uploaded them via FTP. These are usually located inside your SMF avatars directory, and may be in their own directory, creating a category effect. Users can select these from their profiles.


*'''Membergroups allowed to select a server stored [[avatar]]''' - Select which membergroups can or cannot use server stored avatars.
Be sure to click the '''''Save''''' button in the bottom right corner, after you finish configuring all the options on this page.
*'''Avatars directory''' - The path for the base directory where server stored avatars are stored.
*'''Avatars URL''' - Web address.


====Externally stored avatars====
==Avatar Settings==
Externally stored avatars allow users to input a URL to an off site avatar.


*'''Membergroups allowed to upload an avatar to the server:''' - Select which membergroups can or cannot use externally stored avatars.
This page is at ''Admin Center > Forum > Attachments and Avatars > Avatar Settings''. These options allow you to configure avatars and set up their directories. There are four types of avatars, configured in four sections on this page: Server-stored, External, Uploadable, and Gravatars.
*'''Download avatar at given URL''' - Specify whether external avatars are downloaded on to your own server. Selecting this option may speed things up when it comes to external avatars.
*'''Maximum width external avatar''' - Specify the maximum width of externally linked avatars.
*'''Maximum height external avatar''' - Specify maximum height of externally linked avatars.
*'''If the avatar is too large''' - If the avatar is over the specified size, you can select to ''refuse it'', ''let HTML/JavaScript resize it'' or ''Download and resize it'', which requires a GD module. Selecting to let HTML or JavaScript to resize it can use server resources up and slow down the load speed of topics if the linked images are too large.


====Uploadable avatars====
===Server-stored Avatars===
Externally stored avatars allow users to input a URL to an off site avatar. The downside is that you cannot control the images users can use for avatars, and if you use HTML or JavaScript resizing, users can select large images which take time to resize, using up server resources and slowing down page loads.
These are avatars which administrators have uploaded to their server. By default, they should go into the "avatars" directory. But if admins want to add sub-folders, they can create categories of avatars. Members will be able to browse them, and choose an avatar for their profile.


*'''Allow members to upload their own avatars''' - Select which membergroups can or cannot upload avatars to your server.
Note that when searching for avatars to use in their forums, administrators should be mindful of copyrights and licenses, and only provide avatars to their forum, which they have permission to use.
*'''Maximum width of uploaded avatar''' - Specify the maximum width allowed for avatars that are uploaded.
 
*'''Maximum height of uploaded avatar''' - Specify the maximum height allowed for avatars that are uploaded.
*'''Membergroups allowed to select a server-stored [[avatar]]''' - Choose which membergroups can or cannot use server-stored avatars.
*'''Avatars directory''' - The path for the base directory where server stored avatars are kept.
*'''Avatars URL''' - This is the URL for the avatars directory.
 
===External Avatars===
These are avatars which exist on a third party website or host. The downside of using this feature is that administrators cannot control from which site their members get the avatars, whether the avatars are appropriate for their site, or whether their member has permission to use them.
 
*'''Membergroups allowed to select an external URL ''' - Choose which membergroups can or cannot use externally stored avatars.
*'''Download avatar at given URL''' - Specify whether external avatars are downloaded onto your own server. Once this box is checked, and the member enters the URL, the external avatar becomes like an uploaded avatar. If it is not checked, the avatar becomes essentially hot-linked, once the member enters the URL. Checking this box may speed up the handling of these avatars. Read the question mark icon window for more details.
*'''Maximum width of external avatar''' - Set the maximum width of externally linked avatars. Set to zero for no limit.
*'''Maximum height of external avatar''' - Set the maximum height of externally linked avatars. Set to zero for no limit.
*'''If the avatar is too large...''' - If the avatar is over the specified size, there are three options in this dropdown menu: ''Refuse it, Resize it in user's browser,'' and ''Download and resize it on the server''. See the question mark icon window for the pros and cons for each option. Note that either the GD Library or ImageMagick are needed on the server, for this option to work.
 
===Uploadable Avatars===
These are avatars which have been individually uploaded to the forum's server by the forum's members. This feature has the same risks as external avatars, but gives administrators a little more control. Also, these avatars could potentially take up more space on the server.
 
*'''Allow members to upload their own avatars''' - Choose which membergroups can or cannot upload avatars to your server.
*'''Maximum width of uploaded avatar''' - Specify the maximum width allowed for avatars that are uploaded. Set to zero for no limit.
*'''Maximum height of uploaded avatar''' - Specify the maximum height allowed for avatars that are uploaded. Set to zero for no limit.
*'''Resize oversized large avatars''' - If enabled this will resize larger then specified avatars (requires a GD module).
*'''Resize oversized large avatars''' - If enabled this will resize larger then specified avatars (requires a GD module).
*'''Re-encode potentially dangerous avatars''' - Selecting this option will enable trying to re-encode the uploaded avatars. Image re-encoding offers better security. Note however that image re-encoding also renders all animated images static.  (This also requires a GD module to be installed on your server.
*'''Use PNG for resized avatars''' - PNG files are larger, but offer better quality compression. If this is unchecked, JPEG will be used instead. Although JPEG images are smaller in size they are usually a lower quality than PNG files.
*'''Perform extensive security checks on uploaded avatars''' - Selecting this option will enable very strict security checks on avatars.  Enabling this option can, however, result in a lot of safe avatars to be rejected as is explained in the section on performing extensive security checks on image attachments above.
*'''Re-encode potentially dangerous avatars''' - When this option is checked, SMF will try to re-encode potentially dangerous avatars, which offers better security. Note however that this will render animated images static.  (This requires a GD module to be installed on your server.)
*'''Use PNG for resized avatars''' - .PNG files are larger, but offer better quality compression. If this is unchecked, .JPEG will be used instead. Although .JPEG images are smaller in file size they are usually less quality than .PNG files.  
*'''Perform extensive security checks on uploaded avatars''' - Selecting this option will enable very strict security checks on avatars.  Enabling this option can, however, result in a lot of safe avatars to be rejected. Read the question mark icon window for more details.
*'''Upload avatars to''' - Specify whether you want the avatars to be uploaded to the attachments directory, or to a directory you choose to specify in the field below this option.  
*'''Upload directory''' - This is the directory for uploaded, or custom avatars. If you want to change the default directory, the new one should be a valid and writable directory, different from the directory for server-stored avatars.
*'''Upload directory''' - If ''Upload avatars to specific directory'' is selected, you can specify the upload location here.
*'''Upload URL''' - This is the URL of the directory.
*'''Upload URL''' - If 'Upload avatars to specific directory' is selected, you can specify the upload URL here.
 
===Gravatars (Globally Recognized Avatars)===
To use this feature, members must register their email address and an avatar at https://www.gravatar.com/. After that, the same avatar will be used on every site across the internet, in which the member uses the same email address. Note that there are obvious [https://en.wikipedia.org/wiki/Gravatar#Security_concerns_and_data_breaches potential security issues] when using this feature.
 
*'''Enable Gravatars for forum users?''' - Check this box to allow this feature in the forum.
*'''Force Gravatars to be used instead of normal avatars?''' - Check this box to use only Gravatars, and no other avatars in the forum.
*'''Allow storing an extra email address for Gravatars?''' - Check this to allow more than one email address for Gravatars.
*'''Maximum allowed rating?''' - Gravatars have audience ratings. The dropdown menu has four options, ranging from G (Generally acceptable) to X (Explicit).
*'''Default image to show when an email address has no matching Gravatar''' - If Gravatars are enabled, but a member does not have a Gravatar account, a default image will be shown instead. The dropdown menu has six, self-explanatory options from which to choose.
 
 
Be sure to click the '''''Save''''' button in the bottom right corner, when you finish configuring all the avatar options on this page.
 
==Attachment Directories==
On this page, administrators can create additional attachment directories. If the forum's active directory is getting too large, for whatever reason, or if you have some other reason for multiple attachment directories, you can manage them here. Perhaps for example, you would like to keep a separate directory per month or per year?
 
This section has five columns:
*'''Current''' - In this column, there will be a filled dot beside the directory which is active.
*'''Path''' - This column contains the path to the directory, on the server.
*'''Size''' - This column shows the size, in kb, of all the files in this directory.
*'''Files''' - This column shows the number of files in the directory.
*'''Status''' - If all is well with the directory, this column will show "OK". If the directory is empty, it will say "Unused".
 
Remember that only one directory can be active, or Current, at any given time. To change the current directory, simply click the dot in the far left column, beside the one you want. Do not forget to click the '''''Save''''' button in the bottom right corner, after you click the dot.
 
====To create a new directory:====
*Click the '''''Add Path''''' button in the bottom right corner of the page.
*Copy the path from the '''Path''' column of the original directory.
*Change the name of the last folder (everything after the last / ). For example, the default folder or directory is called "attachments". You might name the new one "attachements2", or "2024attachments" or whatever.
*Click the '''''Save''''' button.
*Finally, be sure to tick the new path, in the ''Current'' column, to make it active.
 
After that, whenever members upload attachments, they will go into the new directory.
 
====To remove a directory:====
Remember that only empty directories can be removed. You can see if a directory is empty by looking at the '''Size, Files,''' and '''Status''' columns. Their values will be "0", "0", and "Unused", respectively.
*Delete the entire path from the '''Path''' column.
*Click the '''''Save''''' button.
 
==File Maintenance==
On this page, administrators can manage these attachment and avatar files. There are four sections: File Attachment Statistics, Attachment Integrity Check, Attachment Pruning, and Transfer Attachments.
 
====File Attachment Statistics====
This section provides some convenient statistics which can help in managing these files.
*'''Total attachments''' - This shows the total number of files that are currently (or still) attached to messages.
*'''Total avatars''' - This shows the total number of avatar files which have been uploaded by members.
*'''Total size of all attachment directories''' - This shows the total space taken up on the server by all attachment directories.
*'''Current attachment directory''' - This shows which attachment directory is currently active.
*'''Total size of current attachment directory''' - This shows the size (in kb) of the currently active attachment directory.
*'''Total space available''' - This shows the value set in ''Admin Center > Forum > Attachments and Avatars > Attachment Settings > Max attachment directory space''. If it is set to "zero for no limit", this item will show "No maximum directory size is currently set".
*'''Total files in current attachment directory''' - This shows the total number of files in the server's 'attachments' directory.
*'''Total files remaining''' - This shows the difference between the ''Maximum number of files per directory'' setting (on the ''Admin Center > Forum > Attachments and Avatars > Attachment Settings'' page), and the ''Total files in current attachment directory'', above.
 
====Attachment Integrity Check====
This function will check the integrity and sizes of attachments and filenames listed in the database and, if necessary, fix errors it encounters.
 
====Attachment Pruning====
With this feature, administrators can remove attachments according to their age or size. It is also possible to remove avatars of members who have not been active for some certain amount of time. Of course removing these things should be considered carefully. If admins are unsure, they might want to discuss it with other admins in the [https://www.simplemachines.org/community/index.php Community Forum].
 
*'''Remove attachments older than''' - Set the number of days to represent the age of the attachments.
**'''Message to add to post''' - In place of the removed attachment, a comment or message can be appended to the post. Keep the default suggestion: "[attachment deleted by admin]" or type your own custom comment here.
*After you make your choices, click the '''''Remove''''' button to perform this function.
 
 
*'''Remove attachments larger than''' - Set the size in KB, for attachments over which size, you want to remove.
**'''Message to add to post''' - In place of the removed attachment, a comment or message can be appended to the post. Keep the default suggestion: "[attachment deleted by admin]" or type your own custom comment here.
*After you make your choices, click the '''''Remove''''' button to perform this function.
 


===File Maintenance===
*'''Remove avatars from members not active for more than''' - Set the number of days of inactivity after which members' avatars will be removed.
From here, you can administrate the attached files on your system. You can delete attachments by size and by date from your system. Statistics on attachments are also displayed in this area.
*After you set the number of days, click the '''''Remove''''' button to perform this function.


'''File Attachment Statistics'''
====Transfer Attachments====
This section allows administrators to transer files between directories.
*'''Transfer files from''' - From the dropdown menu to the right, ''Select directory'', choose which directory contains the files you want to transfer.
*'''Automatically by space or file count''' - This means that SMF creates a new directory in the base directory that you choose in the ''Select base directory'' dropdown menu. It uses the space or file count information, from the directory you choose in the first ''Select directory'' dropdown menu.
*'''Or to a specific directory''' - If you want to transfer the files into a specific directory, do not use the ''Select base directory'' dropdown menu. Instead, from the second ''Select directory'' dropdown menu, choose the destination directory for the files.


*'''Total Attachments''' - Total number of attachment files uploaded.
After you have made the appropriate menu choices for your purposes, click the '''''Transfer''''' button in the bottom right corner.
*'''Total Avatars''' - Total number of avatars uploaded.
*'''Total Size of Attachment Directory''' - Total space used on server to hold the attachments.
*'''Total Space Available in Attachment Directory''' - Space remaining for any new uploaded attachments to come.
*'''Attachment Integrity Check''' - In this area, you can carry out a check on the integrity and sizes of attachments and filenames listed in the database.  If you run this check it will fix any errors which are found.
*'''Attachment Pruning''' - In this area, you can delete files older then a specified number of days or attachments over a specified size. Both of these options have the added settings of enabling you to include a message of your choice to be included where any attachment has been removed by the system.


{{ {{Localized|As an administrator 2.1}}}}
{{ {{Localized|As an administrator 2.1}}}}

Latest revision as of 01:17, 1 January 2024

Under construction-48.png Work in progress, expect frequent changes. Under construction-48.png

Please see SMF1.1:Attachments and Avatars, SMF2.0:Attachments and Avatars or SMF2.1:Attachments and Avatars depending on the version of SMF you are using.

In Admin Center > Forum > Attachments and Avatars, administrators can manage attachments: files which have been attached to messages and uploaded to the server; as well as avatars, and thumbnails of attachments. The thumbnails are made automatically, according to settings, at upload. This is a useful area to work out how much space your server is using to store attachments and user-uploaded avatars, which over time can soon become a large figure especially if you have a large membership. Of course the decision whether to delete attachments, when, and how, is personal to every forum and admin. If you are unsure, perhaps discussing it in the Community Forum with other admins would be helpful?

There are five pages/sub-menus here: Browse Files, Attachment Settings, Avatar Settings, Attachment Directories, and File Maintenance.

Browse Files

On these pages, administrators can browse and/or view the Attachments, Avatars, and Thumbnails (of attachments) uploaded to the forum and server. At the top left area, you can choose whether to view Attachments, Avatars, or Thumbnails. The lists have six columns each:

  • Attachment Name - This column shows the name of the file that was uploaded, whether attachment, avatar, or thumbnail. The name is also a text link which will open the image or file.
  • File Size - This column shows the size of the file that was uploaded.
  • Posted By - This column gives the name of the member who uploaded the file. It is also a link to the member's profile.
  • Date - This shows the date this image or file was uploaded. Beside or below the date is the subject or topic title of the thread in which the attachment was made.
  • Downloads - This column shows the number of times either the file was opened or the image was viewed, depending on the type of file.
  • There is no title for this column but it is the checkboxes. By checking the boxes beside file you want to remove, and clicking the Remove Selected button, you can remove attachments, avatars, or thumbnails of attachments.

Attachment Settings

Here you can configure how your forum handles attachments, including thumbnails. Data such as number, size and type of allowed files, including security options can be set here. There are three sections: Attachmennt Settings, Attachment Security, and Thumbnail Settings.

Attachment Settings

  • Attachments mode - From the dropdown menu, choose Enable attachments, Disable attachments or just Disable new attachments. These are explained in the little question mark icon to the left of the option.
  • Choose the method for the management of the attachment directories - By default, SMF puts new attachments into a single folder. For most sites this is not a problem, but as a site grows it can be useful to have multiple folders to store attachments in. The five options are self-explanatory.
  • Attachments directory - This displays the directory or directories of attachments, depending on previous settings.
  • Maximum number of files per directory - Enter the number of files you want here, or enter zero for no limit.
  • Do not show attachments under the post if they are already embedded in it. - Attachments normally appear under a posted message (either as a thumbnail or text link). But if you embed an attachment, then it will appear both within the message, and below it. This option, when the box is checked, makes the attachment show only once.
  • Max attachment size per post - Set the maximum size for the total of all attachments in a single post. If this is lower than the per-attachment limit, this will be the per-attachment limit.
  • Max size per attachment - Set the maximum size for a single attachment. Note that the maximum size per post and per attachment allowed by php.ini is 32768 kb.
  • Max number of attachments per post - Set the maximum number of attachments per post. Set to zero for no limit.

Attachment Security Settings

  • Check attachment's extension - Check this box to enable attachment filtering. If enabled, you can specify in the option below this, which extensions are allowed to be uploaded by your members.
  • Allowed attachment extensions - If Check attachment's extension is enabled, you can specify here which attachments are allowed to be uploaded; for example: TXT, DOC, MP3. These three extensions would allow members to upload Text Documents, Word Documents and MP3 Audio files. Type the extensions without caps, dots, or spaces, just a comma between extensions. For the previous example, it would look like "txt,doc,mp3". Warning! - Be careful in your choice of file extension. Some file extensions, such as HTTP, PHP, or JS are a major security risk to your forum or website!
  • Re-encode potentially dangerous image attachments - When this box is checked, SMF will try to re-encode potentially dangerous attachments, which offers better security. Note however that image re-encoding renders all animated images static. Also note that this feature is only possible if the GD module is installed on your server.
  • Perform extensive security checks on uploaded image attachments - Warning! - The extensive security checks can result in a large number of rejected attachments. Read the details in the question mark icon on the left.

Thumbnail Settings

  • Display image attachments as pictures under post - When this box is checked, if the attachment is an image, it will be displayed as an image. Otherwise, there will only be a text link, so that the reader must click on the link to view the image.
  • Resize images when showing under posts - If the option above is checked, this option will save a separate (smaller) attachment for the thumbnail, to decrease bandwidth.
  • Save thumbnails as PNG- Checking this creates a higher quality thumbnail.
  • Adaptive thumbnail memory - When this box is checked, SMF estimates the amount of memory needed to create the thumbnail, and then requests that amount from the server. In rare cases, webhosts might not want to provide this information, so the thumbnail is not created. Or more commonly on shared servers, there might not be enough memory to create a thumbnail. If you notice that thumbnail creation fails often, even on moderately sized images, try unchecking this option. Otherwise, keep it checked.
  • Maximum width of thumbnails - Set the maximum width you want for thumbnails. This is only used when Resize images when showing under posts is enabled.
  • Maximum height of thumbnails - Set the maximum height you want for thumbnails. This is only used when Resize images when showing under posts is enabled.
  • Max display width of posted or attached images - Set the maximum width of displayed images when thumbnail is clicked on. Set to zero for no limit.
  • Max display height of posted or attached images - Set the maximum height of displayed images when thumbnail is clicked on. Set to zero for no limit.


Be sure to click the Save button in the bottom right corner, after you finish configuring all the options on this page.

Avatar Settings

This page is at Admin Center > Forum > Attachments and Avatars > Avatar Settings. These options allow you to configure avatars and set up their directories. There are four types of avatars, configured in four sections on this page: Server-stored, External, Uploadable, and Gravatars.

Server-stored Avatars

These are avatars which administrators have uploaded to their server. By default, they should go into the "avatars" directory. But if admins want to add sub-folders, they can create categories of avatars. Members will be able to browse them, and choose an avatar for their profile.

Note that when searching for avatars to use in their forums, administrators should be mindful of copyrights and licenses, and only provide avatars to their forum, which they have permission to use.

  • Membergroups allowed to select a server-stored avatar - Choose which membergroups can or cannot use server-stored avatars.
  • Avatars directory - The path for the base directory where server stored avatars are kept.
  • Avatars URL - This is the URL for the avatars directory.

External Avatars

These are avatars which exist on a third party website or host. The downside of using this feature is that administrators cannot control from which site their members get the avatars, whether the avatars are appropriate for their site, or whether their member has permission to use them.

  • Membergroups allowed to select an external URL - Choose which membergroups can or cannot use externally stored avatars.
  • Download avatar at given URL - Specify whether external avatars are downloaded onto your own server. Once this box is checked, and the member enters the URL, the external avatar becomes like an uploaded avatar. If it is not checked, the avatar becomes essentially hot-linked, once the member enters the URL. Checking this box may speed up the handling of these avatars. Read the question mark icon window for more details.
  • Maximum width of external avatar - Set the maximum width of externally linked avatars. Set to zero for no limit.
  • Maximum height of external avatar - Set the maximum height of externally linked avatars. Set to zero for no limit.
  • If the avatar is too large... - If the avatar is over the specified size, there are three options in this dropdown menu: Refuse it, Resize it in user's browser, and Download and resize it on the server. See the question mark icon window for the pros and cons for each option. Note that either the GD Library or ImageMagick are needed on the server, for this option to work.

Uploadable Avatars

These are avatars which have been individually uploaded to the forum's server by the forum's members. This feature has the same risks as external avatars, but gives administrators a little more control. Also, these avatars could potentially take up more space on the server.

  • Allow members to upload their own avatars - Choose which membergroups can or cannot upload avatars to your server.
  • Maximum width of uploaded avatar - Specify the maximum width allowed for avatars that are uploaded. Set to zero for no limit.
  • Maximum height of uploaded avatar - Specify the maximum height allowed for avatars that are uploaded. Set to zero for no limit.
  • Resize oversized large avatars - If enabled this will resize larger then specified avatars (requires a GD module).
  • Use PNG for resized avatars - PNG files are larger, but offer better quality compression. If this is unchecked, JPEG will be used instead. Although JPEG images are smaller in size they are usually a lower quality than PNG files.
  • Re-encode potentially dangerous avatars - When this option is checked, SMF will try to re-encode potentially dangerous avatars, which offers better security. Note however that this will render animated images static. (This requires a GD module to be installed on your server.)
  • Perform extensive security checks on uploaded avatars - Selecting this option will enable very strict security checks on avatars. Enabling this option can, however, result in a lot of safe avatars to be rejected. Read the question mark icon window for more details.
  • Upload directory - This is the directory for uploaded, or custom avatars. If you want to change the default directory, the new one should be a valid and writable directory, different from the directory for server-stored avatars.
  • Upload URL - This is the URL of the directory.

Gravatars (Globally Recognized Avatars)

To use this feature, members must register their email address and an avatar at https://www.gravatar.com/. After that, the same avatar will be used on every site across the internet, in which the member uses the same email address. Note that there are obvious potential security issues when using this feature.

  • Enable Gravatars for forum users? - Check this box to allow this feature in the forum.
  • Force Gravatars to be used instead of normal avatars? - Check this box to use only Gravatars, and no other avatars in the forum.
  • Allow storing an extra email address for Gravatars? - Check this to allow more than one email address for Gravatars.
  • Maximum allowed rating? - Gravatars have audience ratings. The dropdown menu has four options, ranging from G (Generally acceptable) to X (Explicit).
  • Default image to show when an email address has no matching Gravatar - If Gravatars are enabled, but a member does not have a Gravatar account, a default image will be shown instead. The dropdown menu has six, self-explanatory options from which to choose.


Be sure to click the Save button in the bottom right corner, when you finish configuring all the avatar options on this page.

Attachment Directories

On this page, administrators can create additional attachment directories. If the forum's active directory is getting too large, for whatever reason, or if you have some other reason for multiple attachment directories, you can manage them here. Perhaps for example, you would like to keep a separate directory per month or per year?

This section has five columns:

  • Current - In this column, there will be a filled dot beside the directory which is active.
  • Path - This column contains the path to the directory, on the server.
  • Size - This column shows the size, in kb, of all the files in this directory.
  • Files - This column shows the number of files in the directory.
  • Status - If all is well with the directory, this column will show "OK". If the directory is empty, it will say "Unused".

Remember that only one directory can be active, or Current, at any given time. To change the current directory, simply click the dot in the far left column, beside the one you want. Do not forget to click the Save button in the bottom right corner, after you click the dot.

To create a new directory:

  • Click the Add Path button in the bottom right corner of the page.
  • Copy the path from the Path column of the original directory.
  • Change the name of the last folder (everything after the last / ). For example, the default folder or directory is called "attachments". You might name the new one "attachements2", or "2024attachments" or whatever.
  • Click the Save button.
  • Finally, be sure to tick the new path, in the Current column, to make it active.

After that, whenever members upload attachments, they will go into the new directory.

To remove a directory:

Remember that only empty directories can be removed. You can see if a directory is empty by looking at the Size, Files, and Status columns. Their values will be "0", "0", and "Unused", respectively.

  • Delete the entire path from the Path column.
  • Click the Save button.

File Maintenance

On this page, administrators can manage these attachment and avatar files. There are four sections: File Attachment Statistics, Attachment Integrity Check, Attachment Pruning, and Transfer Attachments.

File Attachment Statistics

This section provides some convenient statistics which can help in managing these files.

  • Total attachments - This shows the total number of files that are currently (or still) attached to messages.
  • Total avatars - This shows the total number of avatar files which have been uploaded by members.
  • Total size of all attachment directories - This shows the total space taken up on the server by all attachment directories.
  • Current attachment directory - This shows which attachment directory is currently active.
  • Total size of current attachment directory - This shows the size (in kb) of the currently active attachment directory.
  • Total space available - This shows the value set in Admin Center > Forum > Attachments and Avatars > Attachment Settings > Max attachment directory space. If it is set to "zero for no limit", this item will show "No maximum directory size is currently set".
  • Total files in current attachment directory - This shows the total number of files in the server's 'attachments' directory.
  • Total files remaining - This shows the difference between the Maximum number of files per directory setting (on the Admin Center > Forum > Attachments and Avatars > Attachment Settings page), and the Total files in current attachment directory, above.

Attachment Integrity Check

This function will check the integrity and sizes of attachments and filenames listed in the database and, if necessary, fix errors it encounters.

Attachment Pruning

With this feature, administrators can remove attachments according to their age or size. It is also possible to remove avatars of members who have not been active for some certain amount of time. Of course removing these things should be considered carefully. If admins are unsure, they might want to discuss it with other admins in the Community Forum.

  • Remove attachments older than - Set the number of days to represent the age of the attachments.
    • Message to add to post - In place of the removed attachment, a comment or message can be appended to the post. Keep the default suggestion: "[attachment deleted by admin]" or type your own custom comment here.
  • After you make your choices, click the Remove button to perform this function.


  • Remove attachments larger than - Set the size in KB, for attachments over which size, you want to remove.
    • Message to add to post - In place of the removed attachment, a comment or message can be appended to the post. Keep the default suggestion: "[attachment deleted by admin]" or type your own custom comment here.
  • After you make your choices, click the Remove button to perform this function.


  • Remove avatars from members not active for more than - Set the number of days of inactivity after which members' avatars will be removed.
  • After you set the number of days, click the Remove button to perform this function.

Transfer Attachments

This section allows administrators to transer files between directories.

  • Transfer files from - From the dropdown menu to the right, Select directory, choose which directory contains the files you want to transfer.
  • Automatically by space or file count - This means that SMF creates a new directory in the base directory that you choose in the Select base directory dropdown menu. It uses the space or file count information, from the directory you choose in the first Select directory dropdown menu.
  • Or to a specific directory - If you want to transfer the files into a specific directory, do not use the Select base directory dropdown menu. Instead, from the second Select directory dropdown menu, choose the destination directory for the files.

After you have made the appropriate menu choices for your purposes, click the Transfer button in the bottom right corner.

Main

Configuration

Forum

Members

Maintenance

Miscellaneous




Advertisement: