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
Tux_Rules
Registered User
Posts: 958
Joined: Sat Apr 24, 2004 10:48 pm
Location: Afton, Michigan
Contact:

Post by Tux_Rules »

Sukoku wrote: A Bug in the Attachment MOD

I think there is a bug in the attachment MOD. No new unique filename is assigned to each attachment. Any attachment having the same name would be


1) deleted if its counterpart is deleted.
2) more likely to get switched between different threads.



The problem is quite serious in a picture posting forum on which most of the filenames are numbers.


If the 3 digit number is not added (file.zip becomes file_132.zip), then you would not be working with the latest version, to the best of my knowledge.
User avatar
Tux_Rules
Registered User
Posts: 958
Joined: Sat Apr 24, 2004 10:48 pm
Location: Afton, Michigan
Contact:

Post by Tux_Rules »

NITROPOWER wrote: hi guys

ATT acyd byrne

i have installed the attachment mod and the installation worked well. however there is no attachment box seen on the screen and I have checked up whether the attachment mod can be displayed etc and it should be fine but none at all.

what am i doing wrong and can u assist?


First I would check:

Code: Select all

templates/subSilver/posting_body.tpl
for

Code: Select all

{ATTACHBOX}
{POLLBOX}
Needs to look like that, not:

Code: Select all

{ATTACHBOX}{POLLBOX}
If that looks good, then check permissions:
ACP -> Forum Admin -> Permissions for each forum.
User avatar
Tux_Rules
Registered User
Posts: 958
Joined: Sat Apr 24, 2004 10:48 pm
Location: Afton, Michigan
Contact:

Post by Tux_Rules »

erikcw wrote: Hi all,

I keep getting "Tried to upload empty file" when I try to upload a pdf. I know the mod works with pdfs on my system because I've been able to upload others. The file isn't empty. What could be causing this?

Thanks!


Sounds like your either exceeded the quota for upload or the filesize is larger than what the php.ini file allows.
User avatar
Tux_Rules
Registered User
Posts: 958
Joined: Sat Apr 24, 2004 10:48 pm
Location: Afton, Michigan
Contact:

Post by Tux_Rules »

dmatusek wrote: Hi all
I have this problem
Someone hacked my forum, and some post are lost.
when i restore db i must do some errors.
posts are ok, but atachments are doubled.
New post with atachmnets are ok.
how can i fix it ?

Thanks for your help.


Is there a lot of double attach posts? Try to Synchronize Attachments:

ACP -> Attachments -> Synchronize Attachments
User avatar
Tux_Rules
Registered User
Posts: 958
Joined: Sat Apr 24, 2004 10:48 pm
Location: Afton, Michigan
Contact:

Post by Tux_Rules »

matt555 wrote:
Tux_Rules wrote:
matt555 wrote:Would the attachment mod not being correctly updated affect being able to add users? I am unable to add 2 INDEXs to the attachment table when I updated to the latest release. The error message that I get is:

Running :: ALTER TABLE phpbb_attachments ADD INDEX (post_id) -> FAILED -
Access denied for user: 'matt@localhost' to database 'forum'

I have been having this problem since I updated phpbb from 2.0.04 to 2.0.17. Can someone please help me out, as this is for my internship for school. Thank you very much.


Should not affect user additions. When you updated to phpBB 2.0.17, did you run the install/update_to_latest.php? That may be where the trouble is, and have you tried to manually insert the tables via phpmyadmin? And is this a new attach MOD install or an update from a previous version, and if so, what number?


I was upgrading from a 2003 version of the attachment mod, and should have executed update to 221, then update to latest. I also executed the mod_table_inst.php which I just read not to do. Should I delete everything and start fresh? If this is the case, what are the files and directories that I need to get rid of?

Thank you

If you have no other MOD, use can use these pre-mod files:
http://www.tuxrules.com/penguin/viewtopic.php?t=51

My big concern is why you were denied access to the database for those 2 tables, but allowed the rest. Just doensn't make sense.
User avatar
Tux_Rules
Registered User
Posts: 958
Joined: Sat Apr 24, 2004 10:48 pm
Location: Afton, Michigan
Contact:

