×
Kunena 5.1.15 Released (27 Oct 2019)

The Kunena team has announce the arrival of Kunena 5.1.15 [K 5.1.15] which is now available for download as a native Joomla extension for J! 3.9.x. This version addresses most of the issues that were discovered in K 5.1 and issues discovered during the development stages of K 5.1.

Question BBcode help/customisation: how to position images left or right?

More
9 years 9 months ago - 9 years 9 months ago #1 by MeaKitty
Yeah, I know there's several threads out there asking about these kinds of questions, and this may just be my sleep deprivation talking but I've been trying to figure out how to get a custom bbcode tag for "Imgleft" and "imgright".

Thought I had it for a moment there but then the information wouldn't parse properly and I was left with a half loaded page. I'm not worried about getting it on a button or anything, I'm more then happy with users typing [ imgleft ] and [ imgright ] without the spaces, I just need to know what coding to put where to make it happen.

Can anyone give me the quick run down on this one? Maybe if I can grasp this then I can add some other coding myself as well, just need a hand looking in the right direction.

Thanks in advance guys.
Last edit: 9 years 9 months ago by sozzled.

Please Log in or Create an account to join the conversation.

More
9 years 9 months ago - 9 years 9 months ago #2 by sozzled
This is a great question, MeaKitty. (I hope you don't mind that I've changed the subject)

In older versions of Kunena, images were positioned inline. Somehow, somewhere along the timeline, someone changed this behaviour and now images are displayed leftmost and on a separate line from the text. For example, (Note: I did not insert any line-breaks in the BBcode):
[img]https://www.kunena.com/components/com_kunena/template/default/images/kunena.logo.png[/img][img]https://www.kunena.com/components/com_kunena/template/default/images/kunena.logo.png[/img]
will appear as ... not side-by-side as you might expect.

I've tried to "outsmart" the BBcode but, I admit, I haven't been able to do this. I, too, would like to see this counter-intuitive behaviour corrected.

If you try to position an image centrally or rightmost, you do this another way:
[center][img]https://www.kunena.com/components/com_kunena/template/default/images/kunena.logo.png[/img][/center]
[right][img]https://www.kunena.com/components/com_kunena/template/default/images/kunena.logo.png[/img][/right]
as shown below: But, if you want to position an image to the left (or right) inline with your text, I haven't figured out how to do that, sorry. :(
Last edit: 9 years 9 months ago by sozzled.

Please Log in or Create an account to join the conversation.

More
9 years 9 months ago #3 by MeaKitty
Ohohoh, I must admit that I am somewhat disappointed. To get a notification that the infamous Sozzled has replied to my post got me all excited, only to see that the one person that's answered almost every other question even close to my own... doesn't actually have the answer I'm after. Lol.

It's fine, I'm actually pleased with the way you changed the title, that makes it much more coherent (I admit, I posted my question at 5am my time, so I tried to make it as coherent as I could. I'm glad you understood what I'm one about).

The solution I tried last night was to add in some extra bbcoding for an [imgleft]/[imgright] tag, with the equivalent html as <img src="imagelink" align="left/right"> but I'm not proficient enough with the coding that would need to be changed in order to create this coding.

My attempt lead me to create the right coding as far as I could see based on previous questions and answers on the forums here, but for some reason when testing it on my live site the page load got to a certain point and then simply found itself unable to parse any further, my joomla site header displayed to the point of my username and then somewhere beyond that it had it's conniption. So I'm not sure if there was something I was missing in my custom code or if it's a hard-wired code somewhere that means it's unable to deal with the additional coding in an image tag?

I'm not actually looking to post two images side by side as in the example you provided, I simply want an image to float left/right with a flow of text around it, if that makes my intentions any clearer? Although I can see how not being able to have side by side images could end up being a problem for my community, as I love to create posts with thumbnail links and to put them all on their own line will make for very long posts.

Perhaps if someone could help us work together to achieve an answer to this, it would be very much appreciated, and I thank you for taking the time to clarify this Sozzled.

Please Log in or Create an account to join the conversation.

More
9 years 9 months ago #4 by sozzled
MeaKitty wrote:

Ohohoh, I must admit that I am somewhat disappointed. To get a notification that the infamous Sozzled has replied to my post got me all excited.

I've had quite the opposite effect on several dozen people whose names I won't mention :whistle:

Please Log in or Create an account to join the conversation.

More
9 years 9 months ago #5 by MeaKitty
Well... I'm just unique and 'special'... you'll get used to it. XD

If you don't mind me asking, what did you mean by "I've tried to "outsmart" the BBcode but, I admit, I haven't been able to do this."? What part of the coding in your opinion disallows this sort of behaviour with images, and what was the result of your messing with it?

"I, too, would like to see this counter-intuitive behaviour corrected." And forgive my small vocabulary but "counter-intuitive"?

Please Log in or Create an account to join the conversation.

More
9 years 9 months ago - 9 years 9 months ago #6 by sozzled
When I wrote "counter-intuitive" I meant "not what you would expect the behaviour to be". Think about it: the HTML <IMG> tags allow for images to be aligned horizontally and - to an extent - vertically and for text to "wrap around" the image display. That's standard HTML and, if you're familiar with the tag there's all those u-beaut' alignment settings. B)

Other forum software BBCode permit the insertion of images into user messages and, to varying degrees, allow users to aligning those images in a similar fashion to good ol', vanilla-flavoured HTML. In other words, you don't need a text book to help you write BBCode with other forums in order to achieve a near-enough-is-good-enough-to-HTML display of images.

But with Kunena's BBCode IMG "tag" there ain't no way you can try to tweak, fudge, twiddle, fiddle or poke the code to let images float left or right of the text! That's what I meant by "I've tried to 'outsmart' the BBCode". I mean, I've attempted exactly what you have attempted:

[ img align=right]<image-URL>[ /img]Text

and the result is

<image>
Text

Does this clarify my remarks better? :)
Last edit: 9 years 9 months ago by sozzled.

Please Log in or Create an account to join the conversation.

More
9 years 9 months ago #7 by adminthptngochoi

Please Log in or Create an account to join the conversation.

More
9 years 6 months ago #8 by marrydavidson101

Please Log in or Create an account to join the conversation.

More
8 years 9 months ago - 8 years 9 months ago #9 by spirituallyinsane

sozzled wrote: But, if you want to position an image to the left (or right) inline with your text, I haven't figured out how to do that, sorry. :(

Meakitty, Sozzled:

I stumbled across this thread while trying to solve the same problem with Kunena 1.6. While working on it, I seem to have found out how to work around this in the BBCode parser. It looks like the BBCode parser supports the style attribute, so you can do text floating like this:
[img style="float:left"]https://www.kunena.com/components/com_kunena/template/default/images/kunena.logo.png[/img]

The text then successfully displays on the same line as the image, although it still aligns with the bottom of the image, as might be expected with inline items.

I don't know if this works in Kunena 1.5, but it's displaying properly in this forum.

EDIT: Looks like I'm deluding myself; the behavior doesn't change with the addition of the style attribute to the BBCode tag. Oh well.
Last edit: 8 years 9 months ago by spirituallyinsane.

Please Log in or Create an account to join the conversation.

  • Not Allowed: to create new topic.
  • Not Allowed: to reply.
  • Not Allowed: to edit your message.
Time to create page: 0.086 seconds