Back to vBulletin 3.7 Template Modifications

Show attachments to members only
Mod Version: 1.00, by wolfstream

This modification is in the archives.
vB Version: 3.7.4 Rating: (3 votes - 5.00 average) Installs: 15
Released: 24 Dec 2008 Last Update: Never Downloads: 4
Not Supported Template Edits  

Now, I know that vb will stop unregistered users from downloading attachments, but here's another quick way to get the attachment itself SHOWN to members only, while letting guests know they're missing something

In postbit_attachment, look for
Code:
<tr>
	<td><img class="inlineimg" src="$stylevar[imgdir_attach]/$attachment[attachmentextension].gif" alt="<phrase 1="$attachment[attachmentextension]">$vbphrase[file_type_x]</phrase>" width="16" height="16" border="0" style="vertical-align:baseline" /></td>
	<td><a href="attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]&amp;d=$attachment[dateline]"<if condition="$show['newwindow']"> target="_blank"</if>>$attachment[filename]</a> ($attachment[filesize]<if condition="$show['views']">, <phrase 1="$attachment[counter]">$vbphrase[x_views]</phrase></if>)</td>
</tr>
And replace with:
Code:
<tr>
	<if condition="$show['member']">
	<td><img class="inlineimg" src="$stylevar[imgdir_attach]/$attachment[attachmentextension].gif" alt="<phrase 1="$attachment[attachmentextension]">$vbphrase[file_type_x]</phrase>" width="16" height="16" border="0" style="vertical-align:baseline" /></td>
	<td><a href="attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]&amp;d=$attachment[dateline]"<if condition="$show['newwindow']"> target="_blank"</if>>$attachment[filename]</a> ($attachment[filesize]<if condition="$show['views']">, <phrase 1="$attachment[counter]">$vbphrase[x_views]</phrase></if>)</td>
<else />
<td> This post has an attachment which you could see if you were <a href="/register.php">registered</a>. Registering is quick and easy</td>
</if>
</tr>
This will let guests know they're missing out on viewing an attachment. Very easy to do!

Download

No files for download.


vblts.ru supports vBulletin®, 2022-2024