vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Show Thread Enhancements - Members Can't Download Attachments Before Reply - Or X Usergroup (https://vborg.vbsupport.ru/showthread.php?t=233333)

to_die4 01-05-2011 02:51 PM

Works very well, thank you.

Da-Vinci 01-08-2011 02:36 PM

Seems to have stopped working in 4.1.0 PL2, any chance you could look at this please Marco1

Bob Albion 01-09-2011 05:18 PM

Same as above .. MARCO1 could please look at this as soon as you can its needed asap
And i know as Pearson of your infinite talent could get this going again in no time what so ever ;)

Regs
Bob

Da-Vinci 01-09-2011 05:31 PM

So I've been trying to get this fixed, so looked at your older version of this mod here.

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

And noticed this reply by you.

Quote:

Originally Posted by MARCO1 (Post 1729532)
NEW UPDATE


YES lasto !

in your attachment.php

search for

PHP Code:

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

and in ( post WHERE userid='" )
write your usergroup this will be have permission to see attachments without reply the thread

example :
PHP Code:

post WHERE userid='2,3,4,5,6" 


Rather than edit the attacment.php I noticed the hooks exist in the plugin code, so I tried to replicate it like this.

PHP Code:

global $db ,$vbulletin;
                
$p=$db->query_first("SELECT userid from post where threadid='$post[threadid]'  AND userid=22,24,25" $vbulletin->userinfo[userid] . "");
                
$m=$p[userid];
                if(
$vbulletin->userinfo[userid]!= $m AND can_moderate($forumid'canremoveposts') == false or $vbulletin->userinfo[userid] == 0)
                {
                               eval(
'$this->post[\'imageattachmentlinks\'] = $vbphrase[MARCO1_At];');
                               eval(
'$this->post[\'thumbnailattachments\'] = $vbphrase[MARCO1_At];');
                               eval(
'$this->post[\'imageattachments\'] = $vbphrase[MARCO1_At];');
                               eval(
'$this->post[\'otherattachments\'] = $vbphrase[MARCO1_At];');
                               eval(
'$this->post[\'moderatedattachments\'] = $vbphrase[MARCO1_At];');
                }
  } 

The 3 usergroups I want to allow to to download attachments without replying are 22, 24 & 25 and of course the 3 staff usergroups 5, 6 & 7, but I believe the staff usergroups are covered by this statement.

PHP Code:

                if($vbulletin->userinfo[userid]!= $m AND can_moderate($forumid'canremoveposts') == false or $vbulletin->userinfo[userid] == 0

Looking at the attachment.php I don't see the same hook info.

PHP Code:

        $attachmentinfo $db->query_first_slave("
            SELECT filedataid, SUBSTRING(" 
. ((!empty($vbulletin->GPC['thumb']) ? 'thumbnail' 'filedata')) . ", $startbyte + 1, $readsize) AS filedata
            FROM " 
TABLE_PREFIX "filedata
            WHERE filedataid = 
$attachmentinfo[filedataid]
        "
); 

Anyway, I still haven't been able to get this to work so any help or updates would be greatly appreciated.

smoggy07 01-09-2011 06:06 PM

as the members above have said, is there any chance on an update for 4.1.0 pl2 as i have just noticed this has stopped working?

thanks in advanced

smoggz

bd1 01-09-2011 06:49 PM

Many thanks for your hard work Marco is there any chance on an update for 4.1.0 pl2.Cos my forum needs it and is such a useful way to keep tabs on all that input stuff to my site.

Guru Samrat 10-09-2011 09:49 AM

not working with 4.0.3

Guru Samrat 10-24-2011 02:59 PM

not work in 4.0.3

ywwz 06-13-2012 02:27 PM

4.2.0???? anyone?

faisaly.com 07-18-2012 11:21 PM

This works on 4.2.0 fine but hides screenshots and attachment files... is there a way so it wont hide the screenshot attachments...

Members don't like to reply just to see screenshots first...


All times are GMT. The time now is 11:42 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.01227 seconds
  • Memory Usage 1,757KB
  • 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
  • (5)bbcode_php_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