Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Private Message Attachments Details »»
Private Message Attachments
Version: 1.0.0b2, by Andreas Andreas is offline
Developer Last Online: Jan 2023 Show Printable Version Email this Page

Category: Private Messages Enhancements - Version: 4.2.0 Rating:
Released: 06-07-2012 Last Update: 06-09-2012 Installs: 70
DB Changes Uses Plugins Template Edits
Additional Files Is in Beta Stage  
No support by the author.

This Add-on allows you to use attachments in private messages.

Changelog
1.0.0 Beta 2
  • Added missing table prefix
  • Removed hardcoded contenttypeid
  • Improved performance

Download Now

File Type: zip pmattachments_1-0-0_Beta_1.zip (10.5 KB, 175 views)
File Type: zip pmattachments_1-0-0_Beta_2.zip (10.8 KB, 545 views)

Show Your Support

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

Comments
  #52  
Old 07-28-2012, 12:55 AM
hubba hubba is offline
 
Join Date: Dec 2003
Posts: 73
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

>Duplicate entry 'PMAttachments' for key 'class'

Same...
Reply With Quote
  #53  
Old 07-30-2012, 12:42 AM
WolfWiz WolfWiz is offline
 
Join Date: Mar 2007
Posts: 30
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No Joy on install, great product if it worked something that has been lacking in VB for a long time. Wish it was working .
Reply With Quote
  #54  
Old 08-13-2012, 06:51 AM
wii's Avatar
wii wii is offline
 
Join Date: Oct 2005
Posts: 169
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So, it doesn't work ?
Reply With Quote
  #55  
Old 09-06-2012, 12:58 PM
nevbear666 nevbear666 is offline
 
Join Date: Nov 2011
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yep, does not work, actual error:

Code:
Database error in vBulletin 4.2.0:

Invalid SQL:

	UPDATE pm AS pm
	SET attach = (SELECT COUNT(*) FROM attachment WHERE contentid = pm.pmid AND attachment.contenttypeid = );

MySQL Error   : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 2
Error Number  : 1064
Request Date  : Thursday, September 6th 2012 @ 09:48:49 AM
Error Date    : Thursday, September 6th 2012 @ 09:48:51 AM
Script        : http://#########/admincp/plugin.php?do=productimport
Referrer      : https://#########/admincp/plugin.php?do=productadd
IP Address    : ###.###.###.###
Username      : ########
Classname     : vB_Database
MySQL Version : 5.0.95-community
the problem is, that:

vB_Types::instance()->getContentTypeId('PMAttachments_PrivateMessage' )

returns an empty value.

for everyone with that duplicate errors, thats because database fields get added to existing tables before the script breaks.

need to remove a few:
from table "pm" remove "attach" and "attachmap"
from usergroup remove "advpmpermissions"
from packages remove the entry "PMAttachments"
from contenttype remove the entry "PrivateMessage"

the productinstaller of vbulletin is unable the remove database entries when theyre duplicate, even if you choose overwrite as an option, plus the script actually breaks before putting the entry into the products manager...

ps: bitte koenntest du die titel fuer die plugins ins englische umbenennen, fuer unsere uebersee freunde;-)
Reply With Quote
  #56  
Old 09-06-2012, 03:04 PM
nevbear666 nevbear666 is offline
 
Join Date: Nov 2011
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ps: even after fixing the obvious errors (VBForum_PrivateMessage instead of PMAttachment_PrivateMessage...), opening the newattachment.php link causes an error

Code:
#########, you do not have permission to access this page. This could be due to one of several reasons:

    Your user account may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
    If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.
looking at the link i see a major difference between a working and non working url for calling newattachment.php:

doesnt work:
Code:
https://############/newattachment.php?values[u]=81&contenttypeid=16&poststarttime=1346946787&posthash=345jkasdf345jklsdgdr945
does work:
Code:
https://###############/newattachment.php?values[f]=15&contenttypeid=1&poststarttime=1346947324&posthash=345kldg893u56ioijgtkgtje
just a first glimpse...
Reply With Quote
  #57  
