Attachment Mod

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in here. No new MODs will be accepted into the MOD Database for phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.

Rating:

Excellent!
2035
71%
Very Good
444
16%
Good
175
6%
Fair
54
2%
Poor
156
5%
 
Total votes: 2864

User avatar
Vikul
Registered User
Posts: 16
Joined: Thu May 04, 2006 1:09 am

Re: Warnign messages

Post by Vikul »

DavidIQ wrote:
Vikul wrote:I attach a word doc to a post and then try to submit it ... I am getting this error

Warning: basename() expects parameter 1 to be string, array given in /usr/local/apache2/htdocs/phpBB2/attach_mod/posting_attachments.php on line 825

Warning: Cannot modify header information - headers already sent by (output started at /usr/local/apache2/htdocs/phpBB2/attach_mod/posting_attachments.php:825) in /usr/local/apache2/htdocs/phpBB2/includes/page_header.php on line 523

Warning: Cannot modify header information - headers already sent by (output started at /usr/local/apache2/htdocs/phpBB2/attach_mod/posting_attachments.php:825) in /usr/local/apache2/htdocs/phpBB2/includes/page_header.php on line 525

Warning: Cannot modify header information - headers already sent by (output started at /usr/local/apache2/htdocs/phpBB2/attach_mod/posting_attachments.php:825) in /usr/local/apache2/htdocs/phpBB2/includes/page_header.php on line 526


The resulting post doesn't have any filename ...

Any idea what is going wrong ???

Thanks
Vikul

Poking around...can you upload any other filetype? Is this your own server?


Yes I can upload other files...

Code snippet causing issues:

Code: Select all

					$sql_ary = array(
						'physical_filename'		=> (string) basename($this->attachment_list[$i]),
						'real_filename'			=> (string) basename($this->attachment_filename_list[$i]),
						
I have attached it as physical and also tried inline ... doesn't make any difference.

Also once I upload a file and then I go back to edit and upload another file it fails giving me an error:

"You tried to change an attachment you do not have access to"
User avatar
Vikul
Registered User
Posts: 16
Joined: Thu May 04, 2006 1:09 am

How is this working for all you guys....

Post by Vikul »

In posting_attachments.php

Code: Select all


		// Check the submitted variables - do not allow wrong values
		$actual_id_list				= get_var('attach_id_list', array(0));
	
		$actual_list				= get_var('attachment_list', array(''));

		for ($i = 0; $i < sizeof($actual_list); $i++)
		{
			if ($actual_id_list[$i] != 0 )
			{
				if (!in_array($actual_id_list[$i], $allowed_attach_ids))
				{
					message_die(CRITICAL_ERROR, 'You tried to change an attachment you do not have access to', '');
				}
			}

The above code doesn't make sense:

$actual_id_list = get_var('attach_id_list', array(0)); --> This returns an array of ids.

in_array($actual_id_list[$i], $allowed_attach_ids) expects the first arguement to be a string....

Either I am too tired or people have not tried this mod enough ....

Waiting for pros on this MOD to respond..

Cheers
Vikul
User avatar
Brf
Support Team Member
Support Team Member
Posts: 52236
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Post by Brf »

inarray has no expectation for its first parameter... It simply searches for that value in the array, which is the second parameter. If the third paramter is not true (or omitted) it will even match a numeric to a string.
User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 17414
Joined: Thu Jan 06, 2005 1:30 pm
Location: Fishkill, NY
Name: David Colón
Contact:

Re: How is this working for all you guys....

Post by DavidIQ »

Vikul wrote: Either I am too tired or people have not tried this mod enough ....

Waiting for pros on this MOD to respond..

:?: :?: :?: :?: :?: :?: :?:
I would call what you're experiencing "user error". This mod has been in existence since 2003. It's really doubtful that you'd uncover something like this after the mod existing for so many years :roll: As Brf already stated...you've probably assigned the .doc to the wrong download method.

Oh and BTW... Brf and I are as expert as you're going to find to help you with this mod...
Apply to become a Jr. Extension Validator
My extensions | In need of phpBB services? | Was I helpful today?
No unsolicited PMs unless you're planning on asking for paid help.
cuong_vm84
Registered User
Posts: 5
Joined: Mon Oct 23, 2006 12:13 pm

Fatal Error

Post by cuong_vm84 »

hello everyone Very Happy
Im building a phpbb forum but I have a problem about attachment_mod. Can you help me,please?
The error I get like that

Fatal error: Call to undefined function: include_attach_lang() in c:\program files\easyphp1-8\www\phpbb\admin\admin_attach_cp.php on line 52
and
Fatal error: Call to undefined function: include_attach_lang() in c:\program files\easyphp1-8\www\phpbb\admin\admin_extensions.php on line 54

All the parts in Attachments and Extension columns have the same error

And here is the file text

http://www.myfilehut.com/userfiles/1602 ... hments.txt

http://www.myfilehut.com/userfiles/1602 ... ension.txt

Thank You very much

PS: I'm sure that I uploaded language files to the correct areas. And I've done it many times
User avatar
visiaa
Registered User
Posts: 8
Joined: Thu Oct 19, 2006 4:49 am

Post by visiaa »

this is really nice mod provided thank you
This signature has been removed by karlsemple as it breehed the forum rules please read the rules here http://www.phpbb.com/rules/#rule2a regarding signatures
User avatar
Bilardinho
Registered User
Posts: 40
Joined: Mon Mar 20, 2006 11:37 am
Contact:

Post by Bilardinho »

Saratoga Sam wrote:
Bilardinho wrote:hello everybody

i use this attachment v 2.4.1
and i have problem with upload my file to my server up to 2MB.
I test upload it by FTP options, but don't successfull :-(
Setting FTP is (i think) OK - test button also write OK

- but i have error message: Tried to upload empty file

Anybody can help me please how i can upload files up to 2MB?


PHP defaults to 2M uploads. To increase this value edit the php.ini file:

OPEN FILE: /etc/php.ini (this is the path on my server)
CHANGE "upload_max_filesize = 2M" to "upload_max_filesize = 20M" (this will increase your upload size to 20Mb).

You then have to restart Apache so it is aware of the new setting. I use
"$ service httpd restart" to restart Apache on my server with shell access.

Thank you for your reply.
I have Apache set as you write to 20MB.
But i have problem send files about 10MB and more.
Error: No post mode specified
Can you help me please with this problem?
User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 17414
Joined: Thu Jan 06, 2005 1:30 pm
Location: Fishkill, NY
Name: David Colón
Contact:

Re: Fatal Error

Post by DavidIQ »

cuong_vm84 wrote: hello everyone Very Happy
Im building a phpbb forum but I have a problem about attachment_mod. Can you help me,please?
The error I get like that

Fatal error: Call to undefined function: include_attach_lang() in c:\program files\easyphp1-8\www\phpbb\admin\admin_attach_cp.php on line 52
and
Fatal error: Call to undefined function: include_attach_lang() in c:\program files\easyphp1-8\www\phpbb\admin\admin_extensions.php on line 54

All the parts in Attachments and Extension columns have the same error

And here is the file text

http://www.myfilehut.com/userfiles/1602 ... hments.txt

http://www.myfilehut.com/userfiles/1602 ... ension.txt

Thank You very much

PS: I'm sure that I uploaded language files to the correct areas. And I've done it many times

Did you do any of the edits listed in docs/install.txt?
Apply to become a Jr. Extension Validator
My extensions | In need of phpBB services? | Was I helpful today?
No unsolicited PMs unless you're planning on asking for paid help.
MoparTalk.co.uk
Registered User
Posts: 67
Joined: Thu May 06, 2004 7:32 pm

Post by MoparTalk.co.uk »

I'm sure this is simple, has anyone got a script to insert the value of 1 into the thumb part of the attachment properties SQL table?

I've created 16,571 thumbs offline and uploaded them, just need to switch them on!

With this number of attachments its a testament to how robust and easy to use this mod is :) I'm only switching to thumbnail use so I don't have to use the old 'max width 3' mod ...
Blisk
Registered User
Posts: 270
Joined: Wed Aug 20, 2003 10:43 am
Location: Slovenia

Post by Blisk »

why there is no image when I preview post, with attached image.
When i submit post then image shows, but not in preview?
User avatar
phpben
Registered User
Posts: 28
Joined: Thu Oct 05, 2006 8:28 pm
Location: Manchester, UK

Have to be logged in to see attached images

Post by phpben »

A guest user can see some attached images, but not all (within different topics).

But once logged in, all attached images can be seen.

All topics are set so that ALL can 'View' and 'Read'.

I cannot find anything in the Administration Panel to set this.

My entire 'Files' directory has 755 permission properties.

Please help! :oops:
User avatar
phpben
Registered User
Posts: 28
Joined: Thu Oct 05, 2006 8:28 pm
Location: Manchester, UK

Post by phpben »

Blisk wrote: why there is no image when I preview post, with attached image.
When i submit post then image shows, but not in preview?


Adminstration Panel / Attachment Management / Attachment Options / Do you want to display Attachments in the Topic Review Window ? - Yes

I think this will sort it...

Cheers, Ben.
User avatar
Brf
Support Team Member
Support Team Member
Posts: 52236
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Post by Brf »

Blisk wrote: why there is no image when I preview post, with attached image.
When i submit post then image shows, but not in preview?


That is a setting in your attachment config.
User avatar
Brf
Support Team Member
Support Team Member
Posts: 52236
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: Have to be logged in to see attached images

Post by Brf »

phpben wrote: A guest user can see some attached images, but not all (within different topics).


The permissions on the folders have nothing to do with it, since everyone is the same anonymous user to the webserver.

Permissions are setup in Forum Permissions/Advanced View

What is different about the attachments that guests can view? Are they just inline pictures?
User avatar
phpben
Registered User
Posts: 28
Joined: Thu Oct 05, 2006 8:28 pm
Location: Manchester, UK

Post by phpben »

Hi Brf,

When I said:

"All topics are set so that ALL can 'View' and 'Read'. "

This has been set in the Forum Permissions.

All attached images are displayed in full size, i.e. no thumbnails or inline view.

But I still find that when logged out, if I view certain forum topics, the image isn't there (nor is the surrounding table with filename & size).

But once logged in, I can view this attachment as normal.

This doesn't happen with all attachments. In fact, most can be viewed by guest users, but there are some that cannot, and I cannot understand the difference as they've all be attached the same way, i.e. I've not changed anything since applying the attachment MOD.
Post Reply

Return to “[2.0.x] MOD Database Releases”