• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.1 show md5 + date uploaded attachments

Jake Bunce

XenForo moderator
Staff member
#2
Admin CP -> Appearance -> Templates -> attached_files

Add the red code:

Code:
<xen:require css="attached_files.css" />

<div class="attachedFiles">
	<h4 class="attachedFilesHeader">{xen:phrase attached_files}:</h4>
	<ul class="attachmentList SquareThumbs"
		data-thumb-height="{xen:calc '{$xenOptions.attachmentThumbnailDimensions} / 2'}"
		data-thumb-selector="div.thumbnail > a">
		<xen:foreach loop="$post.attachments" value="$attachment">
			<li class="attachment{xen:if {$attachment.thumbnailUrl}, ' image'}" title="{$attachment.filename}">

				Hash: {$attachment.file_hash}<br />
				Date: <xen:datetime time="{$attachment.attach_date}" />

				<div class="boxModelFixer primaryContent">
					
					<div class="thumbnail">
						<xen:if is="{$attachment.thumbnailUrl} AND {$canViewAttachments}">
							<a href="{xen:link attachments, $attachment}" target="_blank" class="LbTrigger"
								data-href="{xen:link misc/lightbox}"><img 
								src="{$attachment.thumbnailUrl}" alt="{$attachment.filename}" class="LbImage" /></a>
						<xen:elseif is="{$attachment.thumbnailUrl}" />
							<a href="{xen:link attachments, $attachment}" target="_blank"><img
								src="{$attachment.thumbnailUrl}" alt="{$attachment.filename}" /></a>
						<xen:else />
							<a href="{xen:link attachments, $attachment}" target="_blank" class="genericAttachment"></a>
						</xen:if>
					</div>
					
					<div class="attachmentInfo pairsJustified">
						<h6 class="filename"><a href="{xen:link attachments, $attachment}" target="_blank">{$attachment.filename}</a></h6>
						<dl><dt>{xen:phrase file_size}:</dt> <dd>{xen:number $attachment.file_size, size}</dd></dl>
						<dl><dt>{xen:phrase views}:</dt> <dd>{xen:number $attachment.view_count}</dd></dl>
					</div>
				</div>
			</li>
		</xen:foreach>
	</ul>
</div>

<xen:comment><xen:require css="xenforo.css" /></xen:comment>
The result:

Screen shot 2012-12-25 at 10.11.27 PM.png