Re: Attachment over the quota limit is possible.

Post by Tux_Rules »

fluxweed wrote:
Tux_Rules wrote:
fluxweed wrote:I'm sorry if this has been asked and answered. I've tried searching for the posts but I couldn't find them.

This is my problem.

Attachment over the quota limit is possible in some situation.

Suppose a user posts a new message when he's near the quota limit.. he then attaches a file no. 1 in that message and the total is still below quota. (that's fine so far.. ) . Then he attaches file no. 2 , but this file will make it over the quota, however he can attach it no problem!! also file no. 3 no. 4 etc.. no problem at all. as long as it 's in the same message and he hasn't hit submit.

so it seems the quota is checked only for the first attachment in a post.

is this a bug or am i missing something in my installation. ?


What about after hitting submit and are you doing this as admin?


Thanks for your response.

Everything goes through after submit. when I checked the quota, it says 220%..
However, when I try a new post and add another attachment, it is refused this time.

And No, this account I tried is the most basic account, (not a moderator and doesn't belong to any group).

Check the attach_mod/includes/functions_includes.php for the following line as it makes the SQL call for quota's:

Code: Select all

if ($admin_mode == 'user' && !$submit && $mode != 'save')
	{
		// Show the contents
		$sql = 'SELECT quota_limit_id, quota_type FROM ' . QUOTA_TABLE . " 
			WHERE user_id = $user_id";

		if( !($result = $db->sql_query($sql)) )
		{
			message_die(GENERAL_ERROR, 'Unable to get Quota Settings', '', __LINE__, __FILE__, $sql);
		}

		$pm_quota = 0;
		$upload_quota = 0;
		
		if ($row = $db->sql_fetchrow($result))
		{
			do
			{
				if ($row['quota_type'] == QUOTA_UPLOAD_LIMIT)
				{
					$upload_quota = $row['quota_limit_id'];
				}
				else if ($row['quota_type'] == QUOTA_PM_LIMIT)
				{
					$pm_quota = $row['quota_limit_id'];
				}
			}
			while ($row = $db->sql_fetchrow($result));
		}
		else
		{
			// Set Default Quota Limit
			$upload_quota = $attach_config['default_upload_quota'];
			$pm_quota = $attach_config['default_pm_quota'];
		
		}
		$db->sql_freeresult($result);

		$template->assign_vars(array(
			'S_SELECT_UPLOAD_QUOTA'		=> quota_limit_select('user_upload_quota', $upload_quota),
			'S_SELECT_PM_QUOTA'			=> quota_limit_select('user_pm_quota', $pm_quota),
			'L_UPLOAD_QUOTA'			=> $lang['Upload_quota'],
			'L_PM_QUOTA'				=> $lang['Pm_quota'])
		);
	}

	if ($admin_mode == 'user' && $submit && $HTTP_POST_VARS['deleteuser'])
	{
		process_quota_settings($admin_mode, $user_id, QUOTA_UPLOAD_LIMIT, 0);
		process_quota_settings($admin_mode, $user_id, QUOTA_PM_LIMIT, 0);
	}
	else if ($admin_mode == 'user' && $submit && $mode == 'save')
	{
		// Get the contents
		$upload_quota = get_var('user_upload_quota', 0);
		$pm_quota = get_var('user_pm_quota', 0);

		process_quota_settings($admin_mode, $user_id, QUOTA_UPLOAD_LIMIT, $upload_quota);
		process_quota_settings($admin_mode, $user_id, QUOTA_PM_LIMIT, $pm_quota);
	}
Also check the database and see if the values are correct.
lifedeuce
Registered User
Posts: 116
Joined: Fri Jan 28, 2005 10:27 pm

Post by lifedeuce »

Has anyone else had trouble previewing their posts since uploading the attachment mod? My users and I can not preview any posts now, help please!!!
Steve F
Registered User
Posts: 55
Joined: Sat Jul 30, 2005 8:51 pm
Location: USA

Post by Steve F »

I'm running phpbb2.0.17 on php4.4.0 with mssql sql2k on a w2k3. I had to make one small change in the MOD install.txt script where easyMOD was doing a FIND on unset($delete_type)<cr>} where the closing brace after the new line isn't there on 2.0.17 . Other than that I've had no problems and my Preview Post works the same as on a non-modded board. This includes Previewing a Post with an attachment.
mickal555
Registered User
Posts: 102
Joined: Sat Apr 09, 2005 4:52 am
Contact:

Post by mickal555 »

Hi I just installed the atach mod and I get this:
Fatal error: Call to undefined function: attach_setup_basic_auth() in /home/usgqedbx/public_html/Forum/includes/auth.php on line 111


I have uploaded all the files...
If this writing is blue you're going too fast!
Element CollectionsNewest additions: Bismuth and bismuth crystal making
My Forum!
crazy4sims
Registered User
Posts: 18
Joined: Wed Jun 15, 2005 2:07 pm

Post by crazy4sims »

is it easymod compatible?
Sim_thumb
Registered User
Posts: 1
Joined: Sat Sep 10, 2005 7:30 pm

Post by Sim_thumb »

I have to install the eXtreme mod, so does it work with that? And also...do I have to edit all 30 files all over again? :cry: I did it before, but do I have to do it every time I upgrade?
crownroyal
I've Been Banned!
Posts: 187
Joined: Fri Mar 18, 2005 12:35 am

File attachment Mod issue

Post by crownroyal »

Hi there, can someone please help me. Everything works perfectly accept for one thing. When I create a new topic and add the attachment i can see it in preview before submittting it within the post. But when I submit the post with attachment, i can not see the attachment within the post or on the download page which shows all attachment in alphabetically order.

Also, I can see the attachment in the control panel of admin. My only problem is the that I can not see it with the post of submision.


Can someone please help me ?


Thanks In Advance
cold_illusion
Registered User
Posts: 5
Joined: Sat Sep 10, 2005 12:42 am

Post by cold_illusion »

yeah, i just got the same problem as him! please help!
forex4u
Registered User
Posts: 22
Joined: Sun Aug 28, 2005 2:22 am

privmsg.php

Post by forex4u »

Steve F wrote: I'm running phpbb2.0.17 on php4.4.0 with mssql sql2k on a w2k3. I had to make one small change in the MOD install.txt script where easyMOD was doing a FIND on unset($delete_type)<cr>} where the closing brace after the new line isn't there on 2.0.17 . Other than that I've had no problems and my Preview Post works the same as on a non-modded board. This includes Previewing a Post with an attachment.


I've noticed the same thing regarding the missing brace and have found that I have to manually delete private message attachments from the control panel even after having deleted the private message itself. I don't know wehther this file is related to this, or whether this is just a feature of the system.

Here are the current instructions for privmsg.php

#
#-----[ FIND ]---------------------------------------------
# around line 742
unset($delete_type);
}

#
#-----[ AFTER, ADD ]---------------------------------------
# the Line have to be added AFTER the closing brace
$attachment_mod['pm']->delete_all_pm_attachments($mark_list)


This is how the file is in 2.0.17:

unset($delete_type);

if ( count($mark_list) )
{

Thanks.
Last edited by forex4u on Sun Sep 11, 2005 7:58 pm, edited 2 times in total.
Sukoku
Registered User
Posts: 2
Joined: Tue Sep 06, 2005 9:26 am

Post by Sukoku »

Tux_Rules wrote:
Sukoku wrote:A Bug in the Attachment MOD

I think there is a bug in the attachment MOD. No new unique filename is assigned to each attachment. Any attachment having the same name would be


1) deleted if its counterpart is deleted.
2) more likely to get switched between different threads.



The problem is quite serious in a picture posting forum on which most of the filenames are numbers.


If the 3 digit number is not added (file.zip becomes file_132.zip), then you would not be working with the latest version, to the best of my knowledge.


I found that I was wrong in saying that no unique filename is assigned to new attachments. I have installed your premod version and didn't find any evidences that image are switched.

But on a phpBB forum I know of, images are switched if they share the same filename.

Any ideas?
Post Reply

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