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

ECP
Registered User
Posts: 24
Joined: Mon Jun 13, 2005 8:32 am

ok help

Post by ECP » Sat Nov 19, 2005 4:58 pm

i b trying to add the attachments mod n my forum for about 3 monts and no ones help me ut please cant some 1 tell me how to do this pleaseeeeeeeeeeeeeeeeeeeee :(

User avatar
Ripper®
Registered User
Posts: 830
Joined: Sun Feb 20, 2005 2:54 am

Post by Ripper® » Sat Nov 19, 2005 5:20 pm

The code changes to PHPBB 2.0.18 were pretty involved and they changed many of the lines around where the attachment mod code is intalled. It is very difficult for the average webmaster to figure out where to put the code in the page to get it to work properly. Some of the suggestions I've seen in this thread are outright security risks. Some have suggested to rollback the installation to 2.0.17 by uploading those files with the mods installed over the current 2.0.18 install. This is a bad idea and invites hacking. This is what I did after several attempts at manually editing the 2.0.18 files without complete success (yes, I got it to work, but it generated many of the errors listed in this thread, even when a successful upload was made. I'm sure that eventually, I'd have found every error, but I didn't have the time to do that with a dozen forums to update).

I had an un-modded copy of 2.0.17 on my hard drive. I installed a fresh, out of the box copy of 2.0.17 on my site, using that copy on my hard drive. I then installed the attachment mod, using the latest download from this thread. Then I updated to 2.0.18. Then I saved those files to my hard drive. Now I have a fresh install of 2.0.18 with the attachment mod installed, on my hard drive, ready to upload for any new forums I add (until 2.0.19 comes out....)

The only problem I've seen so far is I don't get the little paper clip icon to show which posts have attachments. I just noticed that though and haven't had a chance to look into why that's happening. It's not really a big deal for me, but it might be for others. It might be as simple as the line of code got over-written somehow during the security update...

Capmaster
Registered User
Posts: 69
Joined: Tue Jul 05, 2005 1:26 pm

Add-on to the attachment mod

Post by Capmaster » Sat Nov 19, 2005 8:40 pm

I tried downloading ModMaker to submit this, but the ZIP file here is corrupt. Nice going, guys :roll:

Here's a hack/add-on to the Attach mod of my own design that removes the ghey table border and notation around the image. There is a hack that almost does it, here:
http://www.phpbbhacks.com/download/5788

but it leaves the file notation and only removes the border. Mine removes all non-image material.

Sorry, but I can't be bothered to search 786 friggin pages of posts in this topic to see if anyone has already submitted this :D And the search function on this forum is useless as it almost always returns a blank page.

So here it is:
### OPEN #######################

forum/templates/****/viewtopic_attach_body.tpl

#############################
##### FIND ######################

<!-- BEGIN cat_images -->
<div align="center"><hr width="95%" /></div>
<table width="95%" border="1" cellpadding="2" cellspacing="0" class="attachtable" align="center">
<tr>
<td width="100%" colspan="2" class="attachheader" align="center"><b><span class="gen">{postrow.attach.cat_images.DOWNLOAD_NAME}</span></b></td>
</tr>
<tr>
<td width="15%" class="attachrow"><span class="genmed">&nbsp;{L_DESCRIPTION}:</span></td>
<td width="75%" class="attachrow">
<table width="100%" border="0" cellpadding="0" cellspacing="4" align="center">
<tr>
<td class="attachrow"><span class="genmed">{postrow.attach.cat_images.COMMENT}</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" class="attachrow"><span class="genmed">&nbsp;{L_FILESIZE}:</span></td>
<td width="75%" class="attachrow"><span class="genmed">&nbsp;{postrow.attach.cat_images.FILESIZE} {postrow.attach.cat_images.SIZE_VAR}</td>
</tr>
<tr>
<td width="15%" class="attachrow"><span class="genmed">&nbsp;{postrow.attach.cat_images.L_DOWNLOADED_VIEWED}:</span></td>
<td width="75%" class="attachrow"><span class="genmed">&nbsp;{postrow.attach.cat_images.L_DOWNLOAD_COUNT}</span></td>
</tr>
<tr>
<td colspan="2" align="center"><br /><img src="{postrow.attach.cat_images.IMG_SRC}" alt="{postrow.attach.cat_images.DOWNLOAD_NAME}" border="0" /><br /><br /></td>
</tr>
</table>
<div align="center"><hr width="95%" /></div>
<!-- END cat_images -->
<!-- BEGIN cat_thumb_images -->
<div align="center"><hr width="95%" /></div>
<table width="95%" border="1" cellpadding="2" cellspacing="0" class="attachtable" align="center">
<tr>
<td width="100%" colspan="2" class="attachheader" align="center"><b><span class="gen">{postrow.attach.cat_thumb_images.DOWNLOAD_NAME}</span></b></td>
</tr>
<tr>
<td width="15%" class="attachrow"><span class="genmed">&nbsp;{L_DESCRIPTION}:</span></td>
<td width="75%" class="attachrow">
<table width="100%" border="0" cellpadding="0" cellspacing="4" align="center">
<tr>
<td class="attachrow"><span class="genmed">{postrow.attach.cat_thumb_images.COMMENT}</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" class="attachrow"><span class="genmed">&nbsp;{L_FILESIZE}:</span></td>
<td width="75%" class="attachrow"><span class="genmed">&nbsp;{postrow.attach.cat_thumb_images.FILESIZE} {postrow.attach.cat_thumb_images.SIZE_VAR}</td>
</tr>
<tr>
<td width="15%" class="attachrow"><span class="genmed">&nbsp;{postrow.attach.cat_thumb_images.L_DOWNLOADED_VIEWED}:</span></td>
<td width="75%" class="attachrow"><span class="genmed">&nbsp;{postrow.attach.cat_thumb_images.L_DOWNLOAD_COUNT}</span></td>
</tr>
<tr>
<td colspan="2" align="center"><br /><a href="{postrow.attach.cat_thumb_images.IMG_SRC}" target="_blank"><img src="{postrow.attach.cat_thumb_images.IMG_THUMB_SRC}" alt="{postrow.attach.cat_thumb_images.DOWNLOAD_NAME}" border="0" /></a><br /><br /></td>
</tr>
</table>
<div align="center"><hr width="95%" /></div>
<!-- END cat_thumb_images -->
<!-- BEGIN attachrow -->
<div align="center"><hr width="95%" /></div>
<table width="95%" border="1" cellpadding="2" cellspacing="0" class="attachtable" align="center">
<tr>
<td width="100%" colspan="3" class="attachheader" align="center"><b><span class="gen">{postrow.attach.attachrow.DOWNLOAD_NAME}</span></b></td>
</tr>
<tr>
<td width="15%" class="attachrow"><span class="genmed">&nbsp;{L_DESCRIPTION}:</span></td>
<td width="75%" class="attachrow">
<table width="100%" border="0" cellpadding="0" cellspacing="4" align="center">
<tr>
<td class="attachrow"><span class="genmed">{postrow.attach.attachrow.COMMENT}</span></td>
</tr>
</table>
</td>
<td rowspan="4" align="center" width="10%" class="attachrow">{postrow.attach.attachrow.S_UPLOAD_IMAGE}<br /><a href="{postrow.attach.attachrow.U_DOWNLOAD_LINK}" {postrow.attach.attachrow.TARGET_BLANK} class="genmed"><b>{L_DOWNLOAD}</b></a></td>
</tr>
<tr>
<td width="15%" class="attachrow"><span class="genmed">&nbsp;{L_FILENAME}:</span></td>
<td width="75%" class="attachrow"><span class="genmed">&nbsp;{postrow.attach.attachrow.DOWNLOAD_NAME}</span></td>
</tr>
<tr>
<td width="15%" class="attachrow"><span class="genmed">&nbsp;{L_FILESIZE}:</span></td>
<td width="75%" class="attachrow"><span class="genmed">&nbsp;{postrow.attach.attachrow.FILESIZE} {postrow.attach.attachrow.SIZE_VAR}</td>
</tr>
<tr>
<td width="15%" class="attachrow"><span class="genmed">&nbsp;{postrow.attach.attachrow.L_DOWNLOADED_VIEWED}:</span></td>
<td width="75%" class="attachrow"><span class="genmed">&nbsp;{postrow.attach.attachrow.L_DOWNLOAD_COUNT}</span></td>
</tr>
</table>
<div align="center"><hr width="95%" /></div>
<!-- END attachrow -->


#####################################
#### REPLACE WITH ######################

<!-- BEGIN cat_images -->

<table width="5%" border="0" cellpadding="0" cellspacing="0" class="attachtable" align="center">
<tr>
<td width="100%" colspan="0" class="attachheader" align="center"><b><span class="gen"></span></b></td>
</tr>

<tr>
<td colspan="0" align="center"><br /><img src="{postrow.attach.cat_images.IMG_SRC}" alt="{postrow.attach.cat_images.DOWNLOAD_NAME}" border="0" /><br /><br /></td>
</tr>
</table>

<!-- END cat_images -->
<!-- BEGIN cat_thumb_images -->

<table width="5%" border="0" cellpadding="0" cellspacing="0" class="attachtable" align="center">
<tr>
<td width="100%" colspan="0" class="attachheader" align="center"><b><span class="gen"></span></b></td>
</tr>

