3.1.x Extensions Database 3.1 / 3.2[RC] Tables bbCode

<span class="qte-attr qte_31_32-qte">3.1.x &amp; 3.2.x</span>
User avatar

Puchahawa
Users
Users
Posts: 193
Joined: 20 Jun 2015, 17:58
    Windows 7 Chrome

Re: Tables bbCodes

Post by Puchahawa »

Thanks Sniper.

User avatar

proavia
Users
Users
Posts: 65
Joined: 30 Aug 2015, 22:50
    Windows 7 Internet Explorer

Re: Tables bbCodes

Post by proavia »

Thanks for updating this Sniper. :w00t:

A few questions..... :question: :question: :question:

How can I change the background color of the table or cell?
How can I change the border color or eliminate the border entirely?
Does this now work with ABBC 3.1.3 - should I should see a Tables image in the WYSIWYG editor? I do see "Tables" shows when ABBC is disabled.

I did try comparing the older version with this new version, but I'm not real good at coding so couldn't figure out what to change. :yikes:

TIA for any assistance!

User avatar

Topic Author
Sniper_E
VIP
VIP
Posts: 1160
Joined: 14 Oct 2014, 19:01
    Windows 10 Firefox

Re: Tables bbCodes

Post by Sniper_E »

The thing is... I made a tables mod way back in the day. We had subsilver2 at the time.
So when I started this I made the tables just like the subsilver2 tables, just like before.

Then I threw that away and coded the templates to be style dependent with prosilver tables.
If you look at your memberlist page on your style you can see what these tables will look like.

The background colors are set by row. First [tr] row is bg2 next row bg1 next row bg2 and so on...
The hover will change the row's background color just like the prosilver tables. Style dependent.

The [td] does not set the background colors like the subsilver2 tables did. The [tr] sets the background now.
You would have to rewrite the templates completely to make that happen. This is for prosilver now.

Check this post out for ABBC 3.1.3 - [RC] Tables bbCode - Puchahawa added the event file.
vse_abbc3_posting_editor_buttons_custom_tags_before.html

Version 2.0.1 has that template for ABBC 3.1.3 in it already if you want that. Tables_2.0.1.zip
Image
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!™

User avatar

proavia
Users
Users
Posts: 65
Joined: 30 Aug 2015, 22:50
    Windows 7 Internet Explorer

Re: Tables bbCodes

Post by proavia »

Thanks for the prompt reply!
Oh - okay. I was hoping it was something simple to tweak.

In the previous version you suggested this:
Sniper_E wrote: 19 Feb 2016, 23:45 The way to make each cell the color you choose on the fly would be to remove the class in the bbcode and replace it with a style="background: {COLOR}"

So instead of using "row1" or "row2" in your line you would use "red" or "#AA0000"
which worked great for my needs. I still have the old version and can go back to it if needed.

If I only needed one or two background colors, could I add a "bg4" and "bg5" in prosilver\theme\colours.css?

User avatar

Topic Author
Sniper_E
VIP
VIP
Posts: 1160
Joined: 14 Oct 2014, 19:01
    Windows 10 Firefox

Re: Tables bbCodes

Post by Sniper_E »

Yes you can add bg4 and bg5 classes in the tables.css file if you want. It will work there without messing with the colours.css
You could adjust the bbcodes in this copy to make it work like the old one. The [td] can have the class and the [th] can not.

BBCode usage [td={NUMBER}]{TEXT}[/td] HTML replacement <td style="background: #{NUMBER}">{TEXT}</td>
BBCode usage [tr]{TEXT}[/tr] HTML replacement <tr>{TEXT}</tr>

Then your [td=] will control the background color using [td=AA0000] to make the background red.
I would have to look at the old one from January to see how it was put together to make this one work that way.

Grab the new copy and see if you can adjust the bbcodes to work the way you want it. I'll help you out with that.

User avatar

proavia
Users
Users
Posts: 65
Joined: 30 Aug 2015, 22:50
    Android Chrome

Re: Tables bbCodes

Post by proavia »

Thanks!

I'll look into it tomorrow - well, later today. It's about 12:30am and I'm in need of some sleep. :shock:

[ Post made via Android ] Image

User avatar

Anuj Dhawan
Users
Users
Posts: 109
Joined: 31 Aug 2015, 10:32
    Windows 7 Chrome

Re: Tables bbCodes

Post by Anuj Dhawan »

Hi,

What controls the width of the table or cell?

For example, please see this:

Table width.png

The right side, for a small table, is left blank. Would not it look good if the text in third column spread across the empty area shown by red-color rectangle?

There is another caveat, please see the below screen shot:

Table width 1.png

When the text size in column goes beyond a limit, the table looks distorted.

Said all that - nonetheless, thanks for your hard work Sniper_E on this. :buigen:
You do not have the required permissions to view the files attached to this post! Maybe your post count is too low.

User avatar

alfi0815
Users
Users
Posts: 120
Joined: 06 Jun 2015, 12:41
    Windows 10 Opera

Re: Tables bbCodes

Post by alfi0815 »

@Sniper_E
in your new version 2.0.1 is an error?
You have : " vse_abbc3_posting_editot_buttons_custom_tags_before.html.html"
This is probably html too much !?

User avatar

Topic Author
Sniper_E
VIP
VIP
Posts: 1160
Joined: 14 Oct 2014, 19:01
    Windows 10 Firefox

Re: Tables bbCodes

Post by Sniper_E »

Anuj Dhawan wrote: 15 Sep 2016, 11:48What controls the width of the table or cell?
Image
The right side, for a small table, is left blank. Would not it look good if the text in third column spread across the empty area shown by red-color rectangle?
Try this code below. The [table= 98] controls the width of the table. Note: Anything more than 98% width seems to run off the page.

Code: Select all

[size=150]Status Code[/size][table=98][thead][tr=null][th=15]Status Code[/th][th=10]Hex[/th][th=75]Discription[/th][/tr][/thead][tbody][tr=bg2][td]40[/td][td]Hex[/td][td]This is just an example. Repeat 1 - This is just an example. Repeat 2 - This is just an example.[/td][/tr][/tbody][/table]
The [th= 15], [th= 10] and [th= 75] set the width of each column. All the [th= %] need to add up to 100% as they do in the above code.
That is about it as far as the rules of creating a table goes. Always do a Preview and adjust as needed before you Submit your table.

Look At This Example
Anuj Dhawan wrote: 15 Sep 2016, 11:48When the text size in column goes beyond a limit, the table looks distorted.
Then don't run the text size beyond the limit. You are creating your table, control the results by Previewing it first.

User avatar

Puchahawa
Users
Users
Posts: 193
Joined: 20 Jun 2015, 17:58
    Windows 7 Chrome

Re: Tables bbCodes

Post by Puchahawa »

alfi0815 wrote: 15 Sep 2016, 12:20 @Sniper_E
in your new version 2.0.1 is an error?
You have : " vse_abbc3_posting_editot_buttons_custom_tags_before.html.html"
This is probably html too much !?
your right. Just remove the .html in the name of the file. Likely a copy paste error as I added the .html to my comment and it wasn't really necessary. :whistl:

User avatar

Topic Author
Sniper_E
VIP
VIP
Posts: 1160
Joined: 14 Oct 2014, 19:01
    Windows 10 Firefox

Re: Tables bbCodes

Post by Sniper_E »

For you man for helping me out... A nice change to your abbc3 - I have an image and another template for that.

I installed abbc3 and have an update for that setup with an image instead of that ugly button.
abbc3_tables.zip
Over write your files with these and you are good.

I kept the vse_abbc3_posting_editor_buttons_custom_tags_before.html in the events/
I like the position of it there better. But that's up to you where you like it.
You do not have the required permissions to view the files attached to this post! Maybe your post count is too low.

User avatar

Puchahawa
Users
Users
Posts: 193
Joined: 20 Jun 2015, 17:58
    Windows 7 Chrome

Re: Tables bbCodes

Post by Puchahawa »

That's totally sweet. Thanks Sniper! :eusa_dance: :dance:

User avatar

Topic Author
Sniper_E
VIP
VIP
Posts: 1160
Joined: 14 Oct 2014, 19:01
    Windows 10 Firefox

Re: Tables bbCodes

Post by Sniper_E »

Tables Extension Update: Version 2.0.2

First post updated. abbc3 and posting buttons can now show image icon.
Please see if you see any of the previous problems you pointed out.

And thanks for the testing!

Update Instructions: You can update by deleting the files on your test server, copy these new files over in that place and clear board cache. No need to disable extension and delete data.

User avatar

Topic Author
Sniper_E
VIP
VIP
Posts: 1160
Joined: 14 Oct 2014, 19:01
    Windows 10 Firefox

Re: Tables bbCodes

Post by Sniper_E »

Posting Buttons w/Image

tables_posting_buttons.gif

In the ext/dmzx/postingbuttons/styles/prosilver/template/event/posting_editor_buttons_before.html

This line pulls in the button2 because of the <!-- EVENT posting_editor_buttons_custom_tags_before -->

It will pull in the image if that was renamed... <!-- EVENT posting_editor_posting_buttons_custom_tags_before -->

I'm thinking Posting Buttons need it's own EVENT name for it's extension. Just like abbc3 has.
You can not change the button used in there without changing the posting page at the same time.

Having the posting buttons disabled it look bad with an image in with all of the button2 buttons in the posting page.
You do not have the required permissions to view the files attached to this post! Maybe your post count is too low.

User avatar

Puchahawa
Users
Users
Posts: 193
Joined: 20 Jun 2015, 17:58
    Windows 7 Chrome

Re: Tables bbCodes

Post by Puchahawa »

One thing I noticed playing with this is, the button doesn't show up if abbc3 is version 3.1.1. I had one test board that was fresh install running abbc3 3.1.3 and it went fine. Tried on the other out of curiosity and no show. Upgraded abbc3 to 3.1.3 and wala there it is :rolling:

Post Reply Previous topicNext topic