Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Members Can't Download Attachments Before Reply Details »»
Members Can't Download Attachments Before Reply
Version: 1.1, by MARCO1 MARCO1 is offline
Developer Last Online: Jan 2022 Show Printable Version Email this Page

Category: Show Thread Enhancements - Version: 3.8.x Rating:
Released: 01-29-2009 Last Update: Never Installs: 87
Auto-Templates
Code Changes  
No support by the author.

Members Can't Download Attachments

Members can't download Attachments Before Reply .

Versions :
vB 3.8.x

Install :

Import The Product From Your Admincp
Open Read Me file In attachments For File Changes

If You Use This modification click INSTALL

Download Now

File Type: zip Can't See Attach - EN 3.8.X.zip (41.6 KB, 780 views)

Screenshots

File Type: jpg 1.jpg (32.6 KB, 0 views)

Supporters / CoAuthors

Show Your Support

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

Comments
  #32  
Old 03-15-2009, 10:35 AM
MARCO1's Avatar
MARCO1 MARCO1 is offline
 
Join Date: Jun 2008
Posts: 872
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try To replace this line

PHP Code:
   if ( !$vbulletin->db->query_first "SELECT postid FROM " TABLE_PREFIX "post WHERE userid='".$vbulletin->userinfo[userid]."'  AND threadid=$threadinfo[threadid]) ) : 
Replace With
PHP Code:
   if ( !$vbulletin->db->query_first "SELECT postid FROM " TABLE_PREFIX "post WHERE userid='6".$vbulletin->userinfo[userid]."'  AND threadid=$threadinfo[threadid]) ) : 
Reply With Quote
  #33  
Old 03-15-2009, 01:22 PM
Powlo Powlo is offline
 
Join Date: Feb 2008
Location: Sunderland UK
Posts: 155
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MARCO1 View Post
Try To replace this line

PHP Code:
   if ( !$vbulletin->db->query_first "SELECT postid FROM " TABLE_PREFIX "post WHERE userid='".$vbulletin->userinfo[userid]."'  AND threadid=$threadinfo[threadid]) ) : 
Replace With
PHP Code:
   if ( !$vbulletin->db->query_first "SELECT postid FROM " TABLE_PREFIX "post WHERE userid='6".$vbulletin->userinfo[userid]."'  AND threadid=$threadinfo[threadid]) ) : 
Ok i tried that, i didnt receive an error but it still didnt work.

Thanks for helping but if i cant get this sorted im gonna have to uninstall.

[edit] Infact it didnt work for anybody wanting to download after that code edit. They could reply to the thread 10 times and they still couldnt have downloaded the attachment.
Reply With Quote
  #34  
Old 03-16-2009, 02:31 PM
Powlo Powlo is offline
 
Join Date: Feb 2008
Location: Sunderland UK
Posts: 155
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Any other ideas to prevent admin from having to reply?
Reply With Quote
  #35  
Old 03-20-2009, 11:35 PM
Powlo Powlo is offline
 
Join Date: Feb 2008
Location: Sunderland UK
Posts: 155
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK that one seems to have got you stumped a little, how about being able to turn it off for a certain style?
Reply With Quote
  #36  
Old 03-21-2009, 05:50 PM
crazlunatic crazlunatic is offline
 
Join Date: Mar 2009
Posts: 82
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi. Great plugin you have here. Is there a plugin or can you mod it so that it says they are require to have a certain number of posts before they are allowed to download?
Reply With Quote
  #37  
Old 03-22-2009, 02:44 PM
Davros Davros is offline
 
Join Date: Feb 2009
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This doesn't work in any way shape of form for me.

I've done the edit to the attachment.php.

Is there supposed to be an option in VB Options or anywhere else in Admin CP?

I think you need to elaborate on this a little more, maybe a better read me file.

Also worth mentioning when I reply to the post I still get the

Quote:
.You can't Download The Attachments Before Reply To The Thread.

Best Wishes
message.

This includes all usergroups including Admin even with this line in the attachments.php

Code:
   if ( !$vbulletin->db->query_first ( "SELECT postid FROM " . TABLE_PREFIX . "post WHERE userid='6".$vbulletin->userinfo[userid]."'  AND threadid=$threadinfo[threadid]" ) ) :
Reply With Quote
  #38  
Old 03-22-2009, 06:08 PM
Powlo Powlo is offline
 
Join Date: Feb 2008
Location: Sunderland UK
Posts: 155
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You need to remove the 6 from that line cos it doesnt work, infact it stops it from working altogether. As yet we havnt another solution to the Admin problem which is a shame cos this could be a really good mod for my forum.
Reply With Quote
  #39  
Old 03-27-2009, 06:33 PM
Powlo Powlo is offline
 
Join Date: Feb 2008
Location: Sunderland UK
Posts: 155
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you want to prevent a usergroup or groups from having to reply to a thread before downloading attachment you need to do this..

Replace this code ...
PHP Code:
   if ( !$vbulletin->db->query_first "SELECT postid FROM " TABLE_PREFIX "post WHERE userid='".$vbulletin->userinfo[userid]."'  AND threadid=$threadinfo[threadid]) ) : 
with this this..


PHP Code:
if (!is_member_of($vbulletin->userinfoxyz))
{
   if ( !
$vbulletin->db->query_first "SELECT postid FROM " TABLE_PREFIX "post WHERE userid='".$vbulletin->userinfo[userid]."'  AND threadid=$threadinfo[threadid]) ) :  


Changing x, y, z for your groups that dont need to reply.

Hope that helps.

Thanks to Lynne for her help.
Reply With Quote
  #40  
Old 03-30-2009, 08:40 PM
Davros Davros is offline
 
Join Date: Feb 2009
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Powlo View Post
If you want to prevent a usergroup or groups from having to reply to a thread before downloading attachment you need to do this..

Replace this code ...
PHP Code:
   if ( !$vbulletin->db->query_first "SELECT postid FROM " TABLE_PREFIX "post WHERE userid='".$vbulletin->userinfo[userid]."'  AND threadid=$threadinfo[threadid]) ) : 
with this this..


PHP Code:
if (!is_member_of($vbulletin->userinfoxyz))
{
   if ( !
$vbulletin->db->query_first "SELECT postid FROM " TABLE_PREFIX "post WHERE userid='".$vbulletin->userinfo[userid]."'  AND threadid=$threadinfo[threadid]) ) :  


Changing x, y, z for your groups that dont need to reply.

Hope that helps.

Thanks to Lynne for her help.
Thanks for the advise but now I get this error when the attachment is clicked.

Code:
Parse error: syntax error, unexpected '}' in /home/test/domains/test-forum.com/public_html/forum/attachment.php on line 193
Quote:
Install :

Import The Product From Your Admincp
Open Read Me file In attachments For File Changes
Reply With Quote
  #41  
Old 03-30-2009, 08:52 PM
MARCO1's Avatar
MARCO1 MARCO1 is offline
 
Join Date: Jun 2008
Posts: 872
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What's happen if you install the hack without any changes ? did it work ?
Reply With Quote
Reply


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 03:36 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.08041 seconds
  • Memory Usage 2,363KB
  • Queries Executed 27 (?)
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
  • (2)bbcode_code
  • (8)bbcode_php
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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
  • (2)postbit_attachment
  • (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_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete