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
  #232  
Old 10-01-2004, 03:04 AM
RobinHood RobinHood is offline
 
Join Date: Sep 2002
Location: Philly
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by btappan
anybody fix this yet? can i make it delete them after they are a week old or something?
I already tried that. The attachment would still be deleted even though the PM still exists. The attachment would be deleted within a few hours.
Reply With Quote
  #233  
Old 10-01-2004, 04:14 PM
btappan's Avatar
btappan btappan is offline
 
Join Date: May 2004
Posts: 104
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

believe me, the attachments are being deleted even when the pm is still there. I have informed my users to not delete any messages to test what is happening. no one has deleted their messages, and the attachments are still dissappearing.
Reply With Quote
  #234  
Old 10-01-2004, 04:42 PM
btappan's Avatar
btappan btappan is offline
 
Join Date: May 2004
Posts: 104
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have determined from my testing that the attachments are being deleted shortly after they have been viewed, not when the user deletes the PM. Also, if I send another user a PM attachment and then look at what i sent them in my sent items folder before the recipient has even looked at it, it is usually deleted before they view it unless they look at it quick enough b4 it gets cleaned out by thr cron file. so wether the sender or the recipient views the attachment once it has been sent, it will be deleted shortly thereafter. back to my original question: can i temporarily fix this by reverting my cleanup file? i don't really care if the attachments aren't being deleted in the mean time until someone comes up with a fix for this. let me know
Reply With Quote
  #235  
Old 10-05-2004, 02:23 AM
Kentaurus's Avatar
Kentaurus Kentaurus is offline
 
Join Date: Dec 2001
Posts: 332
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm really really sorry about not upgrading this hack, I have it upgraded in my forum and there are a couple modifications that have to be made to make it compatible with 3.0.3. theArchitect sent me a pm today and I headed here to upgrade my hack as fast as I could

I originally designed this hack for RC3 and upgraded it until gold, but I haven't had time lately to upgrade my hacks (or to document them). Anyway, I'll attach in the first post the upgraded txt for the 3.0.3 vbulletin.

About the cron job. Hourly all the orphan attachments (that is the attachments that were uploaded but the post was never commited) are deleted. When my hack is not installed then an attachment in the pm counts as a not commited attachment (that are the replacements in the cleanup2.php file). That is new behaviour in 3.0.3, in earlier versions they checked the posthash instead of the postid.

That would mean that if you upgraded to 3.0.3 and didn't upgrade the hack you might've lost your private attachments. You'd need to edit the files (or at least the cleanup2.php, then upgrade to 3.0.3 for your attachments to be safe.
Reply With Quote
  #236  
Old 10-05-2004, 11:31 PM
theArchitect's Avatar
theArchitect theArchitect is offline
 
Join Date: Sep 2004
Location: Sydney
Posts: 417
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Kentaurus
I'm really really sorry about not upgrading this hack, I have it upgraded in my forum and there are a couple modifications that have to be made to make it compatible with 3.0.3. theArchitect sent me a pm today and I headed here to upgrade my hack as fast as I could
Many thanks, you assistance is most appreciated.

However I am having a problem with the install. I have rechecked my work but am getting the following error message when I try and upload an attachment:

Invalid Post specified. If you followed a valid link, please notify the webmaster

I also recieved a DB error report:

Code:
Database error in vBulletin 3.0.3:
 
 Invalid SQL: 
 
 		DELETE FROM attachment
 
 		WHERE postid = 0 AND private = 0 AND
 
 		dateline < 1097016998
 mysql error: Unknown column 'private' in 'where clause'
 
 mysql error number: 1054
Do you have any thoughts as to what stage of the hack install I have done incorrectly?
Reply With Quote
  #237  
Old 10-06-2004, 03:57 AM
RobinHood RobinHood is offline
 
Join Date: Sep 2002
Location: Philly
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by theArchitect
Many thanks, you assistance is most appreciated.

However I am having a problem with the install. I have rechecked my work but am getting the following error message when I try and upload an attachment:

Invalid Post specified. If you followed a valid link, please notify the webmaster

I also recieved a DB error report:

Code:
Database error in vBulletin 3.0.3:
 
 Invalid SQL: 
 
 		DELETE FROM attachment
 
 		WHERE postid = 0 AND private = 0 AND
 
 		dateline < 1097016998
 mysql error: Unknown column 'private' in 'where clause'
 
 mysql error number: 1054
Do you have any thoughts as to what stage of the hack install I have done incorrectly?
Make sure you have "private" column in the attachment table.
Reply With Quote
  #238  
Old 10-06-2004, 06:46 AM
theArchitect's Avatar
theArchitect theArchitect is offline
 
Join Date: Sep 2004
Location: Sydney
Posts: 417
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by RobinHood
Make sure you have "private" column in the attachment table.
Bizarre. I re-checked this on one of my test forums and ended up with the error that the row had already been added (when I tried it I got rows affected 0).

So I ran the entire install process on a different board and everything seems to be working fine. I guess I will just have to put it down to another vB X File.

But thankyou for your help.
Reply With Quote
  #239  
Old 10-06-2004, 02:11 PM
btappan's Avatar
btappan btappan is offline
 
Join Date: May 2004
Posts: 104
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Kentaurus
About the cron job. Hourly all the orphan attachments (that is the attachments that were uploaded but the post was never commited) are deleted. When my hack is not installed then an attachment in the pm counts as a not commited attachment (that are the replacements in the cleanup2.php file). That is new behaviour in 3.0.3, in earlier versions they checked the posthash instead of the postid.
So if I reinstall the entire hack with your new release it will cure my current problem of pm attachments being deleted hourly once they have been viewed? also, how different is your release compared to the other? Am I going to have a problem running the commands since I already have the last version installed?
Reply With Quote
  #240  
Old 10-10-2004, 12:23 AM
Kentaurus's Avatar
Kentaurus Kentaurus is offline
 
Join Date: Dec 2001
Posts: 332
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, it should cure that problem. However for that you need only to modify the cleanup2.php file in your includes/cron directory (with the instructions in the hack)

Only attachment.php and cleanup2.php have heavy modifications, you might want to check only those if it is already installed and working.
Reply With Quote
  #241  
Old 10-22-2004, 07:21 AM
Debbi Debbi is offline
 
Join Date: Aug 2004
Location: KY
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I would LOVE to have this mod for 3.0.3. Any chance of this in the near future?
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 10:15 AM.


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.05320 seconds
  • Memory Usage 2,321KB
  • 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
  • (5)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