MyBB Community Forums

Full Version: What's a good way to paste tables from wiki?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
(2017-01-21, 12:28 AM)HLFadmin Wrote: [ -> ]The tables you are trying to copy belong to the wiki. They contain embedded links to their own source material. If all you want to do is fair use, find a suitable screenshot app and post a picture.

If you are willing to put some effort into formatting the basic table, then see this thread for how to set up MyCode.
https://community.mybb.com/thread-99853.html
See post #4 by itsmegogo. I followed the instructions and the attached image is a direct example of how it looks.

You can copy the raw text from the wiki, then put in the MyCode to format the table structure.

You'll probably want to provide attribution for your source material and avoid the potential for infringement.

Thank you.

I read through the thread.

I haven't downloaded the MyCode Table Generator plugin yet.

I just want to make sure I understand first.

After installing the plug-in, what files do I modify to put the regular expression code?

What about the template code?

What's a good way to provide attribution to the source material? I've seen on some forums something that will say "Read more . . ." and provide a link to the source material.
(2017-01-21, 03:38 AM)nuraman00 Wrote: [ -> ]I haven't downloaded the MyCode Table Generator plugin yet.

I just want to make sure I understand first.

After installing the plug-in, what files do I modify to put the regular expression code?

What about the template code?

What's a good way to provide attribution to the source material?  I've seen on some forums something that will say "Read more . . ." and provide a link to the source  material.

I did not install the plugin, I entered the MyCodes listed in post 4 of the thread I pointed to.
I did that in ACP / Configuration / MyCode sidebar menu.
Create the MyCode name add the regexp, and the replacement. There are 4 for the table.

[attachment=38227]

I encourage my forum members to provide a source link for text material.
By providing the source, readers can explore further details.
Plus, it makes it easier to point out the forum member didn't make it up. Big Grin

Edit to add: that plugin is 1.6 and will give you problems trying to install it on 1.8
(2017-01-21, 11:22 AM)HLFadmin Wrote: [ -> ]
(2017-01-21, 03:38 AM)nuraman00 Wrote: [ -> ]I haven't downloaded the MyCode Table Generator plugin yet.

I just want to make sure I understand first.

After installing the plug-in, what files do I modify to put the regular expression code?

What about the template code?

What's a good way to provide attribution to the source material?  I've seen on some forums something that will say "Read more . . ." and provide a link to the source  material.

I did not install the plugin, I entered the MyCodes listed in post 4 of the thread I pointed to.
I did that in ACP / Configuration / MyCode sidebar menu.
Create the MyCode name add the regexp, and the replacement. There are 4 for the table.



I encourage my forum members to provide a source link for text material.
By providing the source, readers can explore further details.
Plus, it makes it easier to point out the forum member didn't make it up. Big Grin

Edit to add: that plugin is 1.6 and will give you problems trying to install it on 1.8

Thank you.

I also encourage citing the source.

I'm just trying to also make it easier to view things within a post.

Even after adding those MyCodes, I still wouldn't be able to paste from wiki, right?

What about from basketball-reference.com?

http://www.basketball-reference.com/leag..._2017.html



Sometimes I want to trim some of the content I paste, especially for long tables.  I might want to remove a column or two, if they're not as important.

So that's why I'm trying to find a way other than using a screen shot app.

I used to be able to do this on vBulletin (paste things from basketball-reference.com or wiki), so I'm trying to find a way here.

I added those MyCodes. It's something I can use in general, even if it's not solving the use case above.

How can I add buttons so that a someone can add a row above/below in a table, or add a column? Or add a cell. Or give the table layout for a m x n table?

Also, I took the sample table code from post # 4 in that thread, and noticed this:

[table=5]

What does the number mean? I noticed if I give a table without the number, then the formatting is messed up.

Making the number required seems like an area where a regular user could mess up when trying to create the table.
If you provide instructions, it is up to the member who creates the post to manage it.

1. Table = #, where # is the percent width of the window the table is in. Table =5 uses 5% of the width, =30 uses 30% of the width. You could change the MyCode replacement string to make it something else, like pixels. Or ignore the argument and make the table a fixed width.

2. Adding buttons to insert a row or column or set up a certain size table is beyond the scope of a MyBB plugin. If I was working with tables like you are, I would grab the text and work with it first in an Office-like spreadsheet application where it's easier to change the shape of the table. Once the cells and content are structured, save the file as a .csv, then open as a text file. Now it's a matter of find/replace to insert the codes in the right places, then select all and paste into the post.

Each table starts and ends with [table] and [/table]
each row begins and ends with [tr] and [/tr] (or [th] and [/th] if header row)
each cell begins and ends with [td] and [/td]

When you're taking content that someone else put together into your own use, there's always some effort involved.
(2017-01-22, 07:01 PM)HLFadmin Wrote: [ -> ]If you provide instructions, it is up to the member who creates the post to manage it.

1. Table = #, where # is the percent width of the window the table is in. Table =5 uses 5% of the width, =30 uses 30% of the width. You could change the MyCode replacement string to make it something else, like pixels. Or ignore the argument and make the table a fixed width.

2. Adding buttons to insert a row or column or set up a certain size table is beyond the scope of a MyBB plugin. If I was working with tables like you are, I would grab the text and work with it first in an Office-like spreadsheet application where it's easier to change the shape of the table. Once the cells and content are structured, save the file as a .csv, then open as a text file. Now it's a matter of find/replace to insert the codes in the right places, then select all and paste into the post.

Each table starts and ends with [table] and [/table]
each row begins and ends with [tr] and [/tr] (or [th] and [/th] if header row)
each cell begins and ends with [td] and [/td]

When you're taking content that someone else put together into your own use, there's always some effort involved.

Saving the content into a spreadsheet in a .csv format, then formatting it into a post might work. That might keep the spacing, which is the most important thing.

Ok, I tried it a little bit.

If I paste into a spreadsheet, remove a column that's not necessary, then use this tool which @.m suggested to generate the MyCodes (using Tab as the item separator), I think it's coming out how I want it.

http://www.textfixer.com/html/csv-convert-table.php

So I think this will work. I'll have to try it a little more, especially for something I want to use (and not just something for testing), but I think this is a reasonable way to make it work. I'll have to try it later for something I actually want to do to see how well it works.

I'm really the only one on the forum that likes doing this, and I always cite the source. I was just trying to find a way to do something I was used to doing on other forum software. So thanks.
Pages: 1 2