vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Private Messages Enhancements - Private Message Attachments (https://vborg.vbsupport.ru/showthread.php?t=284138)

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/test...=productimport
Referrer : http://www.thewoollybacks.co.uk/test...?do=productadd

Lee Roberts 07-16-2012 10:03 PM

Quote:

Originally Posted by horusbird (Post 2344109)
error in installation:

Code:

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/adminc...=productimport
Referrer      : http://www.vesparesources.com/adminc...?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

Quote:

Originally Posted by Taurus1 (Post 2338295)
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:

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

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

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...

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:
  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.

heugabel 10-16-2012 02:41 PM

1 Attachment(s)
works good :D

mat8861 10-18-2012 11:53 AM

Quote:

Originally Posted by heugabel (Post 2373457)
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

Quote:

Originally Posted by heugabel (Post 2373457)
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

Quote:

Originally Posted by Schoelle (Post 2337665)
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

Quote:

Originally Posted by SpaceStar (Post 2379803)
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:

Quote:

Not Supported
Is in Beta Stage
Perhaps check this next time? :)

metalguy639 12-14-2012 02:34 AM

Quote:

Originally Posted by Eric (Post 2390576)
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.

Quote:

Originally Posted by Andreas (Post 2339450)
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:

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  : 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...

Code:

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:
Code:

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):
Code:

$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

Quote:

Originally Posted by y2ksw (Post 2419569)
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

Quote:

Originally Posted by heugabel (Post 2373457)
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


All times are GMT. The time now is 11:25 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01546 seconds
  • Memory Usage 1,850KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (9)bbcode_code_printable
  • (1)bbcode_php_printable
  • (11)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete