vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=236)
-   -   New Posting Features - Show attachments to members only (https://vborg.vbsupport.ru/showthread.php?t=219519)

wolfstream 07-25-2009 10:00 PM

Show attachments to members only
 
1 Attachment(s)
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.

replace postbit_attachment (yeah, all of it) 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 something, not give them a preview, and tell them how to get it. It really is incredibly easy to do, just like my 3.7 version ;)

Charlie98902 07-27-2009 02:17 AM

I have your 3.7 version installed with no issues, are they the same?

https://vborg.vbsupport.ru/showthread.php?t=199690

wolfstream 07-27-2009 02:49 AM

Yeah, they're pretty much the same. I just added an update to let people know it was 3.8.x capable.

Charlie98902 07-27-2009 03:10 AM

Thanks for the info. Running 3.8.3 vbulletin and the 3.7 version of this mod.

BigDog56 07-27-2009 03:37 AM

Very nice, thank you!

dothanhtrung 07-27-2009 05:29 AM

Thank you much, but each file to attach, it has a line of reporting. can you edit it.

wolfstream 07-27-2009 05:54 AM

Quote:

Originally Posted by dothanhtrung (Post 1856314)
Thank you much, but each file to attach, it has a line of reporting

That's exactly what it's supposed to do, report on every attachment.

dengbej 07-27-2009 10:59 AM

thanks

japaro 08-04-2009 06:25 AM

Modified adding language select mode


HTML 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>$vbphrase[attachment_download_members]</td>
</if>
</tr>


replaced <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>

with

$vbphrase[attachment_download_members]

added attachment_download_members to language phrase with the above text

see sample http://info.japaro.net

Marek58 08-05-2009 05:13 AM

Polish version (wersja polska):

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> Post ten zawiera załącznik kt?ry będzie widoczny po <a href="/register.php">zarejestrowaniu</a>. Proces rejestracji jest szybki i łatwy.</td>
</if>
</tr>


Charlie98902 12-25-2009 11:41 PM

Can you please update this to vbulletin 4 please? Thank


All times are GMT. The time now is 06:19 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01060 seconds
  • Memory Usage 1,740KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)bbcode_html_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (11)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete