Possible to put attachments next to each other?

Need some custom code changes to the phpBB core simple enough that you feel doesn't require an extension? Then post your request here so that community members can provide some assistance.

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Post Reply
User avatar
libralion
Registered User
Posts: 345
Joined: Tue May 13, 2003 9:25 am

Possible to put attachments next to each other?

Post by libralion » Sat Mar 03, 2018 7:51 am

Hi everybody,
Is it possible to put image attachments next to each other instead of on top of each other?
I have no idea how to achieve this. Maybe there is a BBcode for it?

Johanna

User avatar
Mick
Support Team Member
Support Team Member
Posts: 20008
Joined: Fri Aug 29, 2008 9:49 am
Location: Cardiff

Re: Possible to put attachments next to each other?

Post by Mick » Sat Mar 03, 2018 7:58 am

There have been several requests for this in the past, have a search. Check out the table BBCode, it *may* do what you want but failing that have a search of the extensions forum and, if you don’t find anything you need you, can make an extension request.
"The more connected we get the more alone we become" - Kyle Broflovski

There are no ‘threads’ in phpBB, they are topics.

User avatar
libralion
Registered User
Posts: 345
Joined: Tue May 13, 2003 9:25 am

Re: Possible to put attachments next to each other?

Post by libralion » Sat Mar 03, 2018 8:14 am

Mick wrote:
Sat Mar 03, 2018 7:58 am
There have been several requests for this in the past, have a search. Check out the table BBCode, it *may* do what you want but failing that have a search of the extensions forum and, if you don’t find anything you need you, can make an extension request.
Mick that doesn't help. I searched the forum and the extensions and can't find anything on it.
Only the possibility to center images, but that doesn't help either.
There must be people that have done this.

Johanna

User avatar
Mick
Support Team Member
Support Team Member
Posts: 20008
Joined: Fri Aug 29, 2008 9:49 am
Location: Cardiff

Re: Possible to put attachments next to each other?

Post by Mick » Sat Mar 03, 2018 8:18 am

Mick wrote:
Sat Mar 03, 2018 7:58 am
if you don’t find anything you need you, can make an extension request
"The more connected we get the more alone we become" - Kyle Broflovski

There are no ‘threads’ in phpBB, they are topics.

v12mike
Registered User
Posts: 232
Joined: Thu Jul 09, 2015 5:03 pm

Re: Possible to put attachments next to each other?

Post by v12mike » Sat Mar 03, 2018 8:36 am

libralion wrote:
Sat Mar 03, 2018 8:14 am
Mick wrote:
Sat Mar 03, 2018 7:58 am
There have been several requests for this in the past, have a search. Check out the table BBCode, it *may* do what you want but failing that have a search of the extensions forum and, if you don’t find anything you need you, can make an extension request.
Mick that doesn't help. I searched the forum and the extensions and can't find anything on it.
Only the possibility to center images, but that doesn't help either.
There must be people that have done this.

Johanna
Is this what you want? https://frenchcarforum.co.uk/forum/view ... 70#p561670

It is just using the table BBCode to put the attachments into a table

Code: Select all

[table]
[tr]
[td][attachment=1]C5 Cup A.PNG[/attachment][/td]
[td][attachment=0]C5 cup B.PNG[/attachment][/td]
[/tr]
[/table]

User avatar
libralion
Registered User
Posts: 345
Joined: Tue May 13, 2003 9:25 am

Re: Possible to put attachments next to each other?

Post by libralion » Sat Mar 03, 2018 8:50 am

v12mike wrote:
Sat Mar 03, 2018 8:36 am
libralion wrote:
Sat Mar 03, 2018 8:14 am
Mick wrote:
Sat Mar 03, 2018 7:58 am
There have been several requests for this in the past, have a search. Check out the table BBCode, it *may* do what you want but failing that have a search of the extensions forum and, if you don’t find anything you need you, can make an extension request.
Mick that doesn't help. I searched the forum and the extensions and can't find anything on it.
Only the possibility to center images, but that doesn't help either.
There must be people that have done this.

Johanna
Is this what you want? https://frenchcarforum.co.uk/forum/view ... 70#p561670

It is just using the table BBCode to put the attachments into a table

Code: Select all

[table]
[tr]
[td]C5 Cup A.PNG[/td]
[td]C5 cup B.PNG[/td]
[/tr]
[/table]
Hi Mike,
Thanks.
Yes that is what I want, but tables aren't good html anymore.
So I need a bbcode with divs I think.

Johanna

User avatar
thecoalman
Community Team Member
Community Team Member
Posts: 2796
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.
Contact:

Re: Possible to put attachments next to each other?

Post by thecoalman » Sat Mar 03, 2018 2:53 pm

I've been meaning to do this on my own forum. This is not a fully tested solution, there may be issues with this.

Around line 550 of styles/prosilver/theme/content.css you'll find :

Code: Select all

.attachbox dd {
	margin-top: 4px;
	padding-top: 4px;
	clear: left;
	border-top: 1px solid transparent;
	overflow-x: auto;
}
Change to:

Code: Select all

.attachbox dd {
	width: XXXpx;
	height: XXXpx;
	margin-top: 4px;
	padding-top: 4px;
	clear: left;
	border-top: 1px solid transparent;
	overflow-x: auto;
}
XXX for the width and the height needs to be set at 8px more than whatever dimensions you have set for the thumbnails.

