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)
-   -   PM Attachments 3.5 (https://vborg.vbsupport.ru/showthread.php?t=95477)

DivisionByZero 10-05-2005 06:01 AM

Quote:

Originally Posted by .Tim
Works great with 3.5 gold, my problem above is now resolved. :D

same here... works like a champ :)

Snake 10-05-2005 02:19 PM

Hmm great I'll definitly install this tonight!

paulomt1 10-05-2005 04:59 PM

Quote:

Originally Posted by Boofo
Read the Quick FAQ in the first post for your answer. ;)

Thanks Boofo, it's working now.

misuse 10-07-2005 05:07 AM

Works great for me! Thanks for the hack very useful on my site.

theArchitect 10-07-2005 05:57 AM

The hack is working, however when I click on the attachments link in the User CP the attachment in the PM is not listed.

Does this mean that PM attachments will not be counted toward attachment quotas?

Edit: Plus, I don't like that it does not check if a user has attachment permissions. I have had to add an <if> statement to stop users without attachment permission from using the attachments in PMs system.

BluPhoenix 10-07-2005 04:03 PM

I've been busy working on a rewrite for this seeing as how 3.5 is now Gold, I'm hoping to release it in beta form by the end of the week..

nexialys 10-07-2005 04:06 PM

we're friday. end of week... lol

WildSharky 10-07-2005 04:07 PM

Sorry for being dumb lol But im getting this Sorry! This forum is not accepting new posts. and i cant find the Find: $_pmt = 1;

Replace the "1" with the threadid

To replace it.. where you said you look for it.

BluPhoenix 10-10-2005 06:49 AM

Quote:

Originally Posted by nexialys
we're friday. end of week... lol

???

End of the week is Sunday in my World..

BluPhoenix 10-10-2005 07:01 AM

Quote:

Originally Posted by WildSharky
Sorry for being dumb lol But im getting this Sorry! This forum is not accepting new posts. and i cant find the Find: $_pmt = 1;


Replace the "1" with the threadid

To replace it.. where you said you look for it.

Go to Plugin Manager and click on "private attachments - get posthash and allow attachments" It's near the top.

illusions 10-10-2005 08:28 AM

I dont know what I seem to be doing wrong...I followed the instructions but when I select the manage upload button ..a window opens followed by the following error message:

Invalid Post specified. If you followed a valid link, please notify the administrator

I tried changing the threadid but still geting the same msg...any help here plz?

Terminator1138 10-11-2005 06:51 PM

Thanks works as intended.

illusions: how did you get the thread ID? I used one of mine and it worked perfectly.

Aeolian 10-12-2005 01:49 AM

its about time to change the topic title..
either compatible with vb 3.5 gold or not..

its been while now..

Snake 10-13-2005 06:19 PM

Yeah you're right!

BluPhoenix 10-13-2005 11:00 PM

Sorry, the true 3.5 Gold Version is being delayed because of problems with quotas, I hope to release it soon..

Although this version as is does work with 3.5 Gold.. IF You just follow the instructions as they are set out, always take care when installing a modification, make sure code is added in the right place and that your editing the right templates.

LeeWicKeD 10-14-2005 09:02 PM

When i attach a file, it uploads without an error, but when i want to send the PM i get a Database error:


Invalid SQL:
UPDATE pmtext SET attach='1' WHERE pmtextid='2477';

MySQL-Fehler : Unbekanntes Tabellenfeld 'attach' in field list.
Fehler-Nr. : 1054
Datum : Saturday, October 15th 2005 @ 12:00:33 AM
Skript : http://www.xxx.de/forum/private.php
Referrer : http://www.xxx.de/forum/private.php?do=newpm&u=1
IP-Adresse : xxx
Benutzername : xxx
Klassenname : vb_database


edit: a i've got vb3.5 gold...seems not to work with.

BluPhoenix 10-15-2005 06:46 AM

Don't fully understand the language but it looks like you've not run all the sql queries needed when installing the hack. You need to add an attach to the pmtext table which it looks like you haven't done..

Code:

ALTER TABLE pmtext add attach int not null;
but make sure you've done all the other sql queries too (they are towards the very end of the install instructions)

akanevsky 10-18-2005 12:36 AM

Hey bro, are you sure this should use thread permissions for whether they can attach or not? I think this should be separate :)

Andreas 10-18-2005 12:38 AM

Yeah, would be nice if it was separate - unfortunately that doesn't seem to be that easy (without file edits).

akanevsky 10-18-2005 12:48 AM

How about a new user permission - "can attach files in PM"? :)

Andreas 10-18-2005 12:51 AM

That's not the problem. newattachment.php is :)

akanevsky 10-18-2005 12:55 AM

Umm... Doesn't newattachment.php receive something like posthash or something of that kind that identifies whether what it's for? I am not sure, but when I did the "attachment in calendar" hack, I did something like that to distinguish between attachment that were intended for posts and attachments that were intended for calendar entries :)

EDIT:

Oh... I remember - the way I did it was I added a new field to the attachment table that identified where the attachment had to belong.. didn't use permissions for threads... I'm sure this can be done for PMs too :)

Mastar 10-19-2005 02:00 PM

I ran this:
ALTER TABLE attachment add usedin varchar(30) not null;
ALTER TABLE attachment add itemid int not null;
ALTER TABLE pmtext add attach int not null;
ALTER TABLE attachment add index (usedin,itemid)

And got this:
An error occurred while attempting to execute your query. The following information was returned.
error number: 1064
error desc: 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 ';
ALTER TABLE attachment add itemid int not null;
ALTER TABLE

Any Ideas??

BluPhoenix 10-20-2005 08:29 AM

Quote:

Originally Posted by Dark Visor
Hey bro, are you sure this should use thread permissions for whether they can attach or not? I think this should be separate :)

Yes the true 3.5 Gold Version allows for seperate quotes and permissions for attachments in pm's than to threads.. So you can have a user set to no for pm attachments but yes for threads, and vice versa.. also a usergroup can have an unlimited quota for threads, but only 100Mb for PMs.. pm attachments are now stored in a seperate table or directory (depending on your file storage settings) right now it does require a number of edits but they are slowly being worked out of the final product..

A "Lite" Version (Zend Encoded and with a max of fifty pm attachments sent. so you can get a feel for how the system works) will be available shortly.

A "FULL" Version (Not Encoded and no Limits) is available now but due to the amount of work that has gone into this isn't free. As all commercial talk is a no-no. PM me for details.

BluPhoenix 10-20-2005 08:30 AM

Quote:

Originally Posted by Mastar
I ran this:
ALTER TABLE attachment add usedin varchar(30) not null;
ALTER TABLE attachment add itemid int not null;
ALTER TABLE pmtext add attach int not null;
ALTER TABLE attachment add index (usedin,itemid)

And got this:
An error occurred while attempting to execute your query. The following information was returned.
error number: 1064
error desc: 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 ';
ALTER TABLE attachment add itemid int not null;
ALTER TABLE


Any Ideas??

I assume your using the SQL Queries option in the AdminCP? If so Each Query must be run seperately one at a time.

Mastar 10-20-2005 12:14 PM

Quote:

Originally Posted by BluPhoenix
I assume your using the SQL Queries option in the AdminCP? If so Each Query must be run seperately one at a time.


Yes, thank you! No errors and everything seem to work great so far. Will post if anything changes. Thanks again!

Robru 10-20-2005 06:23 PM

version 3.5.0 GOLD

Please, see attachments. How I can showing the image?

BluPhoenix 10-20-2005 06:31 PM

Quote:

Originally Posted by Robru
version 3.5.0 GOLD

Please, see attachments. How I can showing the image?

You need to add a zip.gif file to your images/attach folder.

BluPhoenix 10-20-2005 06:33 PM

Installs: 69

*childish giggle*

davidw 10-24-2005 01:42 PM

ALTER TABLE pmtext add attach int not null; would not work (the others did)
#1060 - Duplicate column name 'attach'

Also, attachments can be uploaded, but none will be sent or displayed in pm.

FleaBag 10-27-2005 11:32 PM

Any idea if this is working with 3.5.0 Gold?

.Tim 10-27-2005 11:48 PM

Works for me:

https://vborg.vbsupport.ru/showpost....4&postcount=37

cbr929rrerion 10-28-2005 12:58 AM

Almost did not get it to work but I did.. Great tool !

Anyway to make the image show up in the private message rather than being a link..

?

davidw 10-28-2005 12:21 PM

I've not been able to get it to work yet. I've set it up 3 times already and I'm just going to wait until its "official" before I reattempt it.

General_ 10-28-2005 05:18 PM

It work's fine. Great Work!

