vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Minimum posts to download attachments.. (https://vborg.vbsupport.ru/showthread.php?t=52682)

Boofo 05-09-2003 12:40 PM

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.

Sophocle 05-09-2003 12:57 PM

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.

Boofo 05-09-2003 01:01 PM

So they will be allowed to see image attachments with your code?

Sophocle 05-09-2003 02:15 PM

Yes :)

Boofo 05-09-2003 02:22 PM

Then why bother to even install the hack? ;)

Sophocle 05-09-2003 02:34 PM

To limit downloading attachments other than images of course ;)

Boofo 05-09-2003 02:38 PM

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? ;)

shungo 05-09-2003 02:57 PM

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.

EvilLS1 05-10-2003 07:16 AM

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. :p

EvilLS1 05-10-2003 07:56 AM

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.


All times are GMT. The time now is 11:16 AM.

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.01004 seconds
  • Memory Usage 1,734KB
  • 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
  • (1)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete