Quote:
Originally Posted by Da-Vinci
Edit: Can a Mod or Admin move this to VB4 Programming Discussion please, posted in VB3 Programming Discussion by mistake.
|
Basically I had this hack installed.
https://vborg.vbsupport.ru/showthrea...=233333&page=3 but the coder wants $80 to make a public release and $600 for exclusive rights to an updated release.
I don't care if I can achieve this via a manual template edit, but this has become an integral feature of my forum.
This is as far as I've got so far, any help would be greatly appreciated.
Quote:
Originally Posted by Da-Vinci
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
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.
|
Quote:
Originally Posted by Da-Vinci
Edit: Can a Mod or Admin move this to VB4 Programming Discussion please, posted in VB3 Programming Discussion by mistake.
|