MyBB Community Forums

Full Version: How to add Table in MyBB forum post
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I knew Search button come first but i tried alot

I am not much aware with code edit via cpanel 


can someone please help me with how to add table in my forum post 
[table]
[tr]
	[th][/th]
	[th][/th]
	[th][/th]
[/tr]
[tr]
	[td][/td]
	[td][/td]
	[td][/td]
[/tr]
[tr]
	[td][/td]
	[td][/td]
	[td][/td]
[/tr]
[/table]

if possible
or  page editor that accepts BBCode.
you can try using Table Generator plugin
You can also make it with Mycode if you don't want to use a plugin.

Configuration > Mycode > Add new mycode. You need to make 4

Table
\[table\=(.*?)\](.*?)\[/table\]

<table border="0" cellspacing="1" cellpadding="3" class="tborder" style="width:$1%;">$2</table>

Table Header
\[th\](.*?)\[/th\]

<th class="tcat" align="middle"><strong>$1</strong></th>

Table Row
\[tr\](.*?)\[/tr\]

<tr>$1</tr>

Table Data
\[td\](.*?)\[/td\]

<td class="trow1" valign="top" align="center">$1</td>



To use:

This gives the table
[table=NAME] [/table]

This gives a row.
[tr] [/tr]

This gives a header column
[th] [/th]

This gives content
[td] [/td]

Change NAME to suit.



Example:

[table=test]
[tr][th]Vegetable[/th][th]Meat[/th][/tr]
[tr][td]Onion[/td][td]Beef[/td][/tr]
[/table]

[Image: PqOTZId.png]

Just add more sections as needed.

Have fun.

Idea taken from other threads on this forum.
thanks a million, worked perfectly, v1.8.20, with 'yourcode' plugin
Hello community!
I have created a new php site with the name: game.
My idea is to insert the embed scripts in table cells. Is that even possible?

I have installed the plugin from .m.`s post was and used the example of sarisisop to create the table (initially only with 2 cells).
On the game site there are FREE embed scripts that you can insert on your site. As far as I understand, this is completely legal. If this is not the case, please inform me ...
Well, I wanted to insert the embed code into the table cells as in the screenshot - with the result that only the code is displayed and not the game.
https://imgur.com/AiP2OAG

Does my idea make sense at all? Is there another possibility?
The game code:

<div>
<script src="https://cdn.htmlgames.com/embed.js?game=ZumaLegend&amp;&amp;bgcolor=white"></script>
</div>

Possibly click the small picture and a new window opens with the game (target_blank)?
https://imgur.com/urRpbOB

THX for your help!
blongso
(2018-05-01, 01:29 PM)sarisisop Wrote: [ -> ]You can also make it with Mycode if you don't want to use a plugin.

Configuration > Mycode > Add new mycode. You need to make 4

Table
\[table\=(.*?)\](.*?)\[/table\]

<table border="0" cellspacing="1" cellpadding="3" class="tborder" style="width:$1%;">$2</table>

Table Header
\[th\](.*?)\[/th\]

<th class="tcat" align="middle"><strong>$1</strong></th>

Table Row
\[tr\](.*?)\[/tr\]

<tr>$1</tr>

Table Data
\[td\](.*?)\[/td\]

<td class="trow1" valign="top" align="center">$1</td>



To use:

This gives the table
[table=NAME] [/table]

This gives a row.
[tr] [/tr]

This gives a header column
[th] [/th]

This gives content
[td] [/td]

Change NAME to suit.



Example:

[table=test]
[tr][th]Vegetable[/th][th]Meat[/th][/tr]
[tr][td]Onion[/td][td]Beef[/td][/tr]
[/table]

[Image: PqOTZId.png]

Just add more sections as needed.

Have fun.

Idea taken from other threads on this forum.

Here, text alignment is center.
How to keep text align left,center or right?