======== Custom Attachment Icons v5.2.1.05 ========
Created by Joe Curia (azumandias _ at _ hotmail.com)
Original phorum coding by the Phorum Development Team (http://www.phorum.org)
Some Icons courtesy of:
  FAMFAMFAM - http://www.famfamfam.com/lab/icons/silk/
Some media detection coding by Maurice Makaay <maurice@phorum.org>

========        Brief Description         ========
This module allows the admin to replace the normal attachment icon with icons 
relating to the type of the attachments or link in the post.  Each supported 
type has a language entry for Alt/Title display.  The module also searches for 
[img], [video], and [mp3] bbcode tags and the extensions of http links inside 
the body of messages as they are posted.

========      Installation and Usage      ========
In order to use this module, you must first install and enable it like any other 
module.  Then you must edit your list.tpl, list_threads.tpl, and read_threads.tpl 
files to utilize the additional icons.  For example, in the Emerald template you 
should change:

{IF MESSAGES->meta->attachments}<img src="{URL->TEMPLATE}/images/attach.png" class="icon1616" title="{LANG->Attachments}"  alt="{LANG->Attachments}" /> {/IF}

to read:

{INCLUDE "custom_attachment_icons::list_icons"}

A notice will be posted at the top of the forum for admin if the template edits 
have not been made.  This mainly serves as a reminder if a future upgrade over-
writes the template edits you mad while installing this module, and can be 
disabled from the settings page if needed.

If you are not installing this module as a part of a new phorum installation, 
you will want to run the script to check past posts for bbcode and url links to 
count as attachments. This option can be found on the settings page.

At this time, if you want to customize the icons or add more file types, you can 
edit the mime_types.php file.  Please note that any customized icons should be 
placed in the images folder, should be 16px by 16px, and should have a counter-
part with a multi_ prefix if you want to show a different icon when more than 
one attachment of a single type is attached (ie. two pictures).

Support for the Recent Messages module has been added, with two edits needed:
First, the ./mods/recent_messages/recent_messages.php file must be edited to add 
these lines (I have included the three existing lines as a reference point for 
where to place the new code):
    // ----------------------------------------------------------------------
    // Setup template data.
    // ----------------------------------------------------------------------
       // run list mods
       if (isset($PHORUM["hooks"]["list"]))
        $messages = phorum_hook("list",$messages);
        
Next, the ./mods/recent_messages/templates/emerald/render_message_row.tpl file 
must be edited to add this line (again with existing code for reference):
<h4><a {IF subjectclass}class="{subjectclass}"{/IF}
           href="{MESSAGE->URL->READ}">{MESSAGE->subject}</a>
           {INCLUDE "custom_attachment_icons::recent_messages_icons"}
</h4>
========                Todo              ========
 - Find a way to avoid template editing if at all possible (not looking good)
 - Allow the admin to customize or add type icons from the settings page
 - Add further features as requested or as they pop into my head
 	
========               Files              ========
custom_attachment_icons\
	Changelog
	custom_attachment_icons.php
	info.txt
	message_body_scanning.php
	mime_types.php
	README
	settings.php
	images\
		camera.png
		compress.png
		film.png
		multi_camera.png
		multi_compress.png
		multi_film.png
		multi_page_white_acrobat.png
		multi_page_white_excel.png
		multi_page_white_powerpoint.png
		multi_page_white_word.png
		multi_sound.png
        multi_url.gif
		page_white_acrobat.png
		page_white_excel.png
		page_white_powerpoint.png
		page_white_word.png
        pattern.png
		sound.png
        url.gif
	lang\
		english.php
    templates\
        emerald\
            list_icons.tpl
            recent_messages_icons.tpl