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

Reply
 
Thread Tools
PM Attachments 3.5 Details »»
PM Attachments 3.5
Version: 1.00, by BluPhoenix BluPhoenix is offline
Developer Last Online: Jan 2006 Show Printable Version Email this Page

Version: 3.5.0 RC2 Rating:
Released: 09-01-2005 Last Update: Never Installs: 118
DB Changes Uses Plugins Template Edits
 
No support by the author.

Original Hack by Rigel Kentaurus (http://www.cemzoo.com)
Original Thread: https://vborg.vbsupport.ru/showthread.php?t=91220
See the original thread for details of the problems..

Basically everything has been fixed so this works with existing installs and not just clean ones, also no error message about a non-matching release anymore.. attachments are now correctly displayed as they would be in a thread and this hack No longer inteferes with non-pm attachments.. So all the good bits left (Attachments in Private Messages, using the existing usergroup permissions) and all the bad bits taken out.

Also I'm willing to support this hack, which is why I took the decision to start a new thread rather than use the existing one so I can easier support the hack and problems with this plugin not the old buggy one. (or at least that's the theory)

Please uninstall the old plugin first, thanks.

QuickFaq
I'm getting Invalid Post specified:
That means the plugin was unable to get attachments permissions for the user. The solution is to locate a thread in your forum (one that shouldn't be deleted in a long time, it doesn't matter if it's closed). Remember it's threadid
Go to Plugin Manager and click on "private attachments - get posthash and allow attachments"

Find: $_pmt = 1;


Replace the "1" with the threadid

Supporters / CoAuthors

Show Your Support

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

Comments
  #72  
Old 10-27-2005, 11:32 PM
FleaBag's Avatar
FleaBag FleaBag is offline
 
Join Date: Dec 2001
Posts: 1,674
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Any idea if this is working with 3.5.0 Gold?
Reply With Quote
  #73  
Old 10-27-2005, 11:48 PM
.Tim's Avatar
.Tim .Tim is offline
 
Join Date: Jan 2005
Location: Oklahoma City
Posts: 353
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works for me:

https://vborg.vbsupport.ru/showpost....4&postcount=37
Reply With Quote
  #74  
Old 10-28-2005, 12:58 AM
cbr929rrerion cbr929rrerion is offline
 
Join Date: Oct 2005
Posts: 275
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Almost did not get it to work but I did.. Great tool !

Anyway to make the image show up in the private message rather than being a link..

?
Reply With Quote
  #75  
Old 10-28-2005, 12:21 PM
davidw's Avatar
davidw davidw is offline
 
Join Date: Jul 2005
Location: Arkansas
Posts: 2,815
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've not been able to get it to work yet. I've set it up 3 times already and I'm just going to wait until its "official" before I reattempt it.
Reply With Quote
  #76  
Old 10-28-2005, 05:18 PM
General_ General_ is offline
 
Join Date: Mar 2005
Location: Germany
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It work's fine. Great Work!

Here is the German Translation for German Users... I postet it here, because of Kentaurus rules... :nervous:
Reply With Quote
  #77  
Old 10-28-2005, 08:07 PM
redlabour's Avatar
redlabour redlabour is offline
 
Join Date: Mar 2004
Location: Wuppertal, NRW, Germany
Posts: 1,541
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by General_
It work's fine. Great Work!

Here is the German Translation for German Users... I postet it here, because of Kentaurus rules... :nervous:

Perfect Thanks @General_ and BluPhoenix !

But i get this at online.php if a User is attaching a File !
Reply With Quote
  #78  
Old 10-29-2005, 07:48 AM
Kuimera Kuimera is offline
 
Join Date: Aug 2005
Posts: 86
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I get this when i click "Manage Attachments"

Code:
Invalid Post specified. If you followed a valid link, please notify the administrator
This the code i have, I cant find the $_pmt = 1;

Code:
$extraattachmentinfo = $db->query_first("
	SELECT userid,itemid,usedin
	FROM " . TABLE_PREFIX . "attachment AS attachment
	WHERE attachmentid = " . $vbulletin->GPC['attachmentid'] . ""
	);

if ($extraattachmentinfo['usedin'] == 'pmtextid')
{
	$pmUsers = $db->query_first("SELECT toUserArray FROM ".TABLE_PREFIX."pmtext WHERE pmtextid='".$extraattachmentinfo['itemid']."'");
	$toUserArray = unserialize($pmUsers['toUserArray']);         

	if ($toUserArray[$vbulletin->userinfo['userid']] != $vbulletin->userinfo['username'] && $extraattachmentinfo['userid'] != $vbulletin->userinfo['userid'])
	{
		print_no_permission();
	}

	// bad thing to do, modify the main array with an int so the & operations will be true, any suggestions to improve this? (no file mods allowed!!)
	$vbulletin->userinfo['permissions'] = $vbulletin->bf_ugp_forumpermissions['canview'] + $vbulletin->bf_ugp_forumpermissions['canviewthreads'] + $vbulletin->bf_ugp_forumpermissions['cangetattachment'] + $vbulletin->bf_ugp_forumpermissions['canviewothers'];

	$imodcache = array();
        $imodcache[0] = array("".$vbulletin->userinfo['userid']."" => 1, 'permissions' => $vbulletin->bf_misc_moderatorpermissions["canmoderateposts"]);
 
       }
Reply With Quote
  #79  
Old 10-29-2005, 10:01 AM
VBUsers's Avatar
VBUsers VBUsers is offline
 
Join Date: Aug 2004
Posts: 830
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok i fixed my issue but now i try to load a regular small image and it takes too long. it doesnt load it can you please tell me why? i followed the steps thanks
Reply With Quote
  #80  
Old 10-30-2005, 06:07 PM
Kuimera Kuimera is offline
 
Join Date: Aug 2005
Posts: 86
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

*bump*
Reply With Quote
  #81  
Old 10-30-2005, 06:44 PM
VBUsers's Avatar
VBUsers VBUsers is offline
 
Join Date: Aug 2004
Posts: 830
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Kuimera
I get this when i click "Manage Attachments"

Code:
Invalid Post specified. If you followed a valid link, please notify the administrator
This the code i have, I cant find the $_pmt = 1;

Code:
$extraattachmentinfo = $db->query_first("
	SELECT userid,itemid,usedin
	FROM " . TABLE_PREFIX . "attachment AS attachment
	WHERE attachmentid = " . $vbulletin->GPC['attachmentid'] . ""
	);

if ($extraattachmentinfo['usedin'] == 'pmtextid')
{
	$pmUsers = $db->query_first("SELECT toUserArray FROM ".TABLE_PREFIX."pmtext WHERE pmtextid='".$extraattachmentinfo['itemid']."'");
	$toUserArray = unserialize($pmUsers['toUserArray']);         

	if ($toUserArray[$vbulletin->userinfo['userid']] != $vbulletin->userinfo['username'] && $extraattachmentinfo['userid'] != $vbulletin->userinfo['userid'])
	{
		print_no_permission();
	}

	// bad thing to do, modify the main array with an int so the & operations will be true, any suggestions to improve this? (no file mods allowed!!)
	$vbulletin->userinfo['permissions'] = $vbulletin->bf_ugp_forumpermissions['canview'] + $vbulletin->bf_ugp_forumpermissions['canviewthreads'] + $vbulletin->bf_ugp_forumpermissions['cangetattachment'] + $vbulletin->bf_ugp_forumpermissions['canviewothers'];

	$imodcache = array();
        $imodcache[0] = array("".$vbulletin->userinfo['userid']."" => 1, 'permissions' => $vbulletin->bf_misc_moderatorpermissions["canmoderateposts"]);
 
       }
the code your looking for is at the top of the template you need to look in
about 5 or 6th line i think
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 06:20 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.04641 seconds
  • Memory Usage 2,314KB
  • Queries Executed 26 (?)
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
  • (4)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)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
  • (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_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete