vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   [VB3 RC3] Attachments in private messages (https://vborg.vbsupport.ru/showthread.php?t=59840)

gmarik 01-26-2004 05:57 AM

I like to like it ;)

Giveit2u43 01-28-2004 08:30 PM

I had a similiar problem with everything seeming to work fine but the attachments not actually showing in the pm's.. I finally tracked it down to the fact the forum had been upgraded from vb2, and we`d had the private attachments hack installed and so there was already a "private" table in attachments, I`d overlooked this on installation, but on removing that table and creating a new one fixed the problem with attachments not showing...

Might not work for others, but it worked for us and it gives people another option to try when attempting to get this great addon working... (haveto agree with Erwin too, this should be standard in gold! definetly get's my vote)

Natch 01-28-2004 09:19 PM

Great job!

Thanks for this excellent tool ...

/me installs *

Boofo 02-02-2004 09:29 AM

Found another boo-boo with this. If you add an attachment to a pm and then preview the pm, the attachment has detatched itself. Then, without saving the message, view your attachments and you will see the attachment in the listing.

catocom2 02-04-2004 08:02 PM

I installed this, and everything looks fine so far, except it keeps
telling me I don't have permission to do an attachment.

I'm not clear as to what is meant here...
Quote:

################################################## #################
# New phrases to add
################################################## #################

Add a new phrase and make sure it is in the posting group, otherwise it won't work

phrase: in_private_message
Text: Private Message
Do I do this in a PM?

catocom2 02-04-2004 08:17 PM

oh, and I'm running RC3
I couldn't fine this bit of code in the "pm_newpm"
Quote:

-------------------------------------------------------------------
search for this:
-------------------------------------------------------------------

<input type="hidden" name="receipt" value="0" />

------------------------------------------------------------------
change it to:
-------------------------------------------------------------------

<input type="hidden" name="receipt" value="0" />
<input type="hidden" name="posthash" value="$posthash" />
I also have the hack so that the reciept box is a checkbox instead of a popup.

catocom2 02-04-2004 08:37 PM

OK with the checkbox mod the line look like this in the "pm_newpm"

in stead of ...
PHP Code:

[QUOTE]-------------------------------------------------------------------
search for this:
-------------------------------------------------------------------

<
input type="hidden" name="receipt" value="0" />

------------------------------------------------------------------
change it to:
-------------------------------------------------------------------

<
input type="hidden" name="receipt" value="0" />
<
input type="hidden" name="posthash" value="$posthash/>
[/
QUOTE

look for....
PHP Code:

<input type="checkbox" name="receipt" id="cb_receipt" value="1" checked />
Request Read Receipt

and change to...
PHP Code:

<input type="checkbox" name="receipt" id="cb_receipt" value="1" checked />
Request Read Receipt?
<
input type="hidden" name="posthash" value="$posthash/> 

right?

Kentaurus 02-05-2004 01:39 AM

Quote:

Originally Posted by catocom2
OK with the checkbox mod the line look like this in the "pm_newpm"

in stead of ...

look for....
PHP Code:

<input type="checkbox" name="receipt" id="cb_receipt" value="1" checked />
Request Read Receipt

and change to...
PHP Code:

<input type="checkbox" name="receipt" id="cb_receipt" value="1" checked />
Request Read Receipt?
<
input type="hidden" name="posthash" value="$posthash/> 

right?

Yes, that's right. In fact you can add that bit of code anywhere inside the form tag... it doesn't have to be near the receipt or anything. I just added it there to group it with all the other hidden fields.

Kentaurus 02-05-2004 01:40 AM

Quote:

Originally Posted by catocom2
I installed this, and everything looks fine so far, except it keeps
telling me I don't have permission to do an attachment.

I'm not clear as to what is meant here...


Do I do this in a PM?

The new phrases are added in the admin control panel, that is, you go to the phrase manager and click on the "add new phrase" button

Kentaurus 02-05-2004 02:07 AM

Quote:

Originally Posted by Boofo
Found another boo-boo with this. If you add an attachment to a pm and then preview the pm, the attachment has detatched itself. Then, without saving the message, view your attachments and you will see the attachment in the listing.

A couple of changes to fix this. Thanks for spotting this, Boofo.

In private.php search for this
Code:

        $poststarttime = TIMENOW;
change it to
Code:

if ($_POST['poststarttime'])
{
$poststarttime = $_POST['poststarttime'];
}
else
{
        $poststarttime = TIMENOW;
}

In the template pm_newpm, search for this
Code:

<input type="hidden" name="posthash" value="$posthash" />
change it to
Code:

<input type="hidden" name="posthash" value="$posthash" />
<input type="hidden" name="poststarttime" value="$poststarttime" />

TXT updated also

catocom2 02-05-2004 02:42 PM

Quote:

Originally Posted by kentaurus
The new phrases are added in the admin control panel, that is, you go to the phrase manager and click on the "add new phrase" button

I found where to add the phrases there.
It still says I don't have permission when I open the attachment window though. :surprised:

Kentaurus 02-05-2004 06:43 PM

Quote:

Originally Posted by catocom2
I found where to add the phrases there.
It still says I don't have permission when I open the attachment window though. :surprised:

Did you do the template modifications in the newattachment template? That would be a cause for the window to give you a nopermission error.

If you have the hack installed in an accesible board for me to take a quick peek that would help also.

catocom2 02-06-2004 12:01 AM

Thanks Kentaurus!
It was in the "newattachment.php" file.
I must have missed something in that file the first time around.
I took a fresh copy, and tried it again. It works perfectly now. :up:

catocom2 02-06-2004 12:10 AM

Is there a way to moderate PM attachments in the admincp, like
the regular attachments?

Kentaurus 02-06-2004 12:43 AM

Quote:

Originally Posted by catocom2
Is there a way to moderate PM attachments in the admincp, like
the regular attachments?

The attachments follow the same rules as the regular attachments, they count for the quota of the user, and you can search for them in the admincp by author, date or any other field.

As for having a moderator queue for attachments that's not a feature. In fact, you do not moderate user's private messages and neither the attachments.

catocom2 02-06-2004 02:31 AM

ah, I see

catocom2 02-06-2004 10:48 PM

Well I upgraded to RC4 and reinstalled this hack, but
it has put it at the top for some reason..
It still works good though.:D

Kentaurus 02-06-2004 10:51 PM

Quote:

Originally Posted by catocom2
Well I upgraded to RC4 and reinstalled this hack, but
it has put it at the top for some reason..
It still works good though.:D

How is your pm_newpm template? You can add $attachmentoption wherever you want that box to show. Seems to me that it is above the message area. I wil re-check it as soon as I have rc4 installed.

catocom2 02-06-2004 11:22 PM

ah, yeah I had to move it down in the pm_newpm temp.

find
Code:

$disablesmiliesoption
and put it right below it...like..
Code:

                        $disablesmiliesoption
                        $attachmentoption

I also had a problem with the "private.php" file and had to
change a few things.

Oblivion Knight 02-08-2004 02:11 PM

All seems to be working well.. :)
Just a small thing of concern, in the message itself where the attached images are shown, the "Attached Images" in the message isn't framed like your screenshot demonstrates..

I've attached a screenshot of this, hopefully you can shed some light on this.?

Boofo 02-08-2004 04:27 PM

I think I found another bug. I had a member send me a photo of something. I still have the message and there is a paperclip showing there is an attachment to it but when you open the message, there is no attachment there. Now, this member erased all of her sent messages in the pm area. Could that have something to do with this since she is the one who sent it? Cause the attachment she sent me never showed up in my attachment list, only hers.

Revpolar 02-08-2004 04:32 PM

Yes that'll do it. I just did the install and found that out right away. Which is a good feature if you ask me. Great hack. My install was flawless on RC4. Thanks alot.

Boofo 02-08-2004 04:37 PM

It's not a good feature if you want to hold on to an attachment like I wanted to. ;)

Kentaurus 02-08-2004 07:08 PM

Quote:

Originally Posted by Oblivion Knight
All seems to be working well.. :)
Just a small thing of concern, in the message itself where the attached images are shown, the "Attached Images" in the message isn't framed like your screenshot demonstrates..

I've attached a screenshot of this, hopefully you can shed some light on this.?

That's a template thing, if the normal attachments appear framed then the attachments in private message should, too. Try attaching a jpg instead or a gif to see if it changes. How does it show in a normal postbit?

Kentaurus 02-08-2004 07:10 PM

Quote:

Originally Posted by Boofo
I think I found another bug. I had a member send me a photo of something. I still have the message and there is a paperclip showing there is an attachment to it but when you open the message, there is no attachment there. Now, this member erased all of her sent messages in the pm area. Could that have something to do with this since she is the one who sent it? Cause the attachment she sent me never showed up in my attachment list, only hers.

That's because the ownership of the attachment is mantained to the person who sent it. He can delete it anytime and you wouldn't have the attachment anymore. I can't give the ownership of the attachment to the recipient because there could be multiple recipients and I wouldn't know who should be the owner. And making a copy for everyone and storing an attachment 3-4 times doesn't seem to me as a good solution.

But the paperclip still showing up is a bug, I'll look into it. That should dissapear as soon as there are no more attachments.

Boofo 02-08-2004 07:33 PM

Then how can we save an attachment for later without having to download it? Is there anyway to set it up so if someone does decide to delete their attachment, then and only then it would transfer ownership to whoever still has the message that was sent to them with the attachment? On bigger sites, I can see what you're saying might make sense as to not fill up the site with attachments. But on a small site, like mine, there is no worry there yet. Besides, the Admin can see and delete any attachments in the Admin CP if it looks like it is starting to get out of hand.

Oblivion Knight 02-08-2004 11:27 PM

Quote:

Originally Posted by Kentaurus
That's a template thing, if the normal attachments appear framed then the attachments in private message should, too. Try attaching a jpg instead or a gif to see if it changes. How does it show in a normal postbit?

Aha.! Correct..
This is a problem with the .gif extension for some reason (on normal posts too)..

Hmm.. *scratches head*


[high][EDIT][/high]
Hmm.. Just noticed vB.org has this very same problem.
https://vborg.vbsupport.ru/showthrea...586#post474586


[high][EDIT 2][/high]
Ok, this is due to image sizes.. My bad.. :o

Boofo 02-08-2004 11:45 PM

That gif in the link has the box around it ok. What are you seeing?

EDIT: What sizes are we talking about?

Oblivion Knight 02-08-2004 11:48 PM

Quote:

Originally Posted by Boofo
EDIT: What sizes are we talking about?

The maximum pixel size w/h an image can be before it is shown as "thumbnail" form.. :)

Concluding that this is default behaviour and not a bug with the mod..
Awesome work Kentaurus.. :D

Boofo 02-08-2004 11:56 PM

LOL I know WHAT it is, I was curious about what actual size file is messing it up.

Oblivion Knight 02-08-2004 11:58 PM

Ahh sorry.. It IS 2am here afterall.. ;)
Anything below the default w AND h of 100 pixels here at vB.org..

NuclioN 02-09-2004 11:10 AM

Looks great but..

* PM attachment is showing up on the forumindex trough this mod: https://vborg.vbsupport.ru/showthread.php?t=61244

* javascript error sendmail: (see attachment)

* Kan not see the send attachment in PM

Kentaurus 02-13-2004 02:22 PM

Quote:

Originally Posted by NuclioN
Looks great but..

* PM attachment is showing up on the forumindex trough this mod: https://vborg.vbsupport.ru/showthread.php?t=61244

* javascript error sendmail: (see attachment)

* Kan not see the send attachment in PM

Note... if the author updates his hack this would need to be updated also.

In Mindtrix hack, look for:

Code:

$trix = $DB_site->query("SELECT attachmentid, dateline, filename FROM attachment WHERE dateline < " . TIME() ." ORDER BY dateline DESC LIMIT 5");
change it to:
Code:

$trix = $DB_site->query("SELECT attachmentid, dateline, filename FROM attachment WHERE dateline < " . TIME() ." AND private=0 ORDER BY dateline DESC LIMIT 5");
sendmail has nothing to do with this hack, what error are you getting?

Some people reported me before that the attachments weren't showing in the pm, I haven't traced why yet but someone also said that enabling thumbnails in the acp made them visible (I still haven't been able to reproduce it).

MindTrix 02-14-2004 12:19 PM

Wand me to update my hack with your fix, so it does not clash with your hack mate?

Kentaurus 02-14-2004 10:23 PM

Quote:

Originally Posted by MindTrix
Wand me to update my hack with your fix, so it does not clash with your hack mate?

Thanks Mindtrix, that would be nice. Only that you would need to put it as a note because normally they don't have a "private" column in the table.

MindTrix 02-14-2004 10:33 PM

Sure ill just make a link then in my post saying about it etc

The Quibbler 02-16-2004 02:44 PM

/me installs, and hopes it all works fine in RC4.

Boofo 02-29-2004 05:53 PM

Another small bug. ;)

When you preview a message, the attachment is still there but it doesn't show in the attachments box until you open it up and do a blank upload. Then it lists like it should. Can I get my "fix" for this? ;)

Kentaurus 02-29-2004 06:00 PM

Quote:

Originally Posted by Boofo
Another small bug. ;)

When you preview a message, the attachment is still there but it doesn't show in the attachments box until you open it up and do a blank upload. Then it lists like it should. Can I get my "fix" for this? ;)

I would need more details for this one. When I send a PM, preview it, if I click in the manage attachments button then the pop-up already has the previously attached file. Or do you mean in the pm original window and not the pop-up?

Boofo 02-29-2004 06:10 PM

Quote:

Originally Posted by Kentaurus
I would need more detailes for this one. When I send a PM, preview it, if I click in the manage attachments button then the pop-up already has the previously attached file. Or do you mean in the pm original window and not the pop-up?

Ok, I guess I got it a little confused. I mean right above the Manage Attchaments button in the Additional options box underneath the message. It won't show the attachment in a preview until you open up the manage attachments box and close it.


All times are GMT. The time now is 10:02 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.01539 seconds
  • Memory Usage 1,858KB
  • 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
  • (8)bbcode_code_printable
  • (5)bbcode_php_printable
  • (17)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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