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

Reply
 
Thread Tools
Private Attachments! (Attachments in Private Messages) Details »»
Private Attachments! (Attachments in Private Messages)
Version: 1.00, by Admin (Coder) Admin is offline
Developer Last Online: Nov 2024 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 03-01-2002 Last Update: Never Installs: 54
 
No support by the author.

*drums*
This hack is now out of beta! Safe to use.

My latest and one of the more extensive hacks -- Private Attachments!
This huge (I ain't kidding, it's pretty big) hack will allow your members to send private messages with attachments in them, so they don't need to use e-mail for that.

Since this hack requires a large number of edits, this is how I recommend installing it:
(a) Run the queries.
(b) Edit all the files, offline.
(c) When you are done with (b) upload all the files at once.
(d) Perform the template edits.
If you do all actions in this order your users shouldn't notice you are installing the hack.

All feature requests (except for limiting this for usergroups -- if you want that do it yourself it's not hard but I'm tired of adding permissions to the dreaded usergroup.php) are welcome before this goes out of beta.

As always, have fun.

Show Your Support

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

Comments
  #82  
Old 12-11-2002, 03:06 PM
glenmax glenmax is offline
 
Join Date: Aug 2002
Location: Great White North
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well,

I did some checking and looking. I also tried to find the location that Rolodex mentionned here:

Quote:
You can probably do that yourself ... a simple "if ($usergroup=6 || $usergroup=7){ condition before all functions that does the attachment procedure ... when help is not given when you request it, somemight help you if you attempt to do it for yourself. You might get a quick response for trying yourself!
Now I admit, I am new to this and I am learning. But, a little direction could go a long way for me to this working for mods and admins only.

Please give a hand if anyone can.....

Cheers,
GM
Reply With Quote
  #83  
Old 12-22-2002, 09:09 PM
Warcaptain Warcaptain is offline
 
Join Date: Jul 2002
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i cant view it.
the code is all over the place

anyway you can post a more friendly version?
Reply With Quote
  #84  
Old 01-16-2003, 11:41 PM
VAN's Avatar
VAN VAN is offline
 
Join Date: Oct 2001
Posts: 97
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just upgraded to 2.2.9 on my test board, and this works flawlessly with one tiny exception...

I still cannot get paperclip.gif to appear next to the message title.

Quote:
$attach = '<img src="{ imagesfolder}/paperclip.gif" border="0" align="absmiddle">';
} else {
$attach = '';
Anyone else run into this....and fix it?
Reply With Quote
  #85  
Old 01-29-2003, 10:39 AM
MetroSports82's Avatar
MetroSports82 MetroSports82 is offline
 
Join Date: Nov 2002
Location: NJ
Posts: 89
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Mike11212
I need help
I installed the hack fine with out any problems
but when someone clicks the attachments in the PM
they get the following error
Parse error: parse error in /home/mike1121/public_html/board/attachment.php on line 100

here are lines 89 to 102 in my attachments.php file
Code:
if ($extension=='gif') {
  header('Content-type: image/gif');
} elseif ($extension=='jpg' or $extension=='jpeg') {
  header('Content-type: image/jpeg');
} elseif ($extension=='png') {
  header('Content-type: image/png');
} elseif ($extension=='pdf') {
  header('Content-type: application/pdf');
} else {
  header('Content-type: unknown/unknown');
}
echo $attachmentinfo[filedata];

?>
Mike, I was having the same exact problem, but when I double checked to see that I had all the code work right, I really didn't. I was missing a '}' at the end of one of the lines. I think this is the same problem that you might be encountering. try doing this, with the modifications that you already have.

open- attachment.php


REPLACE
PHP Code:
updateuserforum($getforuminfo['forumid']); 
WITH
PHP Code:
if ($privateok==0) {
    
updateuserforum($getforuminfo['forumid']);

BE SURE TO INCLUDE THE } at the end of that line. that should do the trick, let me know how it goes. working great with 2.2.9.
Reply With Quote
  #86  
Old 01-30-2003, 01:43 AM
Nerpin Nerpin is offline
 
Join Date: Apr 2002
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I installed it and as far as I can tell I did everything properly...but when the person who recieves the pm tries to open it...it says it cannot find the attachment specified...any ideas why?
Reply With Quote
  #87  
Old 02-13-2003, 02:24 AM
Jugglor Jugglor is offline
 
Join Date: Feb 2003
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

When the member on the receiving end deletes the PM, is the attachment deleted from the database?
Reply With Quote
  #88  
Old 03-03-2003, 11:00 PM
Slynderdale Slynderdale is offline
 
Join Date: Mar 2002
Location: New York State
Posts: 576
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice hack but theres a small problem, If some one deletes the private message that has an attachment, it does not delete the attachment itself, I made a fix for this, Ill post a text below with the fix.
Reply With Quote
  #89  
Old 03-03-2003, 11:02 PM
Slynderdale Slynderdale is offline
 
Join Date: Mar 2002
Location: New York State
Posts: 576
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

With the fix, It only deletes the attachment when the last private message that contains the attachment is deleted, so it doesnt accidentaly delete the attachment on the sender or receiver when one deletes the private message and the other doesnt.

Enjoy
Reply With Quote
  #90  
Old 03-21-2003, 05:27 PM
clown2003 clown2003 is offline
 
Join Date: Feb 2003
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi, very neat hack but can any 1 help me, I want only selected members to be able to send attachments.....
Reply With Quote
  #91  
Old 03-22-2003, 03:21 AM
Steve123 Steve123 is offline
 
Join Date: Sep 2002
Posts: 105
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey,

Ive installed this hack and gone over it twice..

For some reason it wont work..

When i send an attachment in a pm and read it.. it dosent show the attachment.. it shows nothing..

Ive check the mysql tables and it dosent seem to be adding anything to the attachment and privatemessage sql tables..

using vb 2.2.6.. any ideas??

/Steve
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 04:43 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.04900 seconds
  • Memory Usage 2,314KB
  • Queries Executed 27 (?)
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
  • (1)bbcode_code
  • (2)bbcode_php
  • (3)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_postinfo_query
  • fetch_postinfo
  • 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