Jump to content

File Storage Bin In Tickets


Recommended Posts

I thought this might be useful for anyone interested.

 

I needed a way to send my clients large uploads that sometimes were not being received through email, so I created an area above each support ticket that displays all attachments sent from an admin in a "storage bin" box.

 

This way they could click on the support ticket link or log into their client area and view the ticket and download the attachments... Sort of like a "YouSendIt.com" feature.

 

Here's what it looks like:

http://screencast.com/t/MWZmZDdl

 

Here's the code I've added to /whmcs/templates/YOURTEMPLATE/viewticket.tpl

 

<div class="photostorageheader">
 <table width="100%" border="0" cellpadding="10" cellspacing="0">
   <tr>
     <td align="left"><b>Storage Bin</b></td>
   </tr>
 </table>
</div>
{php}
$this->assign(replies,array_reverse($this->_tpl_vars['replies'],true));
{/php}
<div class="photostorage">
<b>Click a file name to download and view the file.</b><br />
{foreach key=num item=reply from=$replies}
{if $reply.admin && $reply.attachments}<br />
 {$reply.date}<br />
 {foreach from=$reply.attachments key=num item=attachment} <img src="images/article.gif" class="absmiddle" border="0" alt="{$attachment}" /> <a href="dl.php?type=ar&id={$reply.id}&i={$num}">{$attachment}</a><br />
 {/foreach}{/if}
{/foreach}
</div>

 

Custom CSS to put them in a green box:

Add below to whmcs/templates/YOURTEMPLATE/styles.css

 

.photostorageheader{
background-color:#A4F8A4;
color:#333;
border-top:1px solid #A4F8A4;
border-right:1px solid #A4F8A4;
border-bottom:1px solid #A4F8A4;
border-left:1px solid #A4F8A4
}
.photostorage{
background-color:#EBFFF1;
padding:10px;
margin:0 0 10px;
border-right:1px solid #A4F8A4;
border-bottom:1px solid #A4F8A4;
border-left:1px solid #A4F8A4;
}

Link to comment
Share on other sites

The next step is to edit the emails that are sent out to not include the attachments when sending from a particular department. This will help improve email deliverability since some email clients will not be able to receive large files.

Link to comment
Share on other sites

good tip ... I tried to include attachments of customers but unsuccessfully!

 

I haven't tested it but you should just have to get rid of the "$reply.admin &&" part so it should look like this instead:

 

<div class="photostorageheader">
 <table width="100%" border="0" cellpadding="10" cellspacing="0">
   <tr>
     <td align="left"><b>Storage Bin</b></td>
   </tr>
 </table>
</div>
{php}
$this->assign(replies,array_reverse($this->_tpl_vars['replies'],true));
{/php}
<div class="photostorage">
<b>Click a file name to download and view the file.</b><br />
{foreach key=num item=reply from=$replies}
{if $reply.attachments}<br />
 {$reply.date}<br />
 {foreach from=$reply.attachments key=num item=attachment} <img src="images/article.gif" class="absmiddle" border="0" alt="{$attachment}" /> <a href="dl.php?type=ar&id={$reply.id}&i={$num}">{$attachment}</a><br />
 {/foreach}{/if}
{/foreach}
</div>

Link to comment
Share on other sites

I just tested what I posted above and it worked fine. you don't need if $reply.user...

 

Simply look for:

 

{if $reply.admin && $reply.attachments}

 

and change it to:

 

{if $reply.attachments}

 

 

and that's it.

Link to comment
Share on other sites

see image http://edvan.net.br/storage.jpg

 

doubles the attachment you sent the team.

 

<div class="photostorageheader">

<table width="100%" border="0" cellpadding="10" cellspacing="0">

<tr>

<td align="left"><b>Storage Bin</b></td>

</tr>

</table>

</div>

{php}

$this->assign(replies,array_reverse($this->_tpl_vars['replies'],true));

{/php}

<div class="photostorage">

<b>Click a file name to download and view the file.</b><br />

{foreach key=num item=reply from=$replies}

{if $reply.admin && $reply.attachments}<br />

{$reply.date}<br />

{foreach from=$reply.attachments key=num item=attachment} <img src="images/article.gif" class="absmiddle" border="0" alt="{$attachment}" /> <a href="dl.php?type=ar&id={$reply.id}&i={$num}">{$attachment}</a><br />

{/foreach}{/if}

{/foreach}

</div>

 

 

<div class="photostorageheader">

<table width="100%" border="0" cellpadding="10" cellspacing="0">

<tr>

<td align="left"><b>Storage Bin (client)</b></td>

</tr>

</table>

</div>

{php}

$this->assign(replies,array_reverse($this->_tpl_vars['replies'],true));

{/php}

<div class="photostorage">

<b>Click a file name to download and view the file.</b><br />

{foreach key=num item=reply from=$replies}

{if $reply.attachments}<br />

{$reply.date}<br />

{foreach from=$reply.attachments key=num item=attachment} <img src="images/article.gif" class="absmiddle" border="0" alt="{$attachment}" /> <a href="dl.php?type=ar&id={$reply.id}&i={$num}">{$attachment}</a><br />

{/foreach}{/if}

{/foreach}

</div>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated