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
  #192  
Old 06-29-2004, 12:35 AM
SnowBot's Avatar
SnowBot SnowBot is offline
 
Join Date: Jul 2003
Location: Manchester UK
Posts: 631
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Any updates in getting this to show and work in Erwins quick reply pm hack? I know it was mensioned but i have read the thread and couldnt find anything. I know Boofo has it on his site so please

Thanks
Reply With Quote
  #193  
Old 07-03-2004, 12:53 PM
luroca luroca is offline
 
Join Date: Jul 2002
Posts: 142
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

With the changes in 3.0.2 this hack needs changes too
Reply With Quote
  #194  
Old 07-03-2004, 01:16 PM
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 SnowBot
Any updates in getting this to show and work in Erwins quick reply pm hack? I know it was mensioned but i have read the thread and couldnt find anything. I know Boofo has it on his site so please

Thanks
Check the thread for Erwin's hack. It is in there.
Reply With Quote
  #195  
Old 07-03-2004, 11:09 PM
sketch42's Avatar
sketch42 sketch42 is offline
 
Join Date: May 2004
Location: Brooklyn, NY
Posts: 361
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Boofo... have you gotten this hack to work with 3.0.1??
Reply With Quote
  #196  
Old 07-04-2004, 12:33 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 sketch42
Boofo... have you gotten this hack to work with 3.0.1??
I don't run 3.0.1. I still run RC3. Sorry.
Reply With Quote
  #197  
Old 07-04-2004, 01:04 AM
sketch42's Avatar
sketch42 sketch42 is offline
 
Join Date: May 2004
Location: Brooklyn, NY
Posts: 361
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Boofo
I don't run 3.0.1. I still run RC3. Sorry.
can someone update this for 3.0.1??
Reply With Quote
  #198  
Old 07-09-2004, 02:43 AM
Ganon Ganon is offline
 
Join Date: May 2002
Posts: 34
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The hack worked fine for me on 3.0.0, but I've recently upgraded to 3.0.3, and it is incompatable. Some of the file edits no longer work (searching for the code brings no result), and my best guesses to fix it don't work. I can attach files to PM's, but it brings up an error message when the user tries to view those files.
Reply With Quote
  #199  
Old 07-09-2004, 09:57 AM
luroca luroca is offline
 
Join Date: Jul 2002
Posts: 142
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, this very useful hack is not compatible with 3.0.3
Reply With Quote
  #200  
Old 07-14-2004, 03:06 PM
PKRWUD's Avatar
PKRWUD PKRWUD is offline
 
Join Date: Jan 2003
Location: Ventura, California
Posts: 124
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am using 3.0.0, and am getting the following error when I try to view the attachment (both in the PM and in my CP)...

Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in /home/pkrwud/public_html/vbulletin/attachment.php on line 79

Any thoughts?
Reply With Quote
  #201  
Old 07-15-2004, 10:48 AM
TTG's Avatar
TTG TTG is offline
 
Join Date: May 2004
Location: Sth London
Posts: 1,042
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Was hoping to get this working in 3.0.1 :ermm:

Got stuck with this :-

# Code modifications in file "attachment.php"
search for this code:

Code:
if (!$attachmentinfo = $DB_site->query_first("
	SELECT filename, filesize, postid, attachment.userid,
		" . iif(!$vboptions['attachfile'] AND !$thumb, 'filedata,') . "
		" . iif($thumb, 'thumbnail, thumbnail_dateline AS dateline,', 'dateline,') . "
		visible, mimetype, NOT ISNULL(deletionlog.primaryid) AS isdeleted
	FROM " . TABLE_PREFIX . "attachment AS attachment
	LEFT JOIN " . TABLE_PREFIX . "attachmenttype AS attachmenttype ON(attachmenttype.extension = SUBSTRING_INDEX(attachment.filename, '.', -1))
	LEFT JOIN " . TABLE_PREFIX . "deletionlog AS deletionlog ON(attachment.postid = deletionlog.primaryid AND type = 'post')
	WHERE attachmentid = $attachmentid
"))
Here's the nearest I could find in attachment.php

Code:
if (!$attachmentinfo = $DB_site->query_first("
	SELECT filename, attachment.postid, attachment.userid, attachmentid,
		" . iif($thumb, 'thumbnail AS filedata, thumbnail_dateline AS dateline, thumbnail_filesize AS filesize,', 'attachment.dateline, filedata, filesize,') . "
		attachment.visible, mimetype, NOT ISNULL(deletionlog.primaryid) AS isdeleted,
		thread.forumid, forum.password, thread.threadid
	FROM " . TABLE_PREFIX . "attachment AS attachment
	LEFT JOIN " . TABLE_PREFIX . "attachmenttype AS attachmenttype ON(attachmenttype.extension = SUBSTRING_INDEX(attachment.filename, '.', -1))
	LEFT JOIN " . TABLE_PREFIX . "deletionlog AS deletionlog ON(attachment.postid = deletionlog.primaryid AND type = 'post')
	LEFT JOIN " . TABLE_PREFIX . "post AS post ON (post.postid = attachment.postid)
	LEFT JOIN " . TABLE_PREFIX . "thread AS thread ON (post.threadid = thread.threadid)
	LEFT JOIN " . TABLE_PREFIX . "forum AS forum ON (forum.forumid = thread.forumid)
	" . iif($postid, "WHERE attachment.postid = $postid", "WHERE attachmentid = $attachmentid") . "
"))
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:50 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.09029 seconds
  • Memory Usage 2,310KB
  • 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
  • (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
  • (2)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