Align image image left and Text next to it

Get help developing custom BBCodes or request one.
Post Reply
User avatar
Hartenheer
Registered User
Posts: 740
Joined: Fri Jan 23, 2015 12:23 pm
Location: The Netherlands
Name: Willem Hartman
Contact:

Align image image left and Text next to it

Post by Hartenheer » Mon Jan 14, 2019 11:31 am

When I upload

Code: Select all

attachment
an image, I want to align it to the left
And the text next to it comes to stand.

Already tried different BBcodes, unfortunately they do not work
Sorry English is not my native language :oops:

User avatar
warmweer
Registered User
Posts: 2012
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Belt ... well actually Belgium

Re: Align image image left and Text next to it

Post by warmweer » Mon Jan 14, 2019 3:50 pm

I'm not sure if it work with attachments but Advanced BBcode Box has a BBcode for wrapping text to the right of an image. If it works you could extract that BBcode.
A bug is a feature that hasn't made it to the manual (yet)

User avatar
mrgoldy
Jr. Extension Validator
Posts: 1040
Joined: Tue Oct 06, 2009 7:34 pm
Location: The Netherlands
Name: Gijs

Re: Align image image left and Text next to it

Post by mrgoldy » Mon Jan 14, 2019 4:38 pm

Alternatively you can make use of phpBB's native classes, which will need two BBCodes.

BBCode usage: [clearfix]{TEXT}[/clearfix]
HTML Replacement: <div class="clearfix">{TEXT}</div>

BBCode usage: [col={NUMBER}]{TEXT}[/col]
HTML Replacement: <div class="column{NUMBER}">{TEXT}</div>

Then you can use in your posts:

Code: Select all

[clearfix][col=1]Left column[/col][col=2]Right column[/col][/clearfix]
Please note: you can only use 1 and 2, more columns are not supported natively.
Result: http://prntscr.com/m737vg
phpBB Studio / ''Proud member of the Studio"

User avatar
Hartenheer
Registered User
Posts: 740
Joined: Fri Jan 23, 2015 12:23 pm
Location: The Netherlands
Name: Willem Hartman
Contact:

Re: Align image image left and Text next to it

Post by Hartenheer » Mon Jan 14, 2019 5:30 pm

It works almost.
The text is placed on the right, but unfortunately not next to the image
Schermafdruk 2019-01-14 18.25.26.png
Sorry English is not my native language :oops:

User avatar
mrgoldy
Jr. Extension Validator
Posts: 1040
Joined: Tue Oct 06, 2009 7:34 pm
Location: The Netherlands
Name: Gijs

Re: Align image image left and Text next to it

Post by mrgoldy » Mon Jan 14, 2019 6:27 pm

The clearfix should not be added twice.
It should wrap around both col=1 and col=2.
[clearfix] [col=1]Left[/col] [col=2]Right[/col] [/clearfix]
phpBB Studio / ''Proud member of the Studio"

User avatar
Hartenheer
Registered User
Posts: 740
Joined: Fri Jan 23, 2015 12:23 pm
Location: The Netherlands
Name: Willem Hartman
Contact:

Re: Align image image left and Text next to it

Post by Hartenheer » Mon Jan 14, 2019 7:55 pm

mrgoldy wrote:
Mon Jan 14, 2019 6:27 pm
The clearfix should not be added twice.
It should wrap around both col=1 and col=2.
[clearfix] [col=1]Left[/col] [col=2]Right[/col] [/clearfix]
[/quote]

A big, many thanks for the help
Sorry English is not my native language :oops:

User avatar
Mick
Support Team Member
Support Team Member
Posts: 21053
Joined: Fri Aug 29, 2008 9:49 am
Location: Watching cricket - definitely

Re: Align image image left and Text next to it

Post by Mick » Tue Jan 15, 2019 2:15 pm

"The more connected we get the more alone we become" - Kyle Broflovski

User avatar
Hartenheer
Registered User
Posts: 740
Joined: Fri Jan 23, 2015 12:23 pm
Location: The Netherlands
Name: Willem Hartman
Contact:

Re: Align image image left and Text next to it

Post by Hartenheer » Tue Jan 15, 2019 3:09 pm

Mick wrote:
Tue Jan 15, 2019 2:15 pm
Wrap text around an image
I tried Mick, but it did not work if you update the image as an attachment.
Only in the img update
Sorry English is not my native language :oops:

User avatar
Lumpy Burgertushie
Registered User
Posts: 66230
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Align image image left and Text next to it

Post by Lumpy Burgertushie » Tue Jan 15, 2019 4:41 pm

Imagehello everyone, this is a test of an image with text
and more text
and more text

that is simply done by using the image bbcode first and then typing the text.

in your post you asked about attachments. you were given a couple of ways to do it . you replied that yes it only works for attachments you wanted images.

you now have both ways and you get to pick which one you want.

by the way, if you place the attachment inline then I believe the tex automatically wraps around the attachment by default.


robert
I am available for custom work on a donation basis. Please send me a PM with your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

OK, so what's the speed of dark?

User avatar
Hartenheer
Registered User
Posts: 740
Joined: Fri Jan 23, 2015 12:23 pm
Location: The Netherlands
Name: Willem Hartman
Contact:

Re: Align image image left and Text next to it

Post by Hartenheer » Wed Jan 16, 2019 6:30 am

Lumpy Burgertushie wrote:
Tue Jan 15, 2019 4:41 pm
Imagehello everyone, this is a test of an image with text
and more text
and more text

that is simply done by using the image bbcode first and then typing the text.

in your post you asked about attachments. you were given a couple of ways to do it . you replied that yes it only works for attachments you wanted images.

you now have both ways and you get to pick which one you want.

by the way, if you place the attachment inline then I believe the tex automatically wraps around the attachment by default.


robert
Schermafdruk 2019-01-16 07.28.52.png
Good Bubble Burgertushie,

I do not know which browser you use, but I see the text just around the image.
Only one sentence.
Sorry English is not my native language :oops:

User avatar
Hartenheer
Registered User
Posts: 740
Joined: Fri Jan 23, 2015 12:23 pm
Location: The Netherlands
Name: Willem Hartman
Contact:

Re: Align image image left and Text next to it

Post by Hartenheer » Thu Jan 17, 2019 9:07 am

Lumpy Burgertushie wrote:
Tue Jan 15, 2019 4:41 pm
Imagehello everyone, this is a test of an image with text
and more text
and more text

that is simply done by using the image bbcode first and then typing the text.

in your post you asked about attachments. you were given a couple of ways to do it . you replied that yes it only works for attachments you wanted images.

you now have both ways and you get to pick which one you want.

by the way, if you place the attachment inline then I believe the tex automatically wraps around the attachment by default.


robert
This is from my other website.
That is how I mean with the instigation of the attachments.

Schermafdruk 2019-01-17 10.00.54.png
Sorry English is not my native language :oops:

Post Reply

Return to “Custom BBCode Development and Requests”