Version: 1.00, by wolfstream
Developer Last Online: Sep 2009
Category: Show Thread Enhancements -
Version: 3.7.4
Rating:
Released: 12-23-2008
Last Update: Never
Installs: 15
Template Edits
No support by the author.
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
<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]&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!
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
Pretty easy to do. I'm assuming you meant something like it is setup here?
Didn't get a demo out earlier, as I did this originally for a client (really, it was a 5 second hack) who didn't mind me redistributing it.
to do that, replace postbit_attachment with
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>
<if condition="$show['member']">
<td><a href="attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]&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>
Oh sorry I was speaking more of image attachments. Like in combination with lytebox.
I guess this could be adapted to that somehow though..hmm I might have to take a look. I was thinking maybe just an <if> statement might get this to work... maybe it will haha