Hi,
We're using SupportSuite 3.04.10, and were sick of the way it handled attachments, so we hacked at it until we came up with this solution.
We wanted the attachments (in the /files directory) to include the date it was received, and the ticketmaskid, and the filename. This would mean that we could archive these attachments offline, and still be able to search on them.
In supportsuite/modules/tickets/functions_attachments.php
find:
Code:
/**
* Generates a random store filename
*/
function generateStoreFilename()
{
return $this->storeprefix.buildHash();
}
and replace it with:
Code:
/**
* Generates a random store filename
*/
function generateStoreFilename($ticketid, $filename)
{
// return $this->storeprefix.buildHash();
$date = date(ymd);
$rand = rand(1, 999);
$rand = str_pad($rand, 3, "0", STR_PAD_LEFT);
$query = "SELECT ticketmaskid FROM swtickets WHERE ticketid = '" . $ticketid . "'";
$ticketmaskidquery = mysql_query($query);
$record = mysql_fetch_object($ticketmaskidquery);
$ticketmaskid = $record->ticketmaskid;
return $date.'_'.$ticketmaskid.'_'.$rand.'_'.$filename;
}
also, there are 2 x
Code:
$storefilename = $this->generateStoreFilename();
which need changing to
Code:
$storefilename = $this->generateStoreFilename($ticketid, $filename);
Now, attach_fasjldfhlur348rt3nfiou3 is called things like:
061106_DQI-798509_746_ESale.pdf
which is
date_ticketmaskid_randomnumber_filename.ext
(The random number was to deal with some messages having multiple attachments ... it's a bit lazy, but it works.

)
No warranties, implied or otherwise, if you attempt this hack.