Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[For 1.8] Table Generator
This is a tweak of the 1.6* mod MyCode Table Generator to enable proper functionality on MyBB 1.8(.1).

You can get it here (pending approval)

Or at Github

If you have smilies removed from beside your post boxes;
in newreply and newthread templates find:

Add this code after it (but before the </td>!)
<br /><!-- TableGenerator -->{$tabgen_button}<!-- /TableGenerator --><br />

Color will vary with your theme, but you get the gist.

Thread approved.
How to add table generator on edit post?
As on edit first post of thread or any post of thread, table generator button is not appearing?
please help.

This plugin is interfer by your code plugin.
As after activation of your code , table generator not working also.
- the pop up windows is kinda weird, you need maximize the window in order to spot the td tr buttons
- the checkboxes are kinda weird, whats the purpose of that
- there should be an "add to post" instead of copying..
- there should be limit of the width % so it doesn't get out of the postbit, "auto"?
Is it possible to insert line breaks in the code output?

As example the Code output is:


I want to show my users the code as such:


I found this in the tablegenerator.js

		var oldValue = $('#container').clone().html().replace(/\r\n|\r|\n/g, '') //new line
													.replace(/\t/g, '') //tab
													.replace(/<td><input type="checkbox"> TH<\/td>/g, '')
													.replace(/<td class="deleteMe"><\/td>/g, '')
													.replace(/<table>/g, '[table='+width+']')
													.replace(/<\/table>/g, '[\/table]')
													.replace(/<tr>/g, '[tr]')
													.replace(/<\/tr>/g, '[\/tr]')
													.replace(/<th>/g, '[th]')
													.replace(/<\/th>/g, '[\/th]')
													.replace(/<td>/g, '[td]')
													.replace(/<\/td>/g, '[\/td]')
													.replace(/<tbody>/g, '')
													.replace(/<\/tbody>/g, '');

Could I insert some /n/n or <br/> there somewhere?
^ of course, you can use \n just like replace(/\r\n|\r|\n/g, '')
(2020-02-15, 03:27 AM).m. Wrote: ^ of course, you can use \n just like replace(/\r\n|\r|\n/g, '')

I tried, but it was not working. Maybe I did something wrong.

What I tried was

.replace(/<\/table>/g, '[\/table]\n\n')
^ oh! sorry.
try it like below [lines 90-97]
.replace(/<table>/g, '[table='+width+']\r\n')
.replace(/<\/table>/g, '[\/table]\r\n')
.replace(/<tr>/g, '[tr]\r\n')
.replace(/<\/tr>/g, '\r\n[\/tr]\r\n')
.replace(/<th>/g, '[th]\r\n')
.replace(/<\/th>/g, '[\/th]\r\n')
.replace(/<td>/g, '[td]')
.replace(/<\/td>/g, '[\/td]')

Forum Jump:

Users browsing this thread: 1 Guest(s)