2012-07-11, 06:29 PM
Just a simple tutorial from me. On how to style your attachments the way you want them. Example below.
Firstly go to ACP > Template & Styles > Templates > THEME > Postbit Templates > Postbit_attachments_attachment and replace the whole template with your chosen style
My personal favorite style is this
add this CSS to the bottom of your global.css for your theme.
Preview
Style 2 (no css)
Preview
Download image
FIXED THE LINK NOT WORKING!
Firstly go to ACP > Template & Styles > Templates > THEME > Postbit Templates > Postbit_attachments_attachment and replace the whole template with your chosen style
My personal favorite style is this
<button class="downloadlink" style="width:500px;font-family: 'lucida grande', 'lucida sans unicode', 'arial', 'verdana', 'tahoma', sans-serif' !important; onclick="window.open('/attachment.php?aid={$attachment['aid']}');"><img style="height:35px;float:left;" src="/images/download.png" /> Download <strong>{$attachment['filename']}</strong><br />{$attachment['downloads']} Downloads — FileSize: {$attachment['filesize']}</button>
add this CSS to the bottom of your global.css for your theme.
button.downloadlink {
border:1px solid #0c0f12;
background:#161c21;
background-repeat:repeat-x;
font-family: 'VisitorTT1BRKRegular';
padding:4px 6px;
color:#ffffff;
cursor:pointer;
width:100px;
}
button.downloadlink:hover,
button.active {
background:#11161a;
background-repeat:repeat-x;
border:1px solid #0c0f12;
color:#ffffff;
}
Preview
Style 2 (no css)
<table border="0" cellpadding="0" cellspacing="3">
<!-----Postbit_Attachment---->
</table>
<table class="attachtable" id="table2" width="95%" align="center" border="1" cellpadding="2" cellspacing="0">
<tr>
<td colspan="3" class="attachheader" width="100%" align="center"><b>
{$attachment['filename']}</b></td>
</tr>
<tr>
<td class="attachrow" width="15%"><span class="genmed">File Type:</span></td>
<td class="attachrow" width="75%">
{$attachment['icon']}</td>
<td rowspan="3" class="attachrow" width="10%" align="center">
<a href="attachment.php?aid={$attachment['aid']}">
<img src="images/download.png" alt="" border="0"></a><br>
</td> </tr>
<tr>
<td class="attachrow" width="15%"><span class="genmed">Downloaded:</span></td>
<td class="attachrow" width="75%"><span class="genmed">{$attachment['downloads']} times</span></td>
</tr>
<tr>
<td class="attachrow" width="15%"><span class="genmed">Size:</span></td>
<td class="attachrow" width="75%">{$attachment['filesize']}</td>
</tr>
</table>
Preview
Download image
FIXED THE LINK NOT WORKING!