Old 10-02-2012, 04:17 AM
tbworld tbworld is offline
 
Join Date: Oct 2008
Posts: 2,126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Andreas!

I have completed a similar hack for my company (in the core files, not a plugin). Your code examples helped me tremendously. Very, very grateful! Let me know if I can reciprocate.
Reply With Quote
  #58  
Old 10-04-2012, 05:53 PM
ehpoole's Avatar
ehpoole ehpoole is offline
 
Join Date: Feb 2012
Location: Anderson, SC
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Aside from the headaches of cleaning up our database tables from a previous failed Product XML Upload failure due to "Database Error" so as to return all the table entries and fields to a virgin state, I also ran into the following faults in the original XML file:
  1. Very Minor - Descriptions alternate between German and English in both the XML file and portions of the instructions files -- all the Plugin titles are in German for instance. I don't want to harp (or even really complain for that matter) on this one because language is inherently relative to the observer, but I figured I should probably mention it for consistency's sake.
  2. On Lines 160 and 261 of the XML file, the SQL Query does not properly reference tables that have a vBulletin TABLE_PREFIX attached to them... The initial FROM statement is correct, but the "as attachment" portion of the Query is missing, so the query fails a bit further in when the table.fieldid "attachment.contenttypeid" is called. This will only fail for sites that have defined a TABLE_PREFIX value, but should be corrected.
  3. The more troublesome one (for me) was on Line 160 (again) where "attachment.contenttypeid" is set:

    PHP Code:
    attachment.contenttypeid " . vB_Types::instance()->getContentTypeId('PMAttachments_PrivateMessage') . "
    It appears that the call to getContentTypeId is coming too early in the process, as the value returned is an empty string rather than the intended value. However, this same code works later on come line 261, so clearly it is an order-of-execution issue. This suggests that this query should be moved until after the "pmattachments" row has been added to the "packages" table so that the call does not fail.

    I temporarily worked around this issue by hard coding the next Auto Increment value to be assigned to the next record ID for the "packages" table so that I could at least get the Product installed ("13" in my case, after some earlier failed attempts and cleanups).
I apologize for having to submit these changes rather than a corrected XML Product File. I am comfortable enough to make minor tweaks to the XML files, but I am not comfortable enough with my knowledge of the XML file's layout to make wholesale changes so that I can change the order of execution of the "contenttype" table's record insertion. Especially not comfortable enough to submit something that others will run on their servers!



Despite my concerns, I do greatly appreciate your sharing this plugin with us as our users genuinely want the functionality without having to wait for vBulletin to get around to releasing such. I hope my suggested amendments will help both yourself and other users trying to install the product. The instructions user nevbear666 provided for backing out the database changes were most valuable to eventually getting the product installed (after making my above changes), they certainly saved me some time.
Reply With Quote
  #59  
Old 10-16-2012, 02:41 PM
heugabel heugabel is offline
 
Join Date: May 2006
Posts: 74
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

works good
Attached Files
File Type: xml product-pmattachments.xml (14.8 KB, 51 views)
Reply With Quote
  #60  
Old 10-18-2012, 11:53 AM
mat8861 mat8861 is offline
 
Join Date: Sep 2011
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by heugabel View Post
works good
on which vb version ?
Reply With Quote
  #61  
Old 11-09-2012, 09:44 PM
SpaceStar SpaceStar is offline
 
Join Date: Apr 2005
Posts: 121
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I too got an SQL error. Amazing some people put their unfinished and error-prone product to public use and then not willing to help. Bad product.
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 12:06 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.05761 seconds
  • Memory Usage 2,358KB
  • Queries Executed 26 (?)
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
  • (1)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (15)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (3)postbit_attachment
  • (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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete