vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Attachments in private messages (https://vborg.vbsupport.ru/showthread.php?t=91220)

Kentaurus 06-27-2005 10:00 PM

Attachments in private messages
 
Last tested in 3.5.0 beta 4
Beta hack

With this hack you can send attachments inside private messages.
Sometimes you may want to send an image or file to another user, but
you just don't want to disclose your email or make the file public,
with this hack you can attach it to the private message.

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.

==

I didn't think this could be done by plugins alone, but it was, although some sections were really tricky.

Please read the faq in the post below. Also please reply if you tested it and it worked for you :) much appreciated

v1.0.0
first release

v1.0.1
Fixed an elusive bug that deleted all your non-pm attachments.
Now in "valid file extensions" everything is correctly shown
Added vbulletin version check so you can't install the plugin in an unsupported version

Kentaurus 06-28-2005 01:57 AM

FAQ

I'm getting a:
Invalid Post specified. If you followed a valid link, please notify the administrator

That means the plugin was unable to get attachments permissions for the user. To solve it:

  1. Locate a thread in your forum (one that shouldn't be deleted in a long time, it doesn't matter if it's closed). Remember it's threadid
  2. Go to Plugin Manager and click on "private attachments - get posthash and allow attachments"
  3. Find:
$_pmt = 1;


Replace the "1" with whatever thread id you selected in step 1, for example:
$_pmt = 560;

.Tim 06-28-2005 02:37 AM

Works just fine in IE but in Firefox the 'manage attachments' button does nothing when clicked. And after testing it out in IE the attachment doesn't show up, guess I should re-do the hack.

Kentaurus 06-28-2005 03:48 AM

Quote:

Originally Posted by .Tim
Works just fine in IE but in Firefox the 'manage attachments' button does nothing when clicked. And after testing it out in IE the attachment doesn't show up, guess I should re-do the hack.

I'm using firefox myself, I never had a problem with the manage attachments button, it's the same template as the one in the new reply so if it works there....
The attachments should show up provided the hook for that is active, check in the plugins manager that the 4 hooks for the private attachments are currently active.

I forgot to say... I tested it in a blank, unmodified vb3.5 beta 3 installation

.Tim 06-28-2005 04:03 AM

The manage attachments button doesn't work at all in firefox.

eXtremeTim 06-28-2005 05:07 AM

I will install in the morning.

Dean C 06-28-2005 06:27 AM

Hey Kent, could you please reupload your attachments as one zip per file as per our new rule :) Thanks

Btw, great modification, was surprised when I saw this in plugins and not code mods ;)

Johannes de Le?n 06-28-2005 08:50 AM

Quote:

Originally Posted by Kentaurus
I'm using firefox myself, I never had a problem with the manage attachments button, it's the same template as the one in the new reply so if it works there....
The attachments should show up provided the hook for that is active, check in the plugins manager that the 4 hooks for the private attachments are currently active.

I forgot to say... I tested it in a blank, unmodified vb3.5 beta 3 installation

It works ok with FireFox here. Though, above the manage attachments button, the valid extensions are not shown; and the attachments fieldset is not shown either when a PM is received.

I've even tried to change the plugin's id in the database, but nothing changed.

Still, it does attach the file.

Jagged Tooth 06-28-2005 11:56 AM

Thanks Kentaurus you got me through that problem, but now some more problems.

When I do try to add a Attachment I get this

Warning: Invalid argument supplied for foreach() in \newattachment.php on line 545

the rest of the page comes out fine.

Then when I try to actually upload a file, I get this

Warning: Invalid argument supplied for foreach() in \newattachment.php on line 545

Any Ideas guys? Also I have the same problem as Johannes de León in that the list of valid extensions does not show in either in the new PM page or new Thread page.

--Jagged Tooth--

Andreas 06-28-2005 12:11 PM

Nice Hack.

One suggestion:
I think you can get rid of the Cron Script by using Hook cron_script_cleanup.

Dark_Wizard 06-28-2005 02:48 PM

Nice hack...suggestion for next version, how about per usergroup settings as to who can and cannot add attachments.

.Tim 06-28-2005 09:48 PM

The scheduled task for pm attachment clean up, wiped out all of my attachments. It first ran at 12:01am and every message with an attachment has an "edit by" message and the attachments are missing and the edit time is 12:01am, same as when the task first ran.

Kentaurus 06-28-2005 11:09 PM

.Tim, you seem to be having really strange problems, but I'll see if I can find a solution

Do you have a pop-up blocker or some configuration alike in your computer?
What vbulletin version are you running the hack in?
Do you have other hacks / plugins installed?

Also, have you tried testing the hack in a fresh, unmodified 3.5 beta 3 installation?

.Tim 06-28-2005 11:28 PM

Quote:

Originally Posted by Kentaurus
.Tim, you seem to be having really strange problems, but I'll see if I can find a solution

Do you have a pop-up blocker or some configuration alike in your computer?
What vbulletin version are you running the hack in?
Do you have other hacks / plugins installed?

Also, have you tried testing the hack in a fresh, unmodified 3.5 beta 3 installation?

Thanks, any help is appreciated.

No, I don't have anything like that, plus the attachments were working just fine before. Yes, I have a few others installed but nothing involving attachments or pm's.

No, I haven't tried that, after I lost my attachments getting this hack working has kind of taken a back seat.

Kentaurus 06-29-2005 01:42 AM

Quote:

Originally Posted by .Tim
Thanks, any help is appreciated.

No, I don't have anything like that, plus the attachments were working just fine before. Yes, I have a few others installed but nothing involving attachments or pm's.

No, I haven't tried that, after I lost my attachments getting this hack working has kind of taken a back seat.

It doesn't matter if the other hacks are pm or attachments related, could you list them to me? I'm trying to reproduce the scenario so I can fix the problem.

.Tim 06-29-2005 01:58 AM

Quote:

Originally Posted by Kentaurus
It doesn't matter if the other hacks are pm or attachments related, could you list them to me? I'm trying to reproduce the scenario so I can fix the problem.

ucash
last seen online
new posts and reputation comments
arcade
custom wol
who visited today

coffeefix 07-03-2005 05:49 AM

when recieving a pm inwhich a file has been attached, there is no option to view the attachment, as a matter of fact the attachment doesn't show up at all.

coffeefix 07-06-2005 03:50 PM

any word on this?

theArchitect 07-13-2005 02:41 AM

Quote:

Originally Posted by Kentaurus
It doesn't matter if the other hacks are pm or attachments related, could you list them to me? I'm trying to reproduce the scenario so I can fix the problem.

I am getting the problem that it attaches the document fine. And when it arrives there is a little paperclip to say that there is an attachment. But when I open the message there is no attachment to click on.

kwopper 07-15-2005 01:17 AM

Same issue as everyone else with viewing the attachment. It didnt matter whether it was stored in database or file folder.

Once that issue is solved this will be an excelent hack and very easy to install.

Kentaurus 07-17-2005 05:57 PM

I uploaded a new version. For upgrading please:
In the "plugin manager" delete all plugins that have "private attachments - " as a prefix, there are 4 of them
re-upload privateattachments.xml from download/update plugins
re-upload privateattachments.php in your includes/cron folder

Thanks to .Tim for the help in debugging this, I'm terribly sorry about the bug in deleting attachments, it's finally fixed.

I am now trying to find why the attachments wouldn't be displayed, they show fine in my installation, I tried sending a pm with attachments from "user1" to "user2", mixing images and documents.... didn't have any issues, user2 can see the attachments in the pm just fine.

Does the fieldset that says "attached images" and "attached files" appears, or does nothing appears at all? Could you also try seeing the pm in the "sent items" folders and check if the attachments show there?

theArchitect 07-18-2005 12:12 AM

Quote:

Originally Posted by Kentaurus
I uploaded a new version. For upgrading please:
In the "plugin manager" delete all plugins that have "private attachments - " as a prefix, there are 4 of them
re-upload privateattachments.xml from download/update plugins
re-upload privateattachments.php in your includes/cron folder

Thanks to .Tim for the help in debugging this, I'm terribly sorry about the bug in deleting attachments, it's finally fixed.

I am now trying to find why the attachments wouldn't be displayed, they show fine in my installation, I tried sending a pm with attachments from "user1" to "user2", mixing images and documents.... didn't have any issues, user2 can see the attachments in the pm just fine.

Does the fieldset that says "attached images" and "attached files" appears, or does nothing appears at all? Could you also try seeing the pm in the "sent items" folders and check if the attachments show there?

Just in case I am missing something what template displays the recieved message?

