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

craigpierce
Registered User
Posts: 70
Joined: Fri Nov 25, 2005 11:14 pm

Post by craigpierce »

babydoll2u wrote: I know that this question must have already been asked, but I can't find it here anywhere so I'm asking again....

Is there ANy way to get rid of the info that shows up on top of the attached image, i.e. image name, how many times it's been viewed, file size, etc etc. I'd really rather that information not show as it just takes something away from the post.

Anyone?


i, too, would like to know how to MOD the way the attachment displays in a post...

thanks in advance for any help!

phantomk
Registered User
Posts: 1039
Joined: Wed Apr 14, 2004 5:32 am
Location: Canada Eh?
Name: Daniel Lee
Contact:

Re: attachements size max?

Post by phantomk »

woooolf wrote: Anyone knows if this mod allows you to set a MAX size for attachements in the admin consol?

I would like to attach very big files, is it possible?

Thanks in advance

The upload of files is limited to the capabilities of php, which is about 2 mb's. Thier is a way to increase this limit, but it requires full access to the server and knowledge of the inter workings of php/apache.

phantomk
Registered User
Posts: 1039
Joined: Wed Apr 14, 2004 5:32 am
Location: Canada Eh?
Name: Daniel Lee
Contact:

Post by phantomk »

You can customized how the information is displayed, ie the tables and such, but as for the location you cannot change it without seriously modifying how the attachment mod works.

Take a look at templates/subSilver/viewtopic_attach_body.tpl, in particular take a look at the cat_thumb_images and cat_images switches inside the file as to what tables that need to be modified.

Here is a cleaner version of viewtopic-attach-body.tpl to help you see what needs to be modified. It also has a few fixes to the spans and such.

Code: Select all

	<!-- BEGIN attach -->
	<br />
	<!-- BEGIN denyrow -->
	<br />
	</span>
	<table width="100%" border="1" cellpadding="2" cellspacing="0" class="attachtable" align="center">
		<tr>
			<td width="100%" class="attachheader" align="center"><b><span class="gen">{postrow.attach.denyrow.L_DENIED}</span></b></td>
		</tr>
	</table>
	<span class="postbody">
	<br />
	<!-- END denyrow -->
	<!-- BEGIN cat_stream -->
	<br />
	</span>
	<table width="100%" border="1" cellpadding="2" cellspacing="0" class="attachtable" align="center">
		<tr>
			<td width="100%" colspan="2" class="attachheader" align="center"><b>{postrow.attach.cat_stream.DOWNLOAD_NAME}</b></td>
		</tr>
		<tr>
			<td width="25%" 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_stream.COMMENT}</span></td>
					</tr>
				</table>
			</td>
		</tr>
		<tr>
			<td width="25%" class="attachrow"><span class="genmed">&nbsp;{L_FILESIZE}:</span></td>
			<td width="75%" class="attachrow"><span class="genmed">&nbsp;{postrow.attach.cat_stream.FILESIZE} {postrow.attach.cat_stream.SIZE_VAR}</span></td>
		</tr>
		<tr>
			<td width="25%" class="attachrow"><span class="genmed">&nbsp;{postrow.attach.cat_stream.L_DOWNLOADED_VIEWED}:</span></td>
			<td width="75%" class="attachrow"><span class="genmed">&nbsp;{postrow.attach.cat_stream.L_DOWNLOAD_COUNT}</span></td>
		</tr>
		<tr>
			<td colspan="2" align="center"><br /><object id="wmp" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,0,0,0" standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject"><param name="FileName" value="{postrow.attach.cat_stream.U_DOWNLOAD_LINK}"><param name="ShowControls" value="1"><param name="ShowDisplay" value="0"><param name="ShowStatusBar" value="1"><param name="AutoSize" value="1"><param name="AutoStart" value="0"><param name="Visible" value="1"><param name="AnimationStart" value="0"><param name="Loop" value="0"><embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/windows95/downloads/contents/wurecommended/s_wufeatured/mediaplayer/default.asp" src="{postrow.attach.cat_stream.U_DOWNLOAD_LINK}" name=MediaPlayer2 showcontrols=1 showdisplay=0 showstatusbar=1 autosize=1 autostart=0 visible=1 animationatstart=0 loop=0></embed></object><br /><br /></td>
		</tr>
	</table>
	<span class="postbody">
	<br />
	<!-- END cat_stream -->
	<!-- BEGIN cat_swf -->
	<br />
	</span>
	<table width="100%" border="1" cellpadding="2" cellspacing="0" class="attachtable" align="center">
		<tr>
			<td width="100%" colspan="2" class="attachheader" align="center"><b>{postrow.attach.cat_swf.DOWNLOAD_NAME}</b></td>
		</tr>
		<tr>
			<td width="25%" 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_swf.COMMENT}</span></td>
					</tr>
				</table>
			</td>
		</tr>
		<tr>
			<td width="25%" class="attachrow"><span class="genmed">&nbsp;{L_FILESIZE}:</span></td>
			<td width="75%" class="attachrow"><span class="genmed">&nbsp;{postrow.attach.cat_swf.FILESIZE} {postrow.attach.cat_swf.SIZE_VAR}</span></td>
		</tr>
		<tr>
			<td width="25%" class="attachrow"><span class="genmed">&nbsp;{postrow.attach.cat_swf.L_DOWNLOADED_VIEWED}:</span></td>
			<td width="75%" class="attachrow"><span class="genmed">&nbsp;{postrow.attach.cat_swf.L_DOWNLOAD_COUNT}</span></td>
		</tr>
		<tr>
			<td colspan="2" align="center"><br /><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="{postrow.attach.cat_swf.WIDTH}" height="{postrow.attach.cat_swf.HEIGHT}"><param name=movie value="{postrow.attach.cat_swf.U_DOWNLOAD_LINK}"><param name=loop value=1><param name=quality value=high><param name=scale value=noborder><param name=wmode value=transparent><param name=bgcolor value=#000000><embed src="{postrow.attach.cat_swf.U_DOWNLOAD_LINK}" loop=1 quality=high scale=noborder wmode=transparent bgcolor=#000000 width="{postrow.attach.cat_swf.WIDTH}" height="{postrow.attach.cat_swf.HEIGHT}" type="application/x-shockwave-flash" pluginspace="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></embed></object><br /><br /></td>
		</tr>
	</table>
	<span class="postbody">
	<br />
	<!-- END cat_swf -->
	<!-- BEGIN cat_images -->
	<br />
	</span>
	<table width="100%" border="1" cellpadding="2" cellspacing="0" class="attachtable" align="center">
		<tr>
			<td width="100%" colspan="2" class="attachheader" align="center"><b>{postrow.attach.cat_images.DOWNLOAD_NAME}</b></td>
		</tr>
		<tr>
			<td width="25%" 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="25%" 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}</span></td>
		</tr>
		<tr>
			<td width="25%" 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>
	<span class="postbody">
	<br />
	<!-- END cat_images -->
	<!-- BEGIN cat_thumb_images -->
	<br />
	</span>
	<table width="100%" border="1" cellpadding="2" cellspacing="0" class="attachtable" align="center">
		<tr>
			<td width="100%" colspan="2" class="attachheader" align="center"><b>{postrow.attach.cat_thumb_images.DOWNLOAD_NAME}</b></td>
		</tr>
		<tr>
			<td width="25%" 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="25%" 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}</span></td>
		</tr>
		<tr>
			<td width="25%" 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>
	<span class="postbody">
	<br />
	<!-- END cat_thumb_images -->
	<!-- BEGIN attachrow -->
	<br />
	</span>
	<table width="100%" border="1" cellpadding="2" cellspacing="0" class="attachtable" align="center">
		<tr>
			<td width="100%" colspan="3" class="attachheader" align="center"><b>{postrow.attach.attachrow.DOWNLOAD_NAME}</b></td>
		</tr>
		<tr>
			<td width="25%" 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="25%" class="attachrow"><span class="genmed">&nbsp;{L_FILENAME}:</span></td>
			<td width="75%" class="attachrow"><span class="genmed">&nbsp;{postrow.attach.attachrow.DOWNLOAD_NAME}</td>
		</tr>
		<tr>
			<td width="25%" 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}</span></td>
		</tr>
		<tr>
			<td width="25%" 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>
	<span class="postbody">
	<br />
	<!-- END attachrow -->
	<!-- END attach -->

nealbo
Registered User
Posts: 29
Joined: Sat Jun 19, 2004 5:07 pm

Post by nealbo »

I have a very odd problem.

I've installed phpbb locally on my PC (fresh install) and everything is working great.

However when I install the attachment mod I get problems.
All database entries are done ok, I get no errors, but when I go into my admin area any attachment mod related section (eg. quota limits, forbidden extensions) doesn't show.

Worst of all When I try and post a message the attachment form isn't there.

And before anyone says - I have put in all the tpls for both the admin panel and the posting page. I've even redone it to make sure.

How do I fix this??

craigpierce
Registered User
Posts: 70
Joined: Fri Nov 25, 2005 11:14 pm

Post by craigpierce »

phantomk wrote: You can customized how the information is displayed, ie the tables and such, but as for the location you cannot change it without seriously modifying how the attachment mod works.......


i deleted the rest of that quote for obvoius reasons...

thanks for that info - i'll check that code out later...

when you say "as for the location you cannot change it", do you mean the location of the attachment, or the location of the quota information? (which was the other question i had - trying to display the quota info somewhere besides the user's profile)

thanks again for that code!

phantomk
Registered User
Posts: 1039
Joined: Wed Apr 14, 2004 5:32 am
Location: Canada Eh?
Name: Daniel Lee
Contact:

Post by phantomk »

@craigpierce :
The location of the attachment. You can position it above or below the post, but you cannot position it within the post itself.

The quota can technically be positioned anywhere you want on any page, you just need to have some php knowledge. Where did you want to put it ?

nealbo
Registered User
Posts: 29
Joined: Sat Jun 19, 2004 5:07 pm

Post by nealbo »

Ok, I have a further problem - it seems that uploadpic mod also wont show up in my admin panel adn the attachment form wont show up. It makes no sense because everything else is visible except these mods?

craigpierce
Registered User
Posts: 70
Joined: Fri Nov 25, 2005 11:14 pm

Post by craigpierce »

phantomk wrote: @craigpierce :
The location of the attachment. You can position it above or below the post, but you cannot position it within the post itself.

The quota can technically be positioned anywhere you want on any page, you just need to have some php knowledge. Where did you want to put it ?


i've put this code in profile_add_body.tpl after the avatar control panel:

Code: Select all

<!-- MOD --> 
<tr> 
      <td colspan="2"><h2>Miscellaneous</h2></td> 
</tr> 
<tr> 
      <td class="row1 one">{L_UPLOAD_QUOTA}:</td> 
      <td class="row2 two">{PERCENT_FULL} - ({UPLOADED} / {QUOTA})&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="{U_UACP}" class="genmed">Attachment Control Panel</a></td> 
</tr> 
<!-- MOD --> 
this way, they can either view their own profile to get the quota info., or they can go into their profiile setup page to see it...and i may think of other places for it later. (one guy on here wants it to be under the user's info. on the viewtopic page)

anyway, i inserted this code, but the output is just:

Upload Quota: - ( / ) Attachment Control Panel

with no actual values.
[/code]

craigpierce
Registered User
Posts: 70
Joined: Fri Nov 25, 2005 11:14 pm

Post by craigpierce »

another question:

maybe the new code for viewtopic_attach_body.tpl addresses this, but i'll ask anyway:

to protect my layout, i have a MOD that resizes images if they are larger than the page, and adds a scroll bar to text that is one really long string of characters, but this MOD seems to ignore that one, at least somewhat.

i added a really big picture, and that picture got resized fine.

then, i uploaded a small pic with a really long description that was all one string of characters, and that broke my layout.

i don't expect you to fix this for me, but maybe you (or someone out there) has run into this already? i doubt that anyone will upload a picture with a description that is one long string of characters - but i want to be able to control everything i can on my forum.

thanks again everyone for the great MOD and all the help!

babydoll2u
Registered User
Posts: 214
Joined: Sun Sep 18, 2005 11:26 pm
Contact:

Post by babydoll2u »

phantomk wrote: You can customized how the information is displayed, ie the tables and such, but as for the location you cannot change it without seriously modifying how the attachment mod works.

Take a look at templates/subSilver/viewtopic_attach_body.tpl, in particular take a look at the cat_thumb_images and cat_images switches inside the file as to what tables that need to be modified.

Here is a cleaner version of viewtopic-attach-body.tpl to help you see what needs to be modified. It also has a few fixes to the spans and such.

Code: Select all

	<!-- BEGIN attach --> 

{edited}
[/quote] 



Ok but my question still stands...how do I get rid of that info so that it doesn't show in our posts... is there a way to make that info go away?  I want the attached image only to show



and thanks to the person who told us how to get rid of those lines around the attached image too!
Never, ever, argue with an idiot. They'll drag you down to their level and beat you with experience

pip_seeker
Registered User
Posts: 1
Joined: Sun Nov 27, 2005 11:34 pm

problem with mod file

Post by pip_seeker »

I think there is a problem with the zip file in post 1 of this thread.

When I download it's only about 70kb in size and when I try to open it there is an error in archive directory.

User avatar
MHobbit
Former Team Member
Posts: 4761
Joined: Thu Mar 18, 2004 5:32 pm
Location: There and Back Again

Post by MHobbit »

To everyone: No, there is not a problem with the ZIP. I've downloaded it myself, and everything works fine. The problem most likely lies on your end of the connection, and/or your file archiving application.
Former phpBB MOD Team member
No private support is offered.
"There’s too many things to get done, and I’m running out of days..."

babydoll2u
Registered User
Posts: 214
Joined: Sun Sep 18, 2005 11:26 pm
Contact:

Post by babydoll2u »

MennoniteHobbit wrote: To everyone: No, there is not a problem with the ZIP. I've downloaded it myself, and everything works fine. The problem most likely lies on your end of the connection, and/or your file archiving application.


I just tried it, and got this message:

Cannot open file: it does not appear to be a valid archive.
If you downloaded this file try downloading the file again.


I've downloaded a few zips today and they worked fine. And this one did when I downloaded it last week... but it's not now. sorry
Never, ever, argue with an idiot. They'll drag you down to their level and beat you with experience

craigpierce
Registered User
Posts: 70
Joined: Fri Nov 25, 2005 11:14 pm

Post by craigpierce »

babydoll2u wrote: ....my question still stands...how do I get rid of that info so that it doesn't show in our posts... is there a way to make that info go away? I want the attached image only to show


i decided to see if could figure this out myself, knowing that i've messed with fourm files before and just uploaded my backup files if i broke something i couldn't fix...

well, i broke viewtopic_attach_body and when i uploaded my backup file, it's still broken!!! then, i tried unzipping the original install files and i uploaded that freshly unzipped viewtopic_attach_body, and the page is still broken!!!

basically, i used to have a centered layout: name of file at the top, then file size/views under that, then the comment, and then the attachment....all of this in some dark grey box.

now i have all that, but in some table with borders and it's all left justified, except the actual atachment, which is centered...and the whole table's bottom gets cut off ...you can only see like half the attachment.

can someone explain why this page is still broken even after i uploaded a brand new, untouched copy? i don't expect you to fix my mistake, but seriously...has anyone else had this happen?!?

babydoll2u
Registered User
Posts: 214
Joined: Sun Sep 18, 2005 11:26 pm
Contact:

Post by babydoll2u »

oh no... I'm so sorry craig :(
Never, ever, argue with an idiot. They'll drag you down to their level and beat you with experience

Post Reply

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