Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases

Reply
 
Thread Tools
Minimum posts to download attachments.. Details »»
Minimum posts to download attachments..
Version: 1.00, by EvilLS1 EvilLS1 is offline
Developer Last Online: May 2021 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 05-06-2003 Last Update: Never Installs: 9
 
No support by the author.

This little hack will make it possible for you to require your users to have a minimum number of posts (which you define in the admin control panel) before they can download attachments.

Requested by TranceMaster and a couple of others in this thread:
https://vborg.vbsupport.ru/showthrea...threadid=48636

Updated: No more red Xs if the "view images" option is set to "yes". Now if "view images" is set to yes, everyone will be able to see the images in the threads, but not download other file types unless they have enough posts.. But if "view images" is set to no, users who do not have the minimum # of posts will still get the "not enough post" error message (even with images)...

Credits: Thanks to Sophocle for his help with this update.

If you downloaded the first version clear your browser cache and download the zip file again.

Screenshots included in the zip.

If you find this hack useful please click install.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 05-09-2003, 12:40 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What does this mean?

"To avoid the problem of the View Images option"

I mean I'm not sure I understand what that would do if you didn't do it this way.
Reply With Quote
  #13  
Old 05-09-2003, 12:57 PM
Sophocle Sophocle is offline
 
Join Date: Feb 2002
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Important! If you use this hack the "View Images" option in the admin control panel should be set to "no" or else guests & people who don't have enough posts will only see a red X.
I thought it was a too big limitation, so my suggestion permit to show images attachments even if the user hasn't send the minimum number of messages.
Reply With Quote
  #14  
Old 05-09-2003, 01:01 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So they will be allowed to see image attachments with your code?
Reply With Quote
  #15  
Old 05-09-2003, 02:15 PM
Sophocle Sophocle is offline
 
Join Date: Feb 2002
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes
Reply With Quote
  #16  
Old 05-09-2003, 02:22 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Then why bother to even install the hack?
Reply With Quote
  #17  
Old 05-09-2003, 02:34 PM
Sophocle Sophocle is offline
 
Join Date: Feb 2002
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

To limit downloading attachments other than images of course
Reply With Quote
  #18  
Old 05-09-2003, 02:38 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So, if it is a link, they can't view it. But if the image is showing, they can view it instead of seeing a red x. Is that it?
Reply With Quote
  #19  
Old 05-09-2003, 02:57 PM
shungo shungo is offline
 
Join Date: Nov 2002
Location: France
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi

This is the French version of this hack, thx alot EvilLS1

It works with VBB 2.x.x

Kikooo

Voici la version Fran?aise, compatible avec les versions 2.x.x de VBB. Je l'utilise pour ma part sur la 2.3.0.
Reply With Quote
  #20  
Old 05-10-2003, 07:16 AM
EvilLS1's Avatar
EvilLS1 EvilLS1 is offline
 
Join Date: Apr 2002
Location: Georgia, USA
Posts: 987
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sophocle,
That is an excellent idea! The only problem that I saw with it is that perhaps some people prefer that users with less than the minimum # of posts not be able to download images.. And even with the "view images" option set to "no", they would still be able to download images that way.

But there's an easy solution..

Code:
if ($viewattachedimages==1) {
$extension=strtolower(substr(strrchr($attachmentinfo[filename],"."),1));
if (($minpostattach > $bbuserinfo[posts]) && $minpostattach!=0 && $extension!='gif' && $extension!='jpeg' && $extension!='jpg' && $extension!='png') {
        eval("standarderror(\"".gettemplate("error_attachmoreposts")."\");");
exit;
} 
} else if ($minpostattach > $bbuserinfo[posts] and $minpostattach!=0) {
        eval("standarderror(\"".gettemplate("error_attachmoreposts")."\");");
exit;
}
With this code, if "view images" is set to no, users who do not have the minimum # of posts will still get the "not enough post" error message when attempting to download images.. But if "view images" is set to yes, everyone will be able to see the images in the threads, but not download other file types unless they have enough posts.

I've tested this and it works. I'll update the zip file in the first post.



{edit} I just noticed something.. As an added bonus, this hack will also stop people from hot linking images on other sites if you set view images to no and minimum posts > 0.
Reply With Quote
  #21  
Old 05-10-2003, 07:56 AM
EvilLS1's Avatar
EvilLS1 EvilLS1 is offline
 
Join Date: Apr 2002
Location: Georgia, USA
Posts: 987
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

squawell,
I'm sure that could be done, but its not something that I would want for my forum and at the moment I don't have time to try it...sorry.
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:00 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04976 seconds
  • Memory Usage 2,303KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete