PDA

View Full Version : Private Messages Enhancements - Private Message Attachments


Andreas
06-07-2012, 10:00 PM
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

ibrahimkoky
06-08-2012, 06:35 AM
thanks :)
tagged for later

Schoelle
06-08-2012, 07:19 AM
Please all vote for this JIRA entry:

Cant use attachements in private messages
http://tracker.vbulletin.com/browse/VBIV-5750

As i appreciate your efforts Andreas, this should be a core function and not an addon!

Hornstar
06-08-2012, 08:44 AM
So many people have requested this. Andreas you are awesome!

-.- You must 'Like' someone else's post before liking any more by Andreas.

Robru
06-08-2012, 08:59 AM
Finally! Andreas, you're a hero! :)

Taurus1
06-08-2012, 12:17 PM
OH MAN! This is the best news ever! Thank you so much!!

Andreas
06-08-2012, 01:33 PM
Please all vote for this JIRA entry:

Cant use attachements in private messages
http://tracker.vbulletin.com/browse/VBIV-5750

It should indeed be a core feature and in fact I coded this already over one year ago but didn't release it as PM attachments were planned to be available "in a future version".

But as this hasn't happend so far I just released it those those who tnat to have that feature don't have to wait further.

puertoblack2003
06-08-2012, 02:11 PM
It should indeed be a core feature and in fact I coded this already over one year ago but didn't release it as PM attachments were planned to be available "in a future version".

But as this hasn't happend so far I just released it those those who tnat to have that feature don't have to wait further.

thank you sir this is needed in deed... :up:

qpurser
06-08-2012, 02:15 PM
Installed and works great.
THX so much

Mark.B
06-08-2012, 02:18 PM
Andreas what a total star you are, as always. Will test and install later.

Lionel
06-08-2012, 03:03 PM
hi,

When I try to open a pm I get this


Warning: unserialize() expects parameter 1 to be string, array given in [path]/packages/pmattachments/postbit/pm.php on line 39


Warning: unserialize() expects parameter 1 to be string, array given in [path]/packages/pmattachments/postbit/pm.php on line 39

Gemma
06-08-2012, 04:03 PM
As others have said, this should be part of the core product. Thanks for releasing :)

KatieG
06-08-2012, 05:01 PM
Warning: unserialize() expects parameter 1 to be string, array given in [path]/packages/pmattachments/postbit/pm.php on line 39

Shadow
06-08-2012, 08:20 PM
Very nice mod.
Tagged for later use!

hiker
06-09-2012, 05:14 AM
Bummer, I was hoping this would work with 4.1.12

blue6995
06-09-2012, 05:51 AM
Ummm, when I try and send PM with an attachment I get the following error message:

Database error in vBulletin 4.2.0:

Invalid SQL:

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

MySQL Error : Unknown column 'pm.pmid' in 'where clause'
Error Number : 1054
Request Date : Saturday, June 9th 2012 @ 01:48:56 AM
Error Date : Saturday, June 9th 2012 @ 01:48:56 AM
Script : http://rwf-forum.co.uk/vBulletin/private.php?do=insertpm&pmid=70117
Referrer : http://rwf-forum.co.uk/vBulletin/private.php?do=insertpm&pmid=70117
IP Address : xx.xx.xx.xx
Username :
Classname : vB_Database
MySQL Version : 5.1.63-cll

ceho
06-09-2012, 02:12 PM
When I try to send inline attachments I get this error message:

Database error in vBulletin 4.2.0:

Invalid SQL:

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

MySQL Error : Unknown column 'pm.pmid' in 'where clause'
Error Number : 1054
Request Date : Saturday, June 9th 2012 @ 05:05:26 PM
Error Date : Saturday, June 9th 2012 @ 05:05:26 PM
Script : http://www.cureconnections.com/testforum2/private.php?do=insertpm&pmid=
Referrer : http://www.cureconnections.com/testforum2/private.php?do=newpm
IP Address : XXX.XXX.XX.XXX
Username : ceho
Classname : vB_Database_MySQLi
MySQL Version : 5.0.77Received pm's can be opened without issues, however there is no attachment preview and if you click on the attachment an error message appears saying an invalid file has been specified.

Just thought you should know :).

Andreas
06-09-2012, 02:19 PM
Just a friendly note:
As stated in the Add-on Information, this work is unsupported - all support requets will therefore be ignored.

Thank you very much for your unterstanding.

ceho
06-09-2012, 02:23 PM
That's why I don't ask for help but let you know what happens. In case you might need it :).

Taurus1
06-10-2012, 02:22 AM
Getting this when trying to upgrade to beta 2:

Fatal error: Using $this when not in object context in /home/thebull/public_html/forums/includes/adminfunctions_plugin.php(1174) : eval()'d code on line 3

Taurus1
06-10-2012, 02:34 AM
I uninstalled it completely, and then when trying to install beta 1 again, I get this:

Database error in vBulletin 4.2.0:

Invalid SQL:

INSERT INTO vbpackage
(productid, class)
VALUES
('pmattachments', 'PMAttachments');

MySQL Error : Duplicate entry 'PMAttachments' for key 'class'
Error Number : 1062
Request Date : Sunday, June 10th 2012 @ 05:31:57 AM
Error Date : Sunday, June 10th 2012 @ 05:31:58 AM
Script :
Referrer :
IP Address : ++++++++++
Username : ++++++++
Classname : vB_Database
MySQL Version : 5.1.63-cll

I know you said that there will be no support, but I am really stuck now. Thanks.

Robru
06-10-2012, 03:03 AM
Thanks for your update ;)

kevius
06-10-2012, 05:30 AM
i'm waiting about the final version because i NEED this hack !! thanks a lot !

junaid
06-10-2012, 06:06 AM
I get same issue

Database error in vBulletin 4.2.0:

Invalid SQL:

INSERT INTO vbpackage
(productid, class)
VALUES
('pmattachments', 'PMAttachments');

MySQL Error : Duplicate entry 'PMAttachments' for key 'class'
Error Number : 1062
Request Date : Sunday, June 10th 2012 @ 05:31:57 AM
Error Date : Sunday, June 10th 2012 @ 05:31:58 AM
Script :
Referrer :
IP Address : ++++++++++
Username : ++++++++
Classname : vB_Database
MySQL Version : 5.5.24-cll

Andreas
06-10-2012, 08:25 AM
I uninstalled it completely, and then when trying to install beta 1 again, I get this:

That was a bad idea, your database is now in an inconsistent state.
-> Reload the backup you made before uninstalling Beta 1.

Taurus1
06-10-2012, 09:09 AM
Sorry. You mean I must completely take my entire forum to the backup?

I don't understand though. I followed your instructions on how to uninstall. Why must I now go back to a backup?

Andreas
06-10-2012, 10:31 AM
Sorry. You mean I must completely take my entire forum to the backup?
That would be the easiest way to get the DB to a consistent state again, yes.
Another option would be to manually fix the DB (by removing the package, contenttype and all PM attachments before installing Beta 2).


I don't understand though. I followed your instructions on how to uninstall. Why must I now go back to a backup?
As stated in the Add-on information this is unsupported Beta Software, it does contain bugs - like the one in the installation code you discovered :)
Bugs that are being discovered will be fixed, but I do expect beta testers to deal with issues caused by bugs themselves.

junaid
06-10-2012, 11:22 AM
to fix which database table have delete ?

Taurus1
06-10-2012, 12:38 PM
Yeah well, making a product available to the public which can completely ruin their complete forum is not very professional. And not even having the decency to offer help when begged for help! (I even offered to pay!)

Shadow
06-10-2012, 01:38 PM
Yeah well, making a product available to the public which can completely ruin their complete forum is not very professional. And not even having the decency to offer help when begged for help! (I even offered to pay!)

He has a point and so do you. Beta software shouldn't be installed on a live site unless you think it's definitely flawless. And even so, backups are essential. It was most likely put out here for others to help find bugs and such, thus improving the product as a whole.

I recommend next time, when you try beta software, run it on a test site first.

And also, the developer has stated quite a few times that this product isn't supported and he will ignore support requests.

Taurus1
06-10-2012, 01:44 PM
I ran it on my test site first. No problems. How was I to know that following his instructions on uninstalling would cause this?

Andreas
06-10-2012, 03:11 PM
I ran it on my test site first. No problems.

Did you test that uninstalling Beta 1 (and afterwards installing Beta 2) on a test installation works without problems?

Anyway, manually fixing the DB is quite a bit complicated - you can look at the installation/uninstallation code (which has been updated to fix the bugs you came across) to get an idea what needs to be done.

kevius
06-12-2012, 07:50 AM
Any idear about the final version date ?

Altari
06-12-2012, 09:45 AM
Not working for me, errors during the installation :
Database error in vBulletin 4.2.0:

Invalid SQL:

UPDATE vb_pm AS pm
SET attach = (SELECT COUNT(*) FROM vb_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

Moroever, after a lot of try, i can see
[Tue Jun 12 12:29:32 2012] [warn] [client XXX] mod_fcgid: stderr: PHP Warning: Invalid argument supplied for foreach() in /var/www/packages/navmanenhancements/admin.php on line 43, referer: http://website/admincp/plugin.php?do=productadd

in my apache error log. Don't know what your other addon is doing here...


Thank you Andreas for this mod, would be great.

Andreas
06-14-2012, 04:34 AM
Any idear about the final version date ?
It's ready when it's ready, eg. when there are no more bugs being reported.

@Altari
Thanks for this bug report, it will be fixed in Beta 3.

betterthanyours
06-16-2012, 02:11 PM
Another one

Database error in vBulletin 4.1.12:

Invalid SQL:

INSERT INTO package
(productid, class)
VALUES
('pmattachments', 'PMAttachments');

MySQL Error : Duplicate entry 'PMAttachments' for key 'class'
Error Number : 1062
Request Date : Saturday, June 16th 2012 @ 11:10:43 AM
Error Date : Saturday, June 16th 2012 @ 11:10:43 AM
Script : http://www.unrealkillers.com/admincp/plugin.php?do=productimport
Referrer : http://www.unrealkillers.com/admincp/plugin.php?do=productadd
IP Address : 86.19.247.18
Username : $carface
Classname : vB_Database
MySQL Version : 5.5.24-cll

Syxguns
06-25-2012, 06:18 AM
I am awaiting this mod! I've got it tagged. Thanks for this Andreas :D

qpurser
06-25-2012, 10:50 AM
Andreas,
just wanted to give you some feedback regarding your once again excellent mod.

Running vb 4.2.0 on a test server
Upgraded from your Beta1 to Beta2. (for those reading this I did NOT uninstall Beta1 and then installed Beta2 but did a regular update)

I didn't get any error messages at all
Sending and receiving the attachments worked just fine

On a side note I am using also DBTech "vb optimize" which moves the attachments from the database to a folder as files.
Your plugin works fine with or without this add-on.

horusbird
06-30-2012, 06:19 PM
error in installation:

Database error in vBulletin 4.2.0:

Invalid SQL:

INSERT INTO package
(productid, class)
VALUES
('pmattachments', 'PMAttachments');

MySQL Error : Duplicate entry 'PMAttachments' for key 'class'
Error Number : 1062
Request Date : Saturday, June 30th 2012 @ 09:18:19 PM
Error Date : Saturday, June 30th 2012 @ 09:18:19 PM
Script : http://www.vesparesources.com/admincp/plugin.php?do=productimport
Referrer : http://www.vesparesources.com/admincp/plugin.php?do=productadd
IP Address : 79.13.184.169
Username : horusbird
Classname : vB_Database
MySQL Version : 5.1.33-community

betterthanyours
07-03-2012, 07:07 PM
Another one

Database error in vBulletin 4.1.12:

Invalid SQL:

INSERT INTO package
(productid, class)
VALUES
('pmattachments', 'PMAttachments');

MySQL Error : Duplicate entry 'PMAttachments' for key 'class'
Error Number : 1062
Request Date : Saturday, June 16th 2012 @ 11:10:43 AM
Error Date : Saturday, June 16th 2012 @ 11:10:43 AM
Script : http://www.unrealkillers.com/admincp/plugin.php?do=productimport
Referrer : http://www.unrealkillers.com/admincp/plugin.php?do=productadd
IP Address : 86.19.247.18
Username : $carface
Classname : vB_Database
MySQL Version : 5.5.24-cll

error in installation:

Database error in vBulletin 4.2.0:

Invalid SQL:

INSERT INTO package
(productid, class)
VALUES
('pmattachments', 'PMAttachments');

MySQL Error : Duplicate entry 'PMAttachments' for key 'class'
Error Number : 1062
Request Date : Saturday, June 30th 2012 @ 09:18:19 PM
Error Date : Saturday, June 30th 2012 @ 09:18:19 PM
Script : http://www.vesparesources.com/admincp/plugin.php?do=productimport
Referrer : http://www.vesparesources.com/admincp/plugin.php?do=productadd
IP Address : 79.13.184.169
Username : horusbird
Classname : vB_Database
MySQL Version : 5.1.33-community

Any news on this error?

Marios858
07-04-2012, 09:14 PM
Hello , this is looks very good mod , can i ask , is the attachments storage in the selected path in server or database as others or only in database ?

orangefive
07-13-2012, 06:10 PM
How can this be on the mod of the month list? Surely it should be on most anticipated working mod of the month list???

persianpros
07-14-2012, 04:06 AM
is it safe to install it on vb 4.2.0 suite ?

orangefive
07-14-2012, 07:34 AM
I installed on 4.2 but get db errors and it does not work, I would wait.

orangefive
07-14-2012, 07:49 AM
My error on addiing xml:

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 : Saturday, July 14th 2012 @ 02:47:58 AM
Error Date : Saturday, July 14th 2012 @ 02:48:00 AM
Script : http://www.thewoollybacks.co.uk/testsite/woollyadmincp/plugin.php?do=productimport
Referrer : http://www.thewoollybacks.co.uk/testsite/woollyadmincp/plugin.php?do=productadd

Lee Roberts
07-16-2012, 10:03 PM
error in installation:

Database error in vBulletin 4.2.0:

Invalid SQL:

INSERT INTO package
(productid, class)
VALUES
('pmattachments', 'PMAttachments');

MySQL Error : Duplicate entry 'PMAttachments' for key 'class'
Error Number : 1062
Request Date : Saturday, June 30th 2012 @ 09:18:19 PM
Error Date : Saturday, June 30th 2012 @ 09:18:19 PM
Script : http://www.vesparesources.com/admincp/plugin.php?do=productimport
Referrer : http://www.vesparesources.com/admincp/plugin.php?do=productadd
IP Address : 79.13.184.169
Username : horusbird
Classname : vB_Database
MySQL Version : 5.1.33-community

Same here.

thunderclap82
07-17-2012, 02:09 PM
Database error on installation for me as well. Running 4.2 PL1.

djbaxter
07-22-2012, 02:01 AM
I uninstalled it completely, and then when trying to install beta 1 again, I get this:

Database error in vBulletin 4.2.0:

Invalid SQL:

INSERT INTO vbpackage
(productid, class)
VALUES
('pmattachments', 'PMAttachments');

MySQL Error : Duplicate entry 'PMAttachments' for key 'class'
Error Number : 1062
Request Date : Sunday, June 10th 2012 @ 05:31:57 AM
Error Date : Sunday, June 10th 2012 @ 05:31:58 AM
Script :
Referrer :
IP Address : ++++++++++
Username : ++++++++
Classname : vB_Database
MySQL Version : 5.1.63-cll

I know you said that there will be no support, but I am really stuck now. Thanks.

Yep. Got exactly the same error and the installation would not complete.

Akyeame Kwame
07-22-2012, 06:51 AM
Are both beta 1 AND beta 2 only for 4.2? Is anyone running either of these on 4.1.X?

Footman
07-27-2012, 04:22 PM
Tagged for final version. Much anticipated.

Hopefully this will also allow attachments in the calendar editor as well. Seems like it's the same editor box. Or it may need a separate mod.

Thanks

hubba
07-28-2012, 12:55 AM
>Duplicate entry 'PMAttachments' for key 'class'

Same...

WolfWiz
07-30-2012, 12:42 AM
No Joy on install, great product if it worked something that has been lacking in VB for a long time. Wish it was working .

wii
08-13-2012, 06:51 AM
So, it doesn't work ?

nevbear666
09-06-2012, 12:58 PM
yep, does not work, actual error:


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;-)

nevbear666
09-06-2012, 03:04 PM
ps: even after fixing the obvious errors (VBForum_PrivateMessage instead of PMAttachment_PrivateMessage...), opening the newattachment.php link causes an error



#########, 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:

https://############/newattachment.php?values[u]=81&contenttypeid=16&poststarttime=1346946787&posthash=345jkasdf345jklsdgdr945


does work:

https://###############/newattachment.php?values[f]=15&contenttypeid=1&poststarttime=1346947324&posthash=345kldg893u56ioijgtkgtje


just a first glimpse...

tbworld
10-02-2012, 04:17 AM
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.

ehpoole
10-04-2012, 05:53 PM
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:


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.
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.
The more troublesome one (for me) was on Line 160 (again) where "attachment.contenttypeid" is set:

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.

heugabel
10-16-2012, 02:41 PM
works good :D

mat8861
10-18-2012, 11:53 AM
works good :D
on which vb version ?

SpaceStar
11-09-2012, 09:44 PM
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.

rgreene1971
12-11-2012, 02:58 AM
damn it, this worked perfectly on my test server and now not working on my main site. Does anybody know the database entries I can remove by hand to remove this mod?

rgreene1971
12-11-2012, 03:18 AM
works good :D

Not working on VB 4.2

jakubsnm21
12-13-2012, 01:06 AM
Mod doesn't work!!!

Yay! now my database is inconsistent...

BasilFawlty
12-13-2012, 02:24 AM
Please all vote for this JIRA entry:

Cant use attachements in private messages
http://tracker.vbulletin.com/browse/VBIV-5750

As i appreciate your efforts Andreas, this should be a core function and not an addon!

Ding ding ding! I agree! Already lots of complains from my members about this lack of seemingly obviously functionality that is missing.

boss22
12-13-2012, 01:19 PM
Have someone tips how to remove this product? Gives database error when try to remove.

regards

bosss

Eric
12-13-2012, 11:33 PM
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.
Just noticed this post, but in the mod information:


Not Supported
Is in Beta Stage


Perhaps check this next time? :)

metalguy639
12-14-2012, 02:34 AM
Just noticed this post, but in the mod information:



Perhaps check this next time? :)

Not relevant IMO. The mod is listed as a mod for 4.2 yet it does NOT work in 4.2 for ANYONE. It should be pulled as it works for no one at all using vb 4.2. How can a mod be listed for 4.2 and NOT work for it? Whether its supported or not it should at least work for someone.

Quote from OP promising a beta 3 version, this was in June 2012 so many months ago. I'm guessing this has been abandoned now.

It's ready when it's ready, eg. when there are no more bugs being reported.

@Altari
Thanks for this bug report, it will be fixed in Beta 3.

I have a database error as well:

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 : Friday, December 14th 2012 @ 03:27:40 AM
Error Date : Friday, December 14th 2012 @ 03:27:41 AM
Script : http://www.xxxxxxxxx.com/forum/admincp/plugin.php?do=productimport
Referrer : http://www.xxxxxxxxx.com/forum/admincp/plugin.php?do=productadd
IP Address : xxxxx
Username : DamienDarwick
Classname : vB_Database
MySQL Version : 5.0.77

rgreene1971
12-14-2012, 02:37 AM
Great, now I receive a database error any time I try to make any changes to the usergroups even if it has nothing to do with pm attachments.

Does anybody know what needs to be removed from the database to get rid of this mod?

metalguy639
12-19-2012, 11:16 PM
SIGH.....When I try to uninstall I get this now...

Database error in vBulletin 4.2.0:

Invalid SQL:

SELECT a.attachmentid, fd.userid, fd.filedataid, a.userid AS auserid, a.contenttypeid
FROM attachment AS a
LEFT JOIN filedata AS fd ON (a.filedataid = fd.filedataid)
WHERE 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 4
Error Number : 1064
Request Date : Wednesday, December 19th 2012 @ 11:43:27 PM
Error Date : Wednesday, December 19th 2012 @ 11:43:27 PM
Script : forum/admincp/plugin.php?do=productkill
Referrer : forum/admincp/plugin.php?do=productdelete&productid=pmattachments&s=
IP Address : xxxxx
Username : DamienDarwick
Classname : vB_Database
MySQL Version : 5.0.77

For those of you who have experienced problems sending or getting PM'S after installing this buggy hack the best thing I can suggest is to disable the hack in your products. I cannot uninstall the product to save my life I get the above error. I looked at the database tables and the fields that need to be taken out are not there so I can only assume that it was taken out in one of the uninstalls that I tried.

kh99
12-19-2012, 11:59 PM
For people having problems uninstalling this mod:

1) If you can't get to the admincp, edit includes/config.php and insert this line, at the top just under the <?php line:
define('DISABLE_HOOKS', true);


2) Go to Manage Products and uninstall this product. If it won't uninstall because you get an error, edit your includes/config.php, find the $config['Misc']['debug'] line and change it to true (or if you can't find it, insert the line below):
$config['Misc']['debug'] = true;

Now go to the Manage Products and select "Edit" next to this product, and press "go". Find the section labeled "Existing Install/Uninstall Code" and check the delete box next to each code box, on the right. Then press save and try uninstalling the product again.

3) If you want to clean up the database, the columns added by this mod are 'attach' and 'attachmap' in the pm table, and 'advpmpermissions' in the usergroup table. There is also a row added in the package table with productid='pmattachments' and a row in the contenttype table with class='PrivateMessage'. I don't believe any of this will actually cause problems if you don't remove it (and in fact some of it may have been removed by the uninstall before the error), so if you don't know how, don't worry about it. Edit: But don't try to install this mod again unless you do clean things up.

4) Remove the DISABLE_HOOKS line if you added it in step 1, and change $config['Misc']['debug'] = false;

secondeye
04-24-2013, 06:30 PM
in vb421 it installed correctly but when i go to send new message and click attachment. the attachment dialog box didn't open correctly.

really want an upgrade version

secondeye
04-25-2013, 05:36 AM
To uninstall


First Install pmattachments_1-0-0_Beta_1.zip and Replace the Beta 2 version.

After that Disable plugin hook system

and then remove it from ACP..

Done...

Worked for me :D

y2ksw
05-02-2013, 07:38 AM
May I take over this project in order to maintain/update it as needed?

WolfWiz
05-02-2013, 07:57 AM
Sweet there are so many people that would love that!

tareqbd
05-02-2013, 04:30 PM
May I take over this project in order to maintain/update it as needed?
Please do the needful to fix the error.

tbworld
05-02-2013, 07:57 PM
After getting 'Andreas' explicit permission to take over his code -- there is plenty of work before it can be useable.

I implemented private messaging on the site I oversee. Andreas's code pointed me to the right direction to begin my project, especially since I was new to Vbulletin source and methods back then.
Unfortunately, my team modifies vbulletin source directly and the hooks were not present in the vbulletin source then to make a workable mod.

In Andreas's code, the basis for the project is there, but there are many areas of the project that are incomplete as noted by the BETA status.
If someone decides to write a similar mod from the ground floor up and donate it to the community, then you are welcome to contact me for some pointers and pitfalls that I ran into. Have fun! :)

-- General shout-out to Andres: We miss you around here bud! :)

WolfWiz
05-03-2013, 04:00 AM
Well I am willing to Beta for you and help where I can, this is a much needed mod that vB should have addressed a long time before this release. I hope this comes to fruition, instead of chasing copious releases and always leaving something out.

But enough of the negative, thanks for stepping up on this mod.

y2ksw
05-03-2013, 07:28 AM
I would like to get the official permission to take over this project, rather than reinventing the wheel. So let's wait a little to give Andreas a chance to reply :)

Cyberblade
05-16-2013, 10:55 AM
works good :D

Worked for me

kapii
05-29-2013, 09:08 AM
The new mod by DragonByte offers attachments in PM's, but that option is in the pro version, https://vborg.vbsupport.ru/showthread.php?t=298444

LLent
05-29-2013, 11:20 AM
[DBTech] vBSuper PM's - Private Message Manager v1 (vB4)

This is available now folks and is supported click on link in above post

Taurus1
05-29-2013, 12:15 PM
I would highly recommend you guys to get the dbtech mod. It has so much more than just attachments. And it will not screw up your board. And the support you get from those guys are absolutely phenomenal!

madness85
05-31-2013, 06:35 PM
ye i got error very sad great addon

ozzy47
05-31-2013, 08:39 PM
ye i got error very sad great addon

On this mod or the DBT one?

highlander_RD
07-09-2013, 02:56 PM
Run on vb 4.2.1

got error on installing at code:
<installcode><![CDATA[require_once(DIR . '/includes/class_bootstrap_framework.php');
vB_Bootstrap_Framework::init();
$db->query_write("
UPDATE " . TABLE_PREFIX . "pm AS pm
SET attach = (SELECT COUNT(*) FROM " . TABLE_PREFIX . "attachment WHERE contentid = pm.pmid AND attachment.contenttypeid = " . vB_Types::instance()->getContentTypeId('PMAttachments_PrivateMessage' ) . ")
");]]></installcode>

the script gets NULL for the second WHERE clause:
attachment.contenttypeid = " . vB_Types::instance()->getContentTypeId('PMAttachments_PrivateMessage')

Fields
07-30-2014, 07:05 PM
I get a database error under vB 4.2.2:

Datenbankfehler in vBulletin 4.2.2:

Invalid SQL:

INSERT INTO package
(productid, class)
VALUES
('pmattachments', 'PMAttachments');

MySQL-Fehler : Duplicate entry 'PMAttachments' for key 'class'
Fehler-Nr. : 1062
Fehler-Zeit : Wednesday, 30.07.2014 @ 22:03:24
Datum : Wednesday, 30.07.2014 @ 22:03:25
Skript : http://tactical-riot-gaming.de/admincp/plugin.php?do=productimport
Referrer : http://tactical-riot-gaming.de/admincp/plugin.php?do=productadd
IP-Adresse : *****
Benutzername : Fields
Klassenname : vB_Database
MySQL-Version : 5.5.31-1~dotdeb.0-log

Does anyone have a fix for that?

tbworld
07-30-2014, 07:10 PM
Unless you know what you are doing, you are better off going to the dragonbyte Super PM modification. You can find the light version on this site.

------------------------------------------------
Shout-out to Andreas: We miss you buddy :)
------------------------------------------------

Fields
07-30-2014, 07:33 PM
Attachments in PMs is only available in the pro version :(

Attachments in PM's: Users now can use attachments in their pm's. (Pro)

tbworld
07-30-2014, 07:35 PM
Attachments in PMs is only available in the pro version :(

That is right, unfortunately this code is slightly unfinished and not ready for prime-time. It does say beta. :)
If you knew your way around vBulletin then it is possible to get this running, but you would have to understand vBulletin's content-type code. If I could just post a line or two that would fix the modification, then I would. Sadly, that is not the case.

Fields
07-31-2014, 07:10 PM
No problem, but thanks anyway for taking your time :)

Skyrider
04-04-2015, 11:45 AM
Shame this one is in beta, I prefer not to pay just for the attachment ability in the PM system.

Stratis
04-24-2015, 02:53 PM
Confirm, error to vb4.2.0 pl4