Jump to content

All my products and services are free. All my costs are met by donations I receive from my users. If you enjoy using any of my products, please donate to support me. My bare hosting costs are currently not met so please consider donating by either clicking this text or the Patreon link on the right.

Patreon

Recommended Posts

Posted

Hi everybody,

could someone please explain how I can make a Table with multiple cells and rows when creating a topic or reply.

I tried to use "Special BBCode" ; third symbol on the left when you create a new topic / reply. But I cannot create a simple table with cells and rows like you create in Excel for example.

Can somebody help me out?

Thanks in advance!

GC

Posted

Hi GC

Try the following BBCode (You may need to flick the lightswitch for BBCode mode and enter this manually). It's pretty similar to HTML if you're familiar with that.

[table=Here's Your Table Name][tr][th]Column Header 1[/th][th]Column Header 2[/th][th]Column Header 3[/th][/tr][tr][td=0]Cell 1[/td][td=0]Cell 2[/td][td=0]Cell 3[/td][/tr][/table]

So when I let that fly as actual BBCode here are the results:

Here's Your Table Name
Column Header 1Column Header 2Column Header 3
Cell 1Cell 2Cell 3

In order to alleviate spacing issues I actually had to remove all the carriage returns from the above BBCode, so that's something to be aware of. Also please be warned the IPB has a hard limit as to how many rows a table can have before the whole thing disintegrates into the raw BBCode. It's a pretty high number of rows (not sure the exact number), but don't plan on building anything massive (or else plan on splitting it up into multiple posts)

  • Like 2
Posted

Thank you Nullpointer :)

Would it also be possible to add a small image (icon) inside a table cell?

Could you (or anyone) perhaps show me the BBCode to accomplish this ?

Thanks in advance

GC

Posted

Yep, you'd add an image to a table cell in the same way that you would to any other post:

[table=Here's Your Table Name][tr][th]Column Header 1[/th][th]Column Header 2[/th][th]Column Header 3[/th][/tr][tr][td=0][img=http://www.gameex.info/forums/uploads/av-7172.gif?_r=0][/td][td=0][img=http://www.gameex.info/forums/uploads/av-7172.gif?_r=0][/td][td=0][img=http://www.gameex.info/forums/uploads/av-7172.gif?_r=0][/td][/tr][/table]
Here's Your Table Name
Column Header 1Column Header 2Column Header 3
av-7172.gif?_r=0av-7172.gif?_r=0av-7172.gif?_r=0

Please note that once again I removed all carriage returns from the table BBCode to preserve proper table formatting.

Posted

Hi nullPointer,

Presume you want to create a table with three columns > the table is autostretched. Is it possible to control the width of your table/ columns and backgroundcolour when using BBcode?

Thanks again,

GC

Posted

Not that I know of, but I've not experimented excessively. Remember that BBCode is simply a means to generate raw HTML code behind the scenes, and that HTML tables themselves only take up the amount of space necessary to display the data contained within.

Sure there are width and height table cell attributes available for use within HTML tables, but those attributes are deprecated and considered "bad form" in this day and age, which leads me to believe that they would not be implemented in BBCode. These days the accepted convention is that one should use CSS for all formatting on a web page, and as far as I know there's not a way to explicitly apply CSS styles to BBCode.

I suppose you could try an old trick used to prevent empty HTML table rows from collapsing which would be to use non-breaking spaces - but in this case you would use spaces to control the width of a column (which would also be considered exceedingly bad form in terms of conventions, but hey - when you're working with tinker toys it ain't like you're gonna be constructing the Eiffel Tower).

Long story short - experiment to see if you come up with something acceptable to you. If that still doesn't work, learn to like what you can create. ;)

Posted

Thank you nP

another question:

when creating a new topic > is it possible to add an image to your post which is not a thumbnail but the size of the original image?

Thanks!

GC

Posted

Yes, you simply need to post the image as a link (Using the Image button in the posting controls), rather than as an attachment to the post. When you post an image in this fashion it will display the image in the original dimensions (You'll notice that's what I did in the post above)

This is actually a very good habit to get into in the interest of being a good custodian of the forums. Occasionally IPB gets a bit cross with us when we exceed, or come close to exceeding, our allowable disc space allotment. If you ever attempt to access the forums and get the, "This account has been temporarily suspended" message (I think that's the gist of it), that's usually what's going on.

Posted

Thank you nP. This is helping a lot !

One final question for now: when creating a table with BBCode a default light blue background is shown. Is it possible to remove the backgroundcolor or change it ?

GC

Posted

I wondered the same thing, but I think it's dictated by the default layout of the forum itself (which I'm sure that in turn is controlled by a set of CSS style sheets behind the scenes). So this sort of ties into my previous comment about not being able to explicitly apply CSS styles to BBCode. I'm pretty sure we're locked into one style of table insofar as posting goes.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...