As I said not fully tested, might be problems.

User avatar
libralion
Registered User
Posts: 345
Joined: Tue May 13, 2003 9:25 am

Re: Possible to put attachments next to each other?

Post by libralion » Sat Mar 03, 2018 4:29 pm

thecoalman wrote:
Sat Mar 03, 2018 2:53 pm
I've been meaning to do this on my own forum. This is not a fully tested solution, there may be issues with this.

Around line 550 of styles/prosilver/theme/content.css you'll find :

Code: Select all

.attachbox dd {
	margin-top: 4px;
	padding-top: 4px;
	clear: left;
	border-top: 1px solid transparent;
	overflow-x: auto;
}
Change to:

Code: Select all

.attachbox dd {
	width: XXXpx;
	height: XXXpx;
	margin-top: 4px;
	padding-top: 4px;
	clear: left;
	border-top: 1px solid transparent;
	overflow-x: auto;
}
XXX for the width and the height needs to be set at 8px more than whatever dimensions you have set for the thumbnails.

As I said not fully tested, might be problems.
Thanks. I will give it a try, but I think a bbcode would be easier.

Johanna

v12mike
Registered User
Posts: 232
Joined: Thu Jul 09, 2015 5:03 pm

Re: Possible to put attachments next to each other?

Post by v12mike » Sun Mar 04, 2018 6:31 am

for the benefit of anyone who might want to try the BBCode table solution, the BBCode definitions that I am using are:

Code: Select all

[table]{TEXT}[/table]
<div style="line-height: 0px;margin-top: 5px;margin-bottom: 5px;"><table style="border-collapse: collapse;">{TEXT}</table></div>

[th]{TEXT}[/th]
<td style="line-height: 100%; border-top: solid gray; border-bottom: solid gray; border-left: thin solid gray; border-right: thin solid gray; padding: 9px;" align=center><b>{TEXT}</b></td>

[tr]{TEXT}[/tr]
<tr>{TEXT}</tr>

[td]{TEXT}[/td]
<td style="line-height: 100%; border-top: thin solid gray; border-bottom: thin solid gray; border-left: thin solid gray; border-right: thin solid gray; padding: 5px;">{TEXT}</td>

User avatar
thecoalman
Community Team Member
Community Team Member
Posts: 2796
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.
Contact:

Re: Possible to put attachments next to each other?

Post by thecoalman » Sun Mar 04, 2018 1:28 pm

A simple bbcode would be something like :

Code: Select all

[imagebox]{TEXT}[/imagebox]
HTML Replacement

Code: Select all

<div style="float:left; height:XXXpx; width:XXXpx">{TEXT}</div>
XXX in the HTML Replacement should be the thumbnail dimensions plus 8 px. You'd just wrap it around each individual image placed inline.

Code: Select all

[imagebox][attachment=0]your_image.jpg[/attachment][/imagebox]
That said you can accomplish same thing by adding a few lines of CSS and skip the bbcode. This has container with the class inline-attachment. Doesn't appear to have any rules so somewhere you would add one.

Code: Select all

.inline-attachment {
    float: left;
}

div.inline-attachment dl.thumbnail {
	width: XXXpx;
	height: XXXpx;
}


User avatar
libralion
Registered User
Posts: 345
Joined: Tue May 13, 2003 9:25 am

Re: Possible to put attachments next to each other?

Post by libralion » Sun Mar 04, 2018 1:58 pm

thecoalman wrote:
Sun Mar 04, 2018 1:28 pm
A simple bbcode would be something like :

Code: Select all

[imagebox]{TEXT}[/imagebox]
HTML Replacement

Code: Select all

<div style="float:left; height:XXXpx; width:XXXpx">{TEXT}</div>
XXX in the HTML Replacement should be the thumbnail dimensions plus 8 px. You'd just wrap it around each individual image placed inline.

Code: Select all

[imagebox]your_image.jpg[/imagebox]
That said you can accomplish same thing by adding a few lines of CSS and skip the bbcode. This has container with the class inline-attachment. Doesn't appear to have any rules so somewhere you would add one.

Code: Select all

.inline-attachment {
    float: left;
}

div.inline-attachment dl.thumbnail {
	width: XXXpx;
	height: XXXpx;
}

I tried that, but that doesn't work. The pics then are half over each other from left to right.
I have the lightbox extension, vse/lightbox, enabled. Maybe it is interfering with that?

Johanna

User avatar
thecoalman
Community Team Member
Community Team Member
Posts: 2796
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.
Contact:

Re: Possible to put attachments next to each other?

Post by thecoalman » Mon Mar 05, 2018 9:44 am

libralion wrote:
Sun Mar 04, 2018 1:58 pm

I tried that, but that doesn't work. The pics then are half over each other from left to right.
I have the lightbox extension, vse/lightbox, enabled. Maybe it is interfering with that?

Johanna
Tried what?

I have minimally tested what I have posted but should work for the thumbnails, it's pretty standard CSS. Possible issues with what I have posted would involve center alignments on say horizontal image that is not XXX width within the container. Another problem is file links. There should not be any problems with overlapping images so it's likely conflict with the mod.

Thumbnails listed horizontally seems like something a lot of people would want so you might want to post a request in the mods topic.

Post Reply

Return to “phpBB Custom Coding”

Who is online

Users browsing this forum: espen83 and 3 guests