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)

Boofo 02-29-2004 10:35 PM

Shouldn't the attachment show above that button without having to click the manage attachments button to see it?

Kentaurus 02-29-2004 11:04 PM

It should. That way it is very similar to the normal preview way of doing it. Here is the fix.

find this:

Code:

        'newpost_attachment'       
);

replace it with:
Code:

        'newpost_attachment',
        'newpost_attachmentbit'
);

find this:

Code:

eval('$attachmentoption = "' . fetch_template('newpost_attachment') . '";');
replace it with:

Code:

$currentattaches = $DB_site->query("
        SELECT filename, filesize, attachmentid
        FROM " . TABLE_PREFIX . "attachment
        WHERE posthash = '$posthash'
                AND userid = $bbuserinfo[userid]
");


$attachcount = 0;
while ($attach = $DB_site->fetch_array($currentattaches))
{
        $attachcount++;
        $attach['extension'] = strtolower(file_extension($attach['filename']));
        $attach['filename'] = htmlspecialchars_uni($attach['filename']);
        $attach['filesize'] = vb_number_format($attach['filesize'], 1, true);
        $show['attachmentlist'] = true;
        eval('$attachments .= "' . fetch_template('newpost_attachmentbit') . '";');
}



eval('$attachmentoption = "' . fetch_template('newpost_attachment') . '";');


Boofo 02-29-2004 11:14 PM

Works great! Thanks! ;)

Is the first post updated?

How would we add the attachments ability to Erwin's Quick Peply hack? ;)

Kentaurus 02-29-2004 11:48 PM

Quote:

Originally Posted by Boofo
Works great! Thanks! ;)

Is the first post updated?

How would we add the attachments ability to Erwin's Quick Peply hack? ;)

I am still wondering if Erwin's is a quick pm.... he has all the pm reply screen there! :) Actually in my forum I edited it to only show the textarea and the submit button....

It should be possible to add them, I'll take a look at it.

Boofo 03-01-2004 05:22 AM

Can you pm me with your edits for the textarea and submit button? ;)

portion 03-01-2004 12:20 PM

Can you allow only certain usergroups to use this function?

Kentaurus 03-01-2004 12:24 PM

Quote:

Originally Posted by portion
Can you allow only certain usergroups to use this function?

That would need further hacking.. and right now I have no use for it.

Anyway, what is this obsession with everything being usergroup based lately? (Second hack I get asked) With around 10 usergroups in my forum it is becoming a nightmare for me checking that every option is right....

portion 03-01-2004 12:56 PM

Can you just point me to the right area, and I can do the editing? I am pretty comfortable with PHP.

DivisionByZero 03-01-2004 08:22 PM

Quote:

Originally Posted by Kentaurus
Wouldn't that be a little hard on your users? I usually download an attachment more than once, and after I download it I expect it to remain there. That would seem a little un(user-friendly) to me.

This hack uses the same quotas and options that you have already defined for your attachments so if you have a quota for each user no matter if they attach files to posts or private message once they reach their limit they would have to delete some to continue attaching files.

How about automatically deleting the attachment(s) when the recipient actually DELETES the PM? That seems logical, since you wouldn't want orphaned attachments hogging your quota. That would be a waste of space and DB optimization.

I've installed the hack on 3/1/04 and everything seems to be working fine, except some little bug, where I'll describe in a new post!

DivisionByZero 03-01-2004 08:24 PM

Now, my problem with the hack is that the recipient clicks the attachment link, and gets an error message of: "No Post Defined". HELP

Kentaurus 03-02-2004 10:34 AM

Quote:

Originally Posted by ThePowerPig
How about automatically deleting the attachment(s) when the recipient actually DELETES the PM? That seems logical, since you wouldn't want orphaned attachments hogging your quota. That would be a waste of space and DB optimization.

I've installed the hack on 3/1/04 and everything seems to be working fine, except some little bug, where I'll describe in a new post!

The attachment is automatically deleted when it belongs to no more recipients. There are no orphaned attachments. They are done with the hourly cleanup and that was the reason to modify one of the cron jobs.

Please keep in mind that if you save a copy in your sent folder that counts as a pm, so the attachment wouldn't be deleted until both the recipient's pm and your copy of the pm are deleted.

It is the first time I have seen that "No post defined" error... do you have any other hack that deals with pm's or attachments installed?

DivisionByZero 03-02-2004 10:51 AM

No, I do not. Your hack is the only one I've installed at all. I went back and double checked everything. However, when I get down to the SQL, I did have problems running those. I ran each individually and it did create the three tables. Though the ALTER TABLE attachment add index (private) query gave me problems though, but I eventually did create the table manually.

DivisionByZero 03-04-2004 11:08 PM

ok, BIG problem...... I just found out that someone can easily go to your attachment.php page in the browser and just browse through attachments! they can do this by:

attachment.php?attachmentid=1
attachment.php?attachmentid=2
attachment.php?attachmentid=3

Is there a way you can re-release this hack and change the way vBulletin handles attachments? I would suggest md5summing the attachment upon upload and assigning the checksum as the attachment ID. I certainly don't want someone browsing through my members' private attachments!!! :)

Kentaurus 03-06-2004 09:02 PM

Quote:

Originally Posted by ThePowerPig
ok, BIG problem...... I just found out that someone can easily go to your attachment.php page in the browser and just browse through attachments! they can do this by:

attachment.php?attachmentid=1
attachment.php?attachmentid=2
attachment.php?attachmentid=3

Is there a way you can re-release this hack and change the way vBulletin handles attachments? I would suggest md5summing the attachment upon upload and assigning the checksum as the attachment ID. I certainly don't want someone browsing through my members' private attachments!!! :)

There is already functionality for this. Another member cannot see an attachment that he doesn't own. They get a permission denied screen. Even if they start browsing the attachments. If the attachment is private sender and recipients are the only ones allowed to see it.

Boofo 03-07-2004 09:25 PM

Can you update the first post with all of the changes up until now, please? ;)

Kentaurus 03-07-2004 10:29 PM

Quote:

Originally Posted by Boofo
Can you update the first post with all of the changes up until now, please? ;)

Updated :)

Boofo 03-07-2004 10:54 PM

Thank you kindly, sir. ;)

msimplay 03-18-2004 08:07 AM

can private attachments be done by user groups for example make it a premium only option ?

DivisionByZero 03-20-2004 07:22 PM

is there going to be a new release for vb3 gold? I just did a clean install and am having serious problems with it... there was a lot of code rewrites in the new version, and none of the strings match :(

Boofo 03-20-2004 07:31 PM

Are you sure? The code shouldn't have changed at all in the final release from RC3 at least.

DivisionByZero 03-20-2004 08:28 PM

Quote:

Originally Posted by Boofo
Are you sure? The code shouldn't have changed at all in the final release from RC3 at least.

yes, I had rc4 and there are some differences in it, and I'm having major permissions issues.

Boofo 03-20-2004 08:43 PM

I'm sure Kentaurus will upgrade his hack, but I will go through the code and see what needs to be changed in the meantime. There can't be that much to change to make it work. Sit tight. ;)

Red Blaze 03-26-2004 02:48 PM

I installed it using vb3 gold and I'm having no problems at all. So far, it works just fine.

Boofo 03-26-2004 02:56 PM

Can you post the differences in the code here for those that are having problems? ;)

hubba 03-26-2004 07:47 PM

Uhm maybe this is a bug? I got an parse error in column 164. It is:

at line 156, search for this code:
-------------------------------------------------------------------

verify_forum_password($foruminfo['forumid'], $foruminfo['password']);

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

else if (!($forumperms & CANPOSTNEW) && !$privateattachment) // newthread.php
{
print_no_permission();
}

I removed the else from the if statement... now it works. Ok so?

Red Blaze 03-26-2004 09:34 PM

That's odd, wonder if you copied it right because I didn't need to delete anything for it to work. If you backed up the files, try it one more time. There's no need to delete any part of the code.

msimplay 03-27-2004 11:19 AM

heres a note for everyone thats using this hack
i had my files as attachments but the hack kept giving me invalid attachment error
but soon as i moved them back into the database everything was fixed
so my question would be is there anyway to make it work with files as attachments

Boofo 03-27-2004 11:27 AM

That's how it is set up at my site and as you saw, it works fine. ;)

Vivi Ornitier 03-31-2004 02:25 AM

So i'm kinda confused, how do u integrate this hack with erwin's quick pm reply hack? I think it was alreayd done but it was kinda vague what to do.

Boofo 03-31-2004 02:40 AM

Kentuarus posted a how-to (either in here or Erwin's thread, I can't remember which now) for adding this to Erwin's Quick Reply. ;)

DivisionByZero 04-02-2004 03:28 PM

I'm still having problems with vb 3 gold.... permissions errors when the recipient views an attachment :(

luroca 04-07-2004 08:23 AM

Simply, this hack doesn't work in gold for me; it?s the only hack i have instaled in v.3 RC4 :(
There are some differences in scripts from releases ...

msimplay 04-07-2004 03:05 PM

Quote:

Originally Posted by luroca
Simply, this hack don?t work in gold for me; it?s the only hack i have instaled in v.3 RC4 :(
There are some differences in scripts from releases ...

make sure attachments are in your database
it doesn't work with attachments as files
didn't for me anyway :p

Boofo 04-07-2004 03:06 PM

I've got it working with attachments as files just fine. What version of vb3 did you have it not working that way?

luroca 04-07-2004 03:34 PM

It works fine with attachments as files in RC4.
In Gold, all is apparently ok but in the privates there are no files :D

msimplay 04-07-2004 04:55 PM

Quote:

Originally Posted by Boofo
I've got it working with attachments as files just fine. What version of vb3 did you have it not working that way?

yep in gold

Boofo 04-07-2004 05:38 PM

Well, I talked to Kentaurus and he said he is using Gold and this hack works fine for him.

DivisionByZero 04-07-2004 06:44 PM

Quote:

Originally Posted by Boofo
Well, I talked to Kentaurus and he said he is using Gold and this hack works fine for him.

This is very strange... how can the hack work fine in Gold when the code is totally different? I installed the hack three different times, and there's been major modifications in the code, and I'm still getting permissions errors when the recipient tries to view the attachments. :rolleyes:

DivisionByZero 04-11-2004 07:39 PM

hello??? anybody???

Shane 04-11-2004 07:43 PM

Will Install later

/me clicks install


All times are GMT. The time now is 08:14 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.01321 seconds
  • Memory Usage 1,824KB
  • 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
  • (4)bbcode_code_printable
  • (10)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