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
Attachments in private messages Details »»
Attachments in private messages
Version: 1.00, by Kentaurus Kentaurus is offline
Developer Last Online: Jul 2014 Show Printable Version Email this Page

Version: 3.5.0 Beta 3 Rating:
Released: 06-27-2005 Last Update: 07-16-2005 Installs: 45
DB Changes Uses Plugins Template Edits
Is in Beta Stage  
No support by the author.

Last tested in 3.5.0 beta 4
Beta hack

With this hack you can send attachments inside private messages.
Sometimes you may want to send an image or file to another user, but
you just don't want to disclose your email or make the file public,
with this hack you can attach it to the private message.

Info for hackers:
You may modify, improve, upgrade, redistribute this hack, include it
in another hack or yours or translate it provided you do it free of
charge and you distribute it in www.vbulletin.org at least, there is no
need to pm me asking for permission
Some portions of the code are (c) Jelsoft Enterprises Ltd.

==

I didn't think this could be done by plugins alone, but it was, although some sections were really tricky.

Please read the faq in the post below. Also please reply if you tested it and it worked for you much appreciated

v1.0.0
first release

v1.0.1
Fixed an elusive bug that deleted all your non-pm attachments.
Now in "valid file extensions" everything is correctly shown
Added vbulletin version check so you can't install the plugin in an unsupported version

Show Your Support

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

Comments
  #2  
Old 06-28-2005, 01:57 AM
Kentaurus's Avatar
Kentaurus Kentaurus is offline
 
Join Date: Dec 2001
Posts: 332
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

FAQ

I'm getting a:
Invalid Post specified. If you followed a valid link, please notify the administrator

That means the plugin was unable to get attachments permissions for the user. To solve it:

  1. 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
  2. Go to Plugin Manager and click on "private attachments - get posthash and allow attachments"
  3. Find:
$_pmt = 1;


Replace the "1" with whatever thread id you selected in step 1, for example:
$_pmt = 560;
Reply With Quote
  #3  
Old 06-28-2005, 02:37 AM
.Tim's Avatar
.Tim .Tim is offline
 
Join Date: Jan 2005
Location: Oklahoma City
Posts: 353
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works just fine in IE but in Firefox the 'manage attachments' button does nothing when clicked. And after testing it out in IE the attachment doesn't show up, guess I should re-do the hack.
Reply With Quote
  #4  
Old 06-28-2005, 03:48 AM
Kentaurus's Avatar
Kentaurus Kentaurus is offline
 
Join Date: Dec 2001
Posts: 332
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by .Tim
Works just fine in IE but in Firefox the 'manage attachments' button does nothing when clicked. And after testing it out in IE the attachment doesn't show up, guess I should re-do the hack.
I'm using firefox myself, I never had a problem with the manage attachments button, it's the same template as the one in the new reply so if it works there....
The attachments should show up provided the hook for that is active, check in the plugins manager that the 4 hooks for the private attachments are currently active.

I forgot to say... I tested it in a blank, unmodified vb3.5 beta 3 installation
Reply With Quote
  #5  
Old 06-28-2005, 04:03 AM
.Tim's Avatar
.Tim .Tim is offline
 
Join Date: Jan 2005
Location: Oklahoma City
Posts: 353
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The manage attachments button doesn't work at all in firefox.
Reply With Quote
  #6  
Old 06-28-2005, 05:07 AM
eXtremeTim eXtremeTim is offline
 
Join Date: Jun 2002
Location: eXtremewebtech.com
Posts: 1,201
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I will install in the morning.
Reply With Quote
  #7  
Old 06-28-2005, 06:27 AM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey Kent, could you please reupload your attachments as one zip per file as per our new rule Thanks

Btw, great modification, was surprised when I saw this in plugins and not code mods
Reply With Quote
  #8  
Old 06-28-2005, 08:50 AM
Johannes de Le?n Johannes de Le?n is offline
 
Join Date: Dec 2004
Location: Gallaecia, Las Espa?as
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Kentaurus
I'm using firefox myself, I never had a problem with the manage attachments button, it's the same template as the one in the new reply so if it works there....
The attachments should show up provided the hook for that is active, check in the plugins manager that the 4 hooks for the private attachments are currently active.

I forgot to say... I tested it in a blank, unmodified vb3.5 beta 3 installation
It works ok with FireFox here. Though, above the manage attachments button, the valid extensions are not shown; and the attachments fieldset is not shown either when a PM is received.

I've even tried to change the plugin's id in the database, but nothing changed.

Still, it does attach the file.
Reply With Quote
  #9  
Old 06-28-2005, 11:56 AM
Jagged Tooth Jagged Tooth is offline
 
Join Date: Apr 2005
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Kentaurus you got me through that problem, but now some more problems.

When I do try to add a Attachment I get this

Warning: Invalid argument supplied for foreach() in \newattachment.php on line 545

the rest of the page comes out fine.

Then when I try to actually upload a file, I get this

Warning: Invalid argument supplied for foreach() in \newattachment.php on line 545

Any Ideas guys? Also I have the same problem as Johannes de León in that the list of valid extensions does not show in either in the new PM page or new Thread page.

--Jagged Tooth--
Reply With Quote
  #10  
Old 06-28-2005, 12:11 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice Hack.

One suggestion:
I think you can get rid of the Cron Script by using Hook cron_script_cleanup.
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 02:33 PM.


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.04583 seconds
  • Memory Usage 2,297KB
  • Queries Executed 23 (?)
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_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
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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