<tr>
<td colspan="0" align="center"><br /><a href="{postrow.attach.cat_thumb_images.IMG_SRC}" target="_blank"><img src="{postrow.attach.cat_thumb_images.IMG_THUMB_SRC}" alt="{postrow.attach.cat_thumb_images.DOWNLOAD_NAME}" border="0" /></a><br /><br /></td>
</tr>
</table>

<!-- END cat_thumb_images -->
<!-- BEGIN attachrow -->

<table width="5%" border="0" cellpadding="0" cellspacing="0" class="attachtable" align="center">
<tr>
<td width="100%" colspan="3" class="attachheader" align="center"><b><span class="gen"></span></b></td>
</tr>

<td rowspan="4" align="center" width="10%" class="attachrow">{postrow.attach.attachrow.S_UPLOAD_IMAGE}<br /><a href="{postrow.attach.attachrow.U_DOWNLOAD_LINK}" {postrow.attach.attachrow.TARGET_BLANK} class="genmed"><b>{L_DOWNLOAD}</b></a></td>
</tr>

</table>

<!-- END attachrow -->
#
#
########################################

It works with 2.0.14 - 2.0.17 as a minimum. Probably more revs than that but I can't prove it ;)
Image
Some mornings, it's just not worth chewing through the leather straps

stavatars
Registered User
Posts: 30
Joined: Wed Nov 16, 2005 4:31 am

Post by stavatars » Sat Nov 19, 2005 9:56 pm

Thanks, Smasher, but um...I need it for the main forums, not the privmsg.php. It won't attach on the main forums. Like if I was to go into the NEWS forum and go through the steps of attaching a photo, it wouldn't attach. It would just show my words. But if I do the same thing in the private message, it works fine. I need it to work on the main forum. How do I fix this? I really do appreciate you trying to help, but I need it on the main forum.

Missy_
Registered User
Posts: 1
Joined: Sun Nov 20, 2005 3:06 am

Post by Missy_ » Sun Nov 20, 2005 3:19 am

I have instald the attachment mode 3 weeks ago and it has worked perfektly. But today I got this erro: Tried to upload empty file

what can be wrong?

dmseg5
Registered User
Posts: 1
Joined: Sun Nov 20, 2005 3:14 am

Post by dmseg5 » Sun Nov 20, 2005 3:36 am

Followed the given procedure to install this mod, I got an error message
when I run http://mysite/phpbb_path/install/mod_table_inst.php:
"phpBB : Critical Error
Could not connect to the database "
After some research, I found there might be a bug in this php script.
1) line 25: $phpbb_root_path = './../';
--> $phpbb_root_path = '../'; (as my root is the parent folder of install/)
2) line 38: include($phpbb_root_path.'includes/db.'.$phpEx);
--> include_once($phpbb_root_path.'includes/db.'.$phpEx);
(I dno't know why I have to make this change; I got it over the web.)
After fixing these two line, this mod rocks! Thank you, Acyd Burn
FYI, I am running windows xp professional sp2, apache 2.0.54, mysql 4.1.14 and php 5.0.4. I wish this helps. :lol:

stavatars
Registered User
Posts: 30
Joined: Wed Nov 16, 2005 4:31 am

Post by stavatars » Sun Nov 20, 2005 3:43 am

What page did you put that on?

stavatars
Registered User
Posts: 30
Joined: Wed Nov 16, 2005 4:31 am

Post by stavatars » Sun Nov 20, 2005 3:44 am

What page did you put that on?

stavatars
Registered User
Posts: 30
Joined: Wed Nov 16, 2005 4:31 am

Post by stavatars » Sun Nov 20, 2005 3:45 am

What page did you put that on?

User avatar
loco63
Registered User
Posts: 274
Joined: Sat Nov 19, 2005 2:33 pm

error

Post by loco63 » Sun Nov 20, 2005 6:29 am

i feel pretty certain that i have everything uploaded properly. that was step 1.

i moved onto step 2, and ran the /install/mod_table_inst.php when i received this error :

Warning: mysql_connect(): Access denied for user 'loco634'@'10.0.98.51' (using password: NO) in /www/l/loco63/htdocs/forums/db/mysql4.php on line 48

Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in /www/l/loco63/htdocs/forums/db/mysql4.php on line 330

Warning: mysql_errno(): supplied argument is not a valid MySQL-Link resource in /www/l/loco63/htdocs/forums/db/mysql4.php on line 331
phpBB : Critical Error

Could not connect to the database

any idea what could be causing this to occur. i cant seem to get off step 2........lol

masterross
Registered User
Posts: 116
Joined: Thu Apr 03, 2003 7:47 pm

Re: error

Post by masterross » Sun Nov 20, 2005 10:57 am

loco63 wrote: i feel pretty certain that i have everything uploaded properly. that was step 1.

i moved onto step 2, and ran the /install/mod_table_inst.php when i received this error :

Warning: mysql_connect(): Access denied for user 'loco634'@'10.0.98.51' (using password: NO) in /www/l/loco63/htdocs/forums/db/mysql4.php on line 48

Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in /www/l/loco63/htdocs/forums/db/mysql4.php on line 330

Warning: mysql_errno(): supplied argument is not a valid MySQL-Link resource in /www/l/loco63/htdocs/forums/db/mysql4.php on line 331
phpBB : Critical Error

Could not connect to the database

any idea what could be causing this to occur. i cant seem to get off step 2........lol


that is becouse u use MySQL 4.1.x and this script cant connect to MySQL
ADD SQL entries maunally

BR,
Ross

ewwo
Registered User
Posts: 2
Joined: Sun Nov 20, 2005 12:13 pm

Post by ewwo » Sun Nov 20, 2005 12:18 pm

Hi,
I have installed Attachment Mod months ago. Everything was fine. But about 1-2 weeks ago the problem started. When the users try the upload an image, there is an error like this :

Code: Select all

Warning: imagejpeg(): Unable to access /usr/hosts/domains/240/www.hapoli.com/httpdocs/deko/files/thumbs/t_pp_716.jpg in /usr/hosts/domains/240/www.hapoli.com/httpdocs/deko/attach_mod/includes/functions_thumbs.php on line 215

Warning: imagejpeg(): Invalid filename '/usr/hosts/domains/240/www.hapoli.com/httpdocs/deko/files/thumbs/t_pp_716.jpg' in /usr/hosts/domains/240/www.hapoli.com/httpdocs/deko/attach_mod/includes/functions_thumbs.php on line 215

Warning: Cannot modify header information - headers already sent by (output started at /usr/hosts/domains/240/www.hapoli.com/httpdocs/deko/attach_mod/includes/functions_thumbs.php:215) in /usr/hosts/domains/240/www.hapoli.com/httpdocs/deko/includes/page_header.php on line 481

Warning: Cannot modify header information - headers already sent by (output started at /usr/hosts/domains/240/www.hapoli.com/httpdocs/deko/attach_mod/includes/functions_thumbs.php:215) in /usr/hosts/domains/240/www.hapoli.com/httpdocs/deko/includes/page_header.php on line 483

Warning: Cannot modify header information - headers already sent by (output started at /usr/hosts/domains/240/www.hapoli.com/httpdocs/deko/attach_mod/includes/functions_thumbs.php:215) in /usr/hosts/domains/240/www.hapoli.com/httpdocs/deko/includes/page_header.php on line 484
Chmods are true(777).. I Couldn't solve this, and there is no posts like this. Can you help me?

stavatars
Registered User
Posts: 30
Joined: Wed Nov 16, 2005 4:31 am

Post by stavatars » Sun Nov 20, 2005 1:49 pm

Hey, I did what dmseg5 suggested, and I actually got to the page this time! Unfortunately, it says that it has already been installed. Everything failed due to everything already being there. But it doesn't work right. I have the pm's attaching stuff fine. On the forums like on the NEWS forum, nothing attaches. How do I fix this?

majjk99
Registered User
Posts: 238
Joined: Sun Dec 07, 2003 10:36 pm
Location: EU

Re: ok help

Post by majjk99 » Sun Nov 20, 2005 2:14 pm

ECP wrote: i b trying to add the attachments mod n my forum for about 3 monts and no ones help me ut please cant some 1 tell me how to do this pleaseeeeeeeeeeeeeeeeeeeee :(


I noticed you have posted a number of times regarding this... so could you just provide me with the following info; exactly what have you done so far, and exactly what kind of problems has there been.

majjk99
Registered User
Posts: 238
Joined: Sun Dec 07, 2003 10:36 pm
Location: EU

Re: Add-on to the attachment mod

Post by majjk99 » Sun Nov 20, 2005 2:20 pm

Capmaster wrote: I tried downloading ModMaker to submit this, but the ZIP file here is corrupt. Nice going, guys :roll:

Here's a hack/add-on to the Attach mod of my own design that removes the ghey table border and notation around the image. There is a hack that almost does it, here:
http://www.phpbbhacks.com/download/5788

but it leaves the file notation and only removes the border. Mine removes all non-image material.

Sorry, but I can't be bothered to search 786 friggin pages of posts in this topic to see if anyone has already submitted this :D And the search function on this forum is useless as it almost always returns a blank page.

:
:

It works with 2.0.14 - 2.0.17 as a minimum. Probably more revs than that but I can't prove it ;)


do you have it on your forum? if so, could you pm me the link so I can have a look?

Post Reply

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