Here is the German Translation for German Users... I postet it here, because of Kentaurus rules... :nervous:

redlabour 10-28-2005 08:07 PM

Quote:

Originally Posted by General_
It work's fine. Great Work!

Here is the German Translation for German Users... I postet it here, because of Kentaurus rules... :nervous:


Perfect Thanks @General_ and BluPhoenix ! ;)

But i get this at online.php if a User is attaching a File !

Kuimera 10-29-2005 07:48 AM

I get this when i click "Manage Attachments"

Code:

Invalid Post specified. If you followed a valid link, please notify the administrator
This the code i have, I cant find the $_pmt = 1;

Code:

$extraattachmentinfo = $db->query_first("
        SELECT userid,itemid,usedin
        FROM " . TABLE_PREFIX . "attachment AS attachment
        WHERE attachmentid = " . $vbulletin->GPC['attachmentid'] . ""
        );

if ($extraattachmentinfo['usedin'] == 'pmtextid')
{
        $pmUsers = $db->query_first("SELECT toUserArray FROM ".TABLE_PREFIX."pmtext WHERE pmtextid='".$extraattachmentinfo['itemid']."'");
        $toUserArray = unserialize($pmUsers['toUserArray']);       

        if ($toUserArray[$vbulletin->userinfo['userid']] != $vbulletin->userinfo['username'] && $extraattachmentinfo['userid'] != $vbulletin->userinfo['userid'])
        {
                print_no_permission();
        }

        // bad thing to do, modify the main array with an int so the & operations will be true, any suggestions to improve this? (no file mods allowed!!)
        $vbulletin->userinfo['permissions'] = $vbulletin->bf_ugp_forumpermissions['canview'] + $vbulletin->bf_ugp_forumpermissions['canviewthreads'] + $vbulletin->bf_ugp_forumpermissions['cangetattachment'] + $vbulletin->bf_ugp_forumpermissions['canviewothers'];

        $imodcache = array();
        $imodcache[0] = array("".$vbulletin->userinfo['userid']."" => 1, 'permissions' => $vbulletin->bf_misc_moderatorpermissions["canmoderateposts"]);
 
      }


VBUsers 10-29-2005 10:01 AM

ok i fixed my issue but now i try to load a regular small image and it takes too long. it doesnt load it can you please tell me why? i followed the steps thanks

Kuimera 10-30-2005 06:07 PM

*bump*

VBUsers 10-30-2005 06:44 PM

Quote:

Originally Posted by Kuimera
I get this when i click "Manage Attachments"

Code:

Invalid Post specified. If you followed a valid link, please notify the administrator
This the code i have, I cant find the $_pmt = 1;

Code:

$extraattachmentinfo = $db->query_first("
        SELECT userid,itemid,usedin
        FROM " . TABLE_PREFIX . "attachment AS attachment
        WHERE attachmentid = " . $vbulletin->GPC['attachmentid'] . ""
        );

if ($extraattachmentinfo['usedin'] == 'pmtextid')
{
        $pmUsers = $db->query_first("SELECT toUserArray FROM ".TABLE_PREFIX."pmtext WHERE pmtextid='".$extraattachmentinfo['itemid']."'");
        $toUserArray = unserialize($pmUsers['toUserArray']);       

        if ($toUserArray[$vbulletin->userinfo['userid']] != $vbulletin->userinfo['username'] && $extraattachmentinfo['userid'] != $vbulletin->userinfo['userid'])
        {
                print_no_permission();
        }

        // bad thing to do, modify the main array with an int so the & operations will be true, any suggestions to improve this? (no file mods allowed!!)
        $vbulletin->userinfo['permissions'] = $vbulletin->bf_ugp_forumpermissions['canview'] + $vbulletin->bf_ugp_forumpermissions['canviewthreads'] + $vbulletin->bf_ugp_forumpermissions['cangetattachment'] + $vbulletin->bf_ugp_forumpermissions['canviewothers'];

        $imodcache = array();
        $imodcache[0] = array("".$vbulletin->userinfo['userid']."" => 1, 'permissions' => $vbulletin->bf_misc_moderatorpermissions["canmoderateposts"]);
 
      }


the code your looking for is at the top of the template you need to look in
about 5 or 6th line i think


All times are GMT. The time now is 06:09 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.01225 seconds
  • Memory Usage 1,832KB
  • 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
  • (5)bbcode_code_printable
  • (10)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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