The Arcive of vBulletin Modifications Site. |
|
![]() |
|||||||||||||||||||||||||
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]&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> 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]&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> Show Your Support
|
Comments |
#2
|
||||
|
||||
![]()
humm, nice idea, installed ^^
|
#3
|
|||
|
|||
![]()
Installed as well thanks.
|
#4
|
|||
|
|||
![]()
heh...I had this in the paid requests like 2 days ago.
Only difference (i think) is that I want guests to see the thumbnail then when clicked it loads to a message/picture saying to registrar... Tagged. I'll keep an eye on this ![]() |
#5
|
|||
|
|||
![]()
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> |
#6
|
|||
|
|||
![]()
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 Here was my last post... https://vborg.vbsupport.ru/showpost....&postcount=461 (you don't have to look at this or do anything with this hahah) |
#7
|
|||
|
|||
![]()
Awesome little template mod and just what I have been looking for...
Thanks ![]() Edit: I selected the wrong rating, but I meant to give it a 5 star. Can this be changed?...Sorry |
#8
|
|||
|
|||
![]()
Thanks, exactly what I was looking for.
|
#9
|
||||
|
||||
![]()
thank you,,
|
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|