|
إنضمامك إلي منتديات استراحات زايد يحقق لك معرفة كل ماهو جديد في عالم الانترنت ...
انضم الينا
#1
| ||
| ||
I currently have a forum that NO-ONE but the moderators can download threads from. I want to make it possible for the user to download files from that thread as well (eg: User creates thread and adds a file. Moderator modifies the file and posts the modified version back in the thread. Users who created the original thread can download the modified file, but no other user can.) This could also extend into a system where the buddies of the user can download files. Have currently hard-modified line 186 of attachment.php, but I would prefer something like the following be done as standard in the product... Lide 186+ before... Code: $viewpermission = ($vbulletin->GPC['thumb'] ? 'canseethumbnails' : 'cangetattachment'); if (!($forumperms & $vbulletin->bf_ugp_forumpermissions['canview']) OR !($forumperms & $vbulletin->bf_ugp_forumpermissions['canviewthreads']) OR !($forumperms & $vbulletin->bf_ugp_forumpermissions[$viewpermission]) OR (!($forumperms & $vbulletin->bf_ugp_forumpermissions['canviewothers']) AND ($attachmentinfo['postuserid'] != $vbulletin->userinfo['userid'] OR $vbulletin->userinfo['userid'] == 0))) Line 186+ after... Code: $viewpermission = ($vbulletin->GPC['thumb'] ? 'canseethumbnails' : 'cangetattachment'); $hook_viewpermission = !($forumperms & $vbulletin->bf_ugp_forumpermissions['canview']) OR !($forumperms & $vbulletin->bf_ugp_forumpermissions['canviewthreads']) OR !($forumperms & $vbulletin->bf_ugp_forumpermissions[$viewpermission]) OR (!($forumperms & $vbulletin->bf_ugp_forumpermissions['canviewothers']) AND ($attachmentinfo['postuserid'] != $vbulletin->userinfo['userid'] OR $vbulletin->userinfo['userid'] == 0)); ($hook = vBulletinHook::fetch_hook('attachment_viewpermissi on')) ? eval($hook) : false; if ($hook_viewpermission) I could then use the hook to change the re-calculate the value if I desired. Note: This would be incredibly useful in MANY other places as well, particularly where the code has the "standard_error" function that effectively ends the operation. __DEFINE_LIKE_SHARE__ |
مواقع النشر (المفضلة) |
| |
![]() | ||||
الموضوع | كاتب الموضوع | المنتدى | مشاركات | آخر مشاركة |
Warning: Spammers are Gettings Smarter | محروم.كوم | منتدى أخبار المواقع والمنتديات العربية والأجنبية | 0 | 04-17-2010 07:50 PM |
Forum New hooks list? | محروم.كوم | منتدى أخبار المواقع والمنتديات العربية والأجنبية | 0 | 01-04-2010 07:30 AM |
Forum Hooks in VB4 | محروم.كوم | منتدى أخبار المواقع والمنتديات العربية والأجنبية | 0 | 12-25-2009 10:30 AM |
Not Smarter than the User Infraction Group Software | محروم.كوم | منتدى أخبار المواقع والمنتديات العربية والأجنبية | 0 | 05-22-2009 01:01 AM |
Bots Getting Smarter? Re: BorisExpress | محروم.كوم | منتدى أخبار المواقع والمنتديات العربية والأجنبية | 0 | 04-23-2009 08:20 AM |