I get the little paper clip in the general inbox view, but I can't see the attachment when I open the PM. All I can think is that I have missed a template mod.

.Tim 07-18-2005 02:14 AM

Quote:

Originally Posted by Kentaurus
Thanks to .Tim for the help in debugging this, I'm terribly sorry about the bug in deleting attachments, it's finally fixed.

Now if you can just help me finish building this time machine so I can go back in time and hit myself over the head with a chair before I attempt to install this without backing up my database first.

Kentaurus 07-18-2005 03:47 AM

Quote:

Originally Posted by .Tim
Now if you can just help me finish building this time machine so I can go back in time and hit myself over the head with a chair before I attempt to install this without backing up my database first.

Can't help you with that I'm afraid....
I did add a giant "Beta Hack" legend to the first post.... before it was just the tiny little checkbox to the right. Wish I could do something to help you recover your attachments.

Johannes de Le?n 07-18-2005 12:17 PM

It still doesn't show up when one is reading a message. See attachments.

theArchitect 07-18-2005 09:35 PM

Quote:

Originally Posted by Johannes de Le?n
It still doesn't show up when one is reading a message. See attachments.

Yep. That is exactly what I am getting.

burnist 07-19-2005 09:58 AM

Well, its working for me :)

Only thing is its templates are un cached, not saying its your fault but we really need to work out some way of adding to those arrays.

fabrizio 07-19-2005 05:42 PM

Hello here.

Do you know if this modification works well on vBulletn 3.0.7 (the latest one)?

Thank you for any information.

Fab.

Johannes de Le?n 07-19-2005 06:06 PM

Quote:

Originally Posted by fabrizio
Hello here.

Do you know if this modification works well on vBulletn 3.0.7 (the latest one)?

Thank you for any information.

Fab.

No, it will not work, it is a plugin, vB 3.0.7 doesn't support plugins.

Kentaurus 07-22-2005 12:06 PM

Quote:

Originally Posted by fabrizio
Hello here.

Do you know if this modification works well on vBulletn 3.0.7 (the latest one)?

Thank you for any information.

Fab.

Only in vbulletin 3.5 beta 4

Boofo 07-25-2005 02:38 PM

In my sent items, the message has a paperclip but there is no attachment showing when viewing the message.

Neutral Singh 07-26-2005 09:49 AM

Same here, no attachement showing when viewing the message. :( I needed this mod desperately. Any way through this problem ?

theArchitect 07-26-2005 10:11 AM

Kentaurus, I know you are very busy, but I too (as already stated) would love to be able to use this mod on my forum, but am having the same problem.

I know it is hard fixing a bug you can't re-create, but any assistance would be apprecaited.

BamaStangGuy 07-28-2005 02:34 AM

Def doesnt work for RC1 (atleast for me)

Boofo 07-28-2005 04:35 AM

Ok, I've narrowed it down a little further. ;)

The paperclip shows when listing private messages. It does NOT show the attachment in the sent messages and the person who the attachment was sent to does NOT get an attachment in their pm. But when viewing the attachments listing in the Admin CP, the attachment is there.

Hope this helps in tracking it down. ;)

BamaStangGuy 07-31-2005 04:12 AM

bump... would be nice to get this updated :)

FleaBag 07-31-2005 12:10 PM

Kentaurus... Any idea if it'll work with RC1 with the current install info. Normally I'd go ahead and install but I don't like the look of the bug that deleted all attachments lol!

kwopper 08-01-2005 02:28 PM

Quote:

Originally Posted by FleaBag
Kentaurus... Any idea if it'll work with RC1 with the current install info. Normally I'd go ahead and install but I don't like the look of the bug that deleted all attachments lol!


This doesnt work with RC1. Comes up with error stating needs Beta4 and found RC1. Will not allow access to pms. Hopefully this hack will be updated.

southernlady 08-02-2005 03:03 PM

Yeap, I lost this one as well when I upgraded to RC1. Would love to get it back as soon as you figure it out. Liz

Boofo 08-02-2005 03:23 PM

Quote:

Originally Posted by kwopper
This doesnt work with RC1. Comes up with error stating needs Beta4 and found RC1. Will not allow access to pms. Hopefully this hack will be updated.

Bypassing the error is easy. It just doesn't work as it should yet.


All times are GMT. The time now is 04:44 PM.

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.01291 seconds
  • Memory Usage 1,830KB
  • 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
  • (14)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)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