Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
[VB3 RC3] Attachments in private messages Details »»
[VB3 RC3] 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.0.0 Rating:
Released: 01-06-2004 Last Update: Never Installs: 134
 
No support by the author.

Unsupported. VB3.5 version is here:
https://vborg.vbsupport.ru/showthread.php?t=91220

Tested on 3.0.3


This hack enables you to send attachments in a private message. This feature was really useful to me in vb2 and I kind of missed it on vb3 so I rehacked it myself.

When a user writes a private message they will be given the option to add an attachment, the same as when writing a post. It uses the same rules you have defined for a convencional attachment including file types, quotas, etc. It is only an extension for attachments to be used in private messages.

As always it is advised to backup your files before hacking in case you want to go back, this is some big hack including modification of multiple files, some templates and adding two extra columns in the database tables.

Instructions are provided in the txt, and some screenshots on where the attachment option appears.

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.

Edit by MarcoH64:
Because of multiple requests to make this hack work on vB3.0.7 i created upgrade instructions. These upgrade instructions can be followed after the original instructions (the 3.0.3 version). The original coder can not be held responsible for my modification.

Show Your Support

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

Comments
  #72  
Old 01-22-2004, 05:43 AM
thuffner's Avatar
thuffner thuffner is offline
 
Join Date: Mar 2003
Posts: 203
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just installed again and it didn't work.

It attaches to a PM fine. I send it to myself, open the PM, and no attachment is in the PM...
Reply With Quote
  #73  
Old 01-23-2004, 10:15 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

kentaurus, are you still supporting this hack?
Reply With Quote
  #74  
Old 01-23-2004, 02:18 PM
Kentaurus's Avatar
Kentaurus Kentaurus is offline
 
Join Date: Dec 2001
Posts: 332
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Boofo
kentaurus, are you still supporting this hack?
not at the same pace, but yes, I am If a really big bad bug appears I would of course give priority to it, for small modifications I usually delay a little more. I even tested this with RC3 yesterday and checked if the instructions were still ok.

About that double attachment in the attachment screen I am still thinking if I should fix that. The attachments in private message are somehow more controversial than the common attachments...

Right now I can duplicate the attachment for the attachment owner and all the members for which the attachment is sent.. that takes a lot of space in little time because a single attachment can be stored twice, or three times, or more. If I don't do that ownership of the attachment is difficult to determine.

If the owner of the attachment is the one that sent the attachment then I can go to attachments -> delete this attachment and the person that received it keeps nothing. I don't think this is natural, right now if someone sends me something by mail there is no way they can delete it after being sent.

If the owner of the attachment is the recipient then I have to do that store-attachments-more-than-once, and that's not nice for the db or the filesystem. I can't store it only once because a pm can be sent to multiple recipients, and then any recipient would be able to delete it leaving the rest with no attachment. This is even worse than the owner deleting it.

And now, why does the attachment appears twice in the attachment screen? That is because it appears once for each of your pm with that attachments, and if you send the pm to yourself and also you keep a copy then you have 2 pm's. Then that screen will link once to the pm you recieved from yourself and once to the pm that is in the sent folder.. even if it's the same attachment. That is why I haven't fixed it yet.. I am still debating if I should. Sending a pm to yourself is not that natural anyway, unless I were using the pm as a personal notepad or something.
Reply With Quote
  #75  
Old 01-23-2004, 02:21 PM
Kentaurus's Avatar
Kentaurus Kentaurus is offline
 
Join Date: Dec 2001
Posts: 332
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by thuffner
Just installed again and it didn't work.

It attaches to a PM fine. I send it to myself, open the PM, and no attachment is in the PM...
There was also someone having that problem before. Do you have any other hack installed that deals with functions_posting.php or private.php?

Also, did you made all the code modifications in private.php? That's usually the problem.
Reply With Quote
  #76  
Old 01-23-2004, 08:09 PM
sonic3d's Avatar
sonic3d sonic3d is offline
 
Join Date: Jan 2002
Location: Chicago
Posts: 301
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nice job
Reply With Quote
  #77  
Old 01-23-2004, 11:16 PM
thuffner's Avatar
thuffner thuffner is offline
 
Join Date: Mar 2003
Posts: 203
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kentaurus
There was also someone having that problem before. Do you have any other hack installed that deals with functions_posting.php or private.php?

Also, did you made all the code modifications in private.php? That's usually the problem.
Nope no other hacks installed. And did the private.php mods. I switched over to thumbnail attached images in my ACP and it works fine now. A workaround, but I'll take it.
Reply With Quote
  #78  
Old 01-24-2004, 03:07 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kentaurus
not at the same pace, but yes, I am If a really big bad bug appears I would of course give priority to it, for small modifications I usually delay a little more. I even tested this with RC3 yesterday and checked if the instructions were still ok.

About that double attachment in the attachment screen I am still thinking if I should fix that. The attachments in private message are somehow more controversial than the common attachments...

Right now I can duplicate the attachment for the attachment owner and all the members for which the attachment is sent.. that takes a lot of space in little time because a single attachment can be stored twice, or three times, or more. If I don't do that ownership of the attachment is difficult to determine.

If the owner of the attachment is the one that sent the attachment then I can go to attachments -> delete this attachment and the person that received it keeps nothing. I don't think this is natural, right now if someone sends me something by mail there is no way they can delete it after being sent.

If the owner of the attachment is the recipient then I have to do that store-attachments-more-than-once, and that's not nice for the db or the filesystem. I can't store it only once because a pm can be sent to multiple recipients, and then any recipient would be able to delete it leaving the rest with no attachment. This is even worse than the owner deleting it.

And now, why does the attachment appears twice in the attachment screen? That is because it appears once for each of your pm with that attachments, and if you send the pm to yourself and also you keep a copy then you have 2 pm's. Then that screen will link once to the pm you recieved from yourself and once to the pm that is in the sent folder.. even if it's the same attachment. That is why I haven't fixed it yet.. I am still debating if I should. Sending a pm to yourself is not that natural anyway, unless I were using the pm as a personal notepad or something.
That makes more sense now. I usually don't send pms with attachmnets to myself, so that is not any problem having it show up twice. It was just a test message that I have already erased anyway.

What about the Show Thumbnails not working with pm attachments? Can that be fixed?
Reply With Quote
  #79  
Old 01-25-2004, 02:46 AM
Kentaurus's Avatar
Kentaurus Kentaurus is offline
 
Join Date: Dec 2001
Posts: 332
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Boofo
What about the Show Thumbnails not working with pm attachments? Can that be fixed?
Of course, of course :nervous:

In profile.php search for this:

Code:
$show['thumbnail'] = iif($post['hasthumbnail'] == 1 AND $vboptions['attachthumbs'] AND $showthumbs AND $post['postid'], 1, 0);
replace it with:

Code:
$show['thumbnail'] = iif($post['hasthumbnail'] == 1 AND $vboptions['attachthumbs'] AND $showthumbs AND ($post['postid'] OR $post['private']), 1, 0);
Reply With Quote
  #80  
Old 01-25-2004, 03:04 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you, sir. Will you be updating the file in the first post with this?
Reply With Quote
  #81  
Old 01-25-2004, 03:35 AM
Kentaurus's Avatar
Kentaurus Kentaurus is offline
 
Join Date: Dec 2001
Posts: 332
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Boofo
Thank you, sir. Will you be updating the file in the first post with this?
Already updated.
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:16 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.11608 seconds
  • Memory Usage 2,320KB
  • Queries Executed 25 (?)
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_code
  • (6)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
  • (1)pagenav_pagelinkrel
  • (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