attachments side by side

For support and discussion related to templates, themes, and imagesets in phpBB 3.0.
Scam Warning
Kaycee
Registered User
Posts: 279
Joined: Tue Aug 10, 2010 6:23 am
Location: Nigeria
Contact:

Re: attachments side by side

Post by Kaycee » Mon Nov 22, 2010 10:28 am

I'm interested in getting this done for my board. I use subsilver2 . I have ask similar question before? Help will be appreciated.

Tony Stark
Registered User
Posts: 516
Joined: Thu Apr 08, 2010 8:22 pm

Re: attachments side by side

Post by Tony Stark » Wed Dec 08, 2010 7:09 pm

no developments on this in over 2 weeks?! WTF?!

User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 50812
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: attachments side by side

Post by stevemaury » Wed Dec 08, 2010 8:23 pm

publicsb has not responded to AdamR's request for a link. The serial hijackings are not helping either. Anyone with an issue should fill out the Support Request Template Generator and advise what style they are using along with what steps they have taken to implement the above solutions and the results, in their own topic.
For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)

Tony Stark
Registered User
Posts: 516
Joined: Thu Apr 08, 2010 8:22 pm

Re: attachments side by side

Post by Tony Stark » Wed Dec 08, 2010 9:20 pm

stevemaury wrote:publicsb has not responded to AdamR's request for a link. The serial hijackings are not helping either. Anyone with an issue should fill out the Support Request Template Generator and advise what style they are using along with what steps they have taken to implement the above solutions and the results, in their own topic.
serial hijackings?! what serial hijackings?!

User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 50812
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: attachments side by side

Post by stevemaury » Wed Dec 08, 2010 11:38 pm

This post was started by D4km4n, and then hijacked, in turn, by Rasputin2010, papayrus, Mrraider, publicsb, Kaycee, and now you. This many people asking what they think are the same question, but may not be, make things very confusing. This is why I made the suggestion above.
For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)

Tony Stark
Registered User
Posts: 516
Joined: Thu Apr 08, 2010 8:22 pm

Re: attachments side by side

Post by Tony Stark » Thu Dec 09, 2010 1:53 am

stevemaury wrote:This post was started by D4km4n, and then hijacked, in turn, by Rasputin2010, papayrus, Mrraider, publicsb, Kaycee, and now you. This many people asking what they think are the same question, but may not be, make things very confusing. This is why I made the suggestion above.
fair enough.

PaulC2K
Registered User
Posts: 41
Joined: Tue Jan 21, 2003 6:53 pm
Location: Manchester, England
Contact:

Re: attachments side by side

Post by PaulC2K » Fri Dec 07, 2012 12:47 am

I couldnt find a solution myself, so i've just had a crack at it and got it working without too much trouble.

I make absolutely no guarantee that its the best solution, but its fairly straight forward, and someone better could quite easily tidy it up if it needs it.

This is for Subsilver 2, which is what most people seem to be asking for

Open viewtopic_body.html

Code: Select all

					<!-- IF postrow.S_HAS_ATTACHMENTS -->
						<br clear="all" /><br />

						<table class="tablebg" width="100%" cellspacing="1">
						<tr>
							<td class="row3"><b class="genmed">{L_ATTACHMENTS}: </b></td>
						</tr>
						<!-- BEGIN attachment -->
							<tr>
								<!-- IF postrow.attachment.S_ROW_COUNT is even --><td class="row2"><!-- ELSE --><td class="row1"><!-- ENDIF -->{postrow.attachment.DISPLAY_ATTACHMENT}</td>
							</tr>
						<!-- END attachment -->
						</table>
					<!-- ENDIF -->
I changed to:

Code: Select all

					<!-- IF postrow.S_HAS_ATTACHMENTS -->
						<br clear="all" /><br />

						<table class="tablebg" width="100%" cellspacing="1">
						<tr>
							<td class="row3"><b class="genmed">{L_ATTACHMENTS}: </b></td>
						</tr>

						<tr>
						  <td>
						<!-- BEGIN attachment -->
						    <table cellspacing="5" style="float:left">
						      <tr>
							  <td class="row2">{postrow.attachment.DISPLAY_ATTACHMENT}</td>
						      </tr>
						    </table>
						<!-- END attachment -->

						    </td>
						  </tr>
						</table>
					<!-- ENDIF -->
That deals with standard attaching and them all being displayed at the end of the post. I assumed this was enough, and was wrong. When they're placed inline, they become a mess. So to counter this, i've made changes to bbcode.html (cant be done on the site ACP editor)

From:

Code: Select all

<!-- BEGIN inline_attachment_open -->
<div class="attachtitle">{L_ATTACHMENT}:</div><div class="attachcontent">
<!-- END inline_attachment_open -->

<!-- BEGIN inline_attachment_close -->
</div>
<!-- END inline_attachment_close -->
To:

Code: Select all

<!-- BEGIN inline_attachment_open -->
<table cellspacing="1" class="tablebg" style="margin-bottom:5px;">
    <tr>
      <td class="row3"><b class="genmed">{L_ATTACHMENT}: </b></td>
	</tr>
    <tr>
      <td class="row2"><div class="attachcontent">
<!-- END inline_attachment_open -->

<!-- BEGIN inline_attachment_close -->
    </td>
	</tr>    
	</table>
<!-- END inline_attachment_close -->
Basically all im doing is putting each attachment into its own table, and then applying a float:left to it, and this is what basically allows them to sit side by side, rather than on separate rows.


- edit -
You can also modify the stylesheet too because the attachment file is missing a top border

Code: Select all

.quotecontent, .attachcontent {
	margin: 0 5px 10px 5px;
	padding: 5px;
	border-color: #A9B8C2;
	border-width: 1px;
	border-style: solid;
	font-weight: normal;
	font-size: 1em;
	line-height: 1.4em;
	font-family: "Lucida Grande", "Trebuchet MS", Helvetica, Arial, sans-serif;
	background-color: #FAFAFA;
	color: #4B5C77;
}
Just change it to border-width: 1px; (as above) and you'll be all set.

Hope this helps someone else.

User avatar
captain_mills
Registered User
Posts: 37
Joined: Mon Oct 25, 2004 6:43 pm
Location: Wyoming
Contact:

Re: attachments side by side

Post by captain_mills » Wed Jan 16, 2013 6:00 am

Sorry to necropost, but I felt it better to find a currently existing thread than create another.

I would like my image attachments to appear horizontal as well, but did not want to play with my code until I verfied what solution worked or worked best. Please help...

The current default lines up image attachments vertically as in my board as is now:
http://www.teachanddiscover.net/boards/ ... ?f=33&t=12

I want them running horizontal as in another board I frequent as it is here:
http://www.scifi-meshes.com/forums/show ... post564105

I see a few different solutions in this thread, and want to make sure of which to use or another before I integrate the possible solution...

Thank you for your help and patience!
CMills
"Equipped with his five senses, man explores the universe around him, and calls the adventure science." - Edwin Hubble

User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 50812
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: attachments side by side

Post by stevemaury » Wed Jan 16, 2013 9:06 pm

stevemaury wrote: Anyone with an issue should fill out the Support Request Template Generator and advise what style they are using along with what steps they have taken to implement the above solutions and the results, in their own topic.
For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)

Locked

Return to “[3.0.x] Styles Support & Discussion”