vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Private Attachments! (Attachments in Private Messages) (https://vborg.vbsupport.ru/showthread.php?t=35593)

glenmax 12-11-2002 03:06 PM

Well,

I did some checking and looking. I also tried to find the location that Rolodex mentionned here:

Quote:

You can probably do that yourself ... a simple "if ($usergroup=6 || $usergroup=7){ condition before all functions that does the attachment procedure ... when help is not given when you request it, somemight help you if you attempt to do it for yourself. You might get a quick response for trying yourself!
Now I admit, I am new to this and I am learning. But, a little direction could go a long way for me to this working for mods and admins only.

Please give a hand if anyone can.....

Cheers,
GM

Warcaptain 12-22-2002 09:09 PM

i cant view it.
the code is all over the place

anyway you can post a more friendly version?

VAN 01-16-2003 11:41 PM

Just upgraded to 2.2.9 on my test board, and this works flawlessly with one tiny exception...

I still cannot get paperclip.gif to appear next to the message title.

Quote:

$attach = '<img src="{ imagesfolder}/paperclip.gif" border="0" align="absmiddle">';
} else {
$attach = '';
Anyone else run into this....and fix it?

MetroSports82 01-29-2003 10:39 AM

Quote:

Originally posted by Mike11212
I need help
I installed the hack fine with out any problems
but when someone clicks the attachments in the PM
they get the following error
Parse error: parse error in /home/mike1121/public_html/board/attachment.php on line 100

here are lines 89 to 102 in my attachments.php file
Code:

if ($extension=='gif') {
  header('Content-type: image/gif');
} elseif ($extension=='jpg' or $extension=='jpeg') {
  header('Content-type: image/jpeg');
} elseif ($extension=='png') {
  header('Content-type: image/png');
} elseif ($extension=='pdf') {
  header('Content-type: application/pdf');
} else {
  header('Content-type: unknown/unknown');
}
echo $attachmentinfo[filedata];

?>


Mike, I was having the same exact problem, but when I double checked to see that I had all the code work right, I really didn't. I was missing a '}' at the end of one of the lines. I think this is the same problem that you might be encountering. try doing this, with the modifications that you already have.

open- attachment.php


REPLACE
PHP Code:

updateuserforum($getforuminfo['forumid']); 

WITH
PHP Code:

if ($privateok==0) {
    
updateuserforum($getforuminfo['forumid']);


BE SURE TO INCLUDE THE } at the end of that line. that should do the trick, let me know how it goes. :) working great with 2.2.9.

Nerpin 01-30-2003 01:43 AM

I installed it and as far as I can tell I did everything properly...but when the person who recieves the pm tries to open it...it says it cannot find the attachment specified...any ideas why?

Jugglor 02-13-2003 02:24 AM

When the member on the receiving end deletes the PM, is the attachment deleted from the database?

Slynderdale 03-03-2003 11:00 PM

Nice hack but theres a small problem, If some one deletes the private message that has an attachment, it does not delete the attachment itself, I made a fix for this, Ill post a text below with the fix.

Slynderdale 03-03-2003 11:02 PM

With the fix, It only deletes the attachment when the last private message that contains the attachment is deleted, so it doesnt accidentaly delete the attachment on the sender or receiver when one deletes the private message and the other doesnt.

Enjoy

clown2003 03-21-2003 05:27 PM

Hi, very neat hack but can any 1 help me, I want only selected members to be able to send attachments.....

Steve123 03-22-2003 03:21 AM

Hey,

Ive installed this hack and gone over it twice..

For some reason it wont work..

When i send an attachment in a pm and read it.. it dosent show the attachment.. it shows nothing..

Ive check the mysql tables and it dosent seem to be adding anything to the attachment and privatemessage sql tables..

using vb 2.2.6.. any ideas??

/Steve


All times are GMT. The time now is 11:11 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.01227 seconds
  • Memory Usage 1,744KB
  • 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
  • (1)bbcode_code_printable
  • (2)bbcode_php_printable
  • (3)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
  • (10)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