Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases

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
  #82  
Old 01-26-2004, 05:57 AM
gmarik's Avatar
gmarik gmarik is offline
 
Join Date: May 2002
Location: Mocsow
Posts: 1,288
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I like to like it
Reply With Quote
  #83  
Old 01-28-2004, 08:30 PM
Giveit2u43 Giveit2u43 is offline
 
Join Date: Jun 2003
Location: Liverpool
Posts: 145
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I had a similiar problem with everything seeming to work fine but the attachments not actually showing in the pm's.. I finally tracked it down to the fact the forum had been upgraded from vb2, and we`d had the private attachments hack installed and so there was already a "private" table in attachments, I`d overlooked this on installation, but on removing that table and creating a new one fixed the problem with attachments not showing...

Might not work for others, but it worked for us and it gives people another option to try when attempting to get this great addon working... (haveto agree with Erwin too, this should be standard in gold! definetly get's my vote)
Reply With Quote
  #84  
Old 01-28-2004, 09:19 PM
Natch's Avatar
Natch Natch is offline
 
Join Date: Nov 2002
Location: Australia
Posts: 851
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great job!

Thanks for this excellent tool ...

/me installs *
Reply With Quote
  #85  
Old 02-02-2004, 09:29 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Found another boo-boo with this. If you add an attachment to a pm and then preview the pm, the attachment has detatched itself. Then, without saving the message, view your attachments and you will see the attachment in the listing.
Reply With Quote
  #86  
Old 02-04-2004, 08:02 PM
catocom2 catocom2 is offline
 
Join Date: Aug 2002
Location: Gainesville, Georgia
Posts: 85
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I installed this, and everything looks fine so far, except it keeps
telling me I don't have permission to do an attachment.

I'm not clear as to what is meant here...
Quote:
################################################## #################
# New phrases to add
################################################## #################

Add a new phrase and make sure it is in the posting group, otherwise it won't work

phrase: in_private_message
Text: Private Message
Do I do this in a PM?
Reply With Quote
  #87  
Old 02-04-2004, 08:17 PM
catocom2 catocom2 is offline
 
Join Date: Aug 2002
Location: Gainesville, Georgia
Posts: 85
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

oh, and I'm running RC3
I couldn't fine this bit of code in the "pm_newpm"
Quote:
-------------------------------------------------------------------
search for this:
-------------------------------------------------------------------

<input type="hidden" name="receipt" value="0" />

------------------------------------------------------------------
change it to:
-------------------------------------------------------------------

<input type="hidden" name="receipt" value="0" />
<input type="hidden" name="posthash" value="$posthash" />
I also have the hack so that the reciept box is a checkbox instead of a popup.
Reply With Quote
  #88  
Old 02-04-2004, 08:37 PM
catocom2 catocom2 is offline
 
Join Date: Aug 2002
Location: Gainesville, Georgia
Posts: 85
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK with the checkbox mod the line look like this in the "pm_newpm"

in stead of ...
PHP Code:
[QUOTE]-------------------------------------------------------------------
search for this:
-------------------------------------------------------------------

<
input type="hidden" name="receipt" value="0" />

------------------------------------------------------------------
change it to:
-------------------------------------------------------------------

<
input type="hidden" name="receipt" value="0" />
<
input type="hidden" name="posthash" value="$posthash/>
[/
QUOTE
look for....
PHP Code:
<input type="checkbox" name="receipt" id="cb_receipt" value="1" checked />
Request Read Receipt
and change to...
PHP Code:
<input type="checkbox" name="receipt" id="cb_receipt" value="1" checked />
Request Read Receipt?
<
input type="hidden" name="posthash" value="$posthash/> 
right?
Reply With Quote
  #89  
Old 02-05-2004, 01:39 AM
Kentaurus's Avatar
Kentaurus Kentaurus is offline
 
Join Date: Dec 2001
Posts: 332
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by catocom2
OK with the checkbox mod the line look like this in the "pm_newpm"

in stead of ...

look for....
PHP Code:
<input type="checkbox" name="receipt" id="cb_receipt" value="1" checked />
Request Read Receipt
and change to...
PHP Code:
<input type="checkbox" name="receipt" id="cb_receipt" value="1" checked />
Request Read Receipt?
<
input type="hidden" name="posthash" value="$posthash/> 
right?
Yes, that's right. In fact you can add that bit of code anywhere inside the form tag... it doesn't have to be near the receipt or anything. I just added it there to group it with all the other hidden fields.
Reply With Quote
  #90  
Old 02-05-2004, 01:40 AM
Kentaurus's Avatar
Kentaurus Kentaurus is offline
 
Join Date: Dec 2001
Posts: 332
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by catocom2
I installed this, and everything looks fine so far, except it keeps
telling me I don't have permission to do an attachment.

I'm not clear as to what is meant here...


Do I do this in a PM?
The new phrases are added in the admin control panel, that is, you go to the phrase manager and click on the "add new phrase" button
Reply With Quote
  #91  
Old 02-05-2004, 02:07 AM
Kentaurus's Avatar
Kentaurus Kentaurus is offline
 
Join Date: Dec 2001
Posts: 332
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Boofo
Found another boo-boo with this. If you add an attachment to a pm and then preview the pm, the attachment has detatched itself. Then, without saving the message, view your attachments and you will see the attachment in the listing.
A couple of changes to fix this. Thanks for spotting this, Boofo.

In private.php search for this
Code:
	$poststarttime = TIMENOW;
change it to
Code:
 if ($_POST['poststarttime'])
{
$poststarttime = $_POST['poststarttime'];
}
else
{
	$poststarttime = TIMENOW; 
}
In the template pm_newpm, search for this
Code:
<input type="hidden" name="posthash" value="$posthash" />
change it to
Code:
<input type="hidden" name="posthash" value="$posthash" />
<input type="hidden" name="poststarttime" value="$poststarttime" />
TXT updated also
Reply With Quote
Reply

Thread Tools

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 01:46 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.05049 seconds
  • Memory Usage 2,329KB
  • 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
  • (4)bbcode_code
  • (5)bbcode_php
  • (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