Add ReplyNew TopicNew Poll

 bbcode tables?
#
I was looking at old sites I had been a part of the other day and realised that one of my favourite features on zetaboards was the ability to build and style tables using bbcode. I added a few custom bbcodes to my forum to try and approximate it, but it's not nearly as effective/easy to use. Would it be possible to set up a table bbcode functionality in the future?
PM
#
Your best bet is to just enable dohtml and do it that way. The only difference is that you'll have to manually type out the line breaks (<br>)

You'll also be replacing the "[" with "<" and "]" with ">" when using dohtml, but it should work the same way with the exception of line breaks which makes for cleaner codes.
PM
#
I would rather not if I can help it; I've always been taught/read/heard that dohtml is a security risk, and my site has a few thousand accounts on it, so I would prefer not to have that risk if possible. http://files.b1.jcink.com/html/emoticons/tongue.gif
PM
#
QUOTE (CamilleNicole @ May 10 2017, 12:48 AM)
Your best bet is to just enable dohtml and do it that way. The only difference is that you'll have to manually type out the line breaks (<br>)

You'll also be replacing the "[" with "<" and "]" with ">" when using dohtml, but it should work the same way with the exception of line breaks which makes for cleaner codes.


    To be honest, a lot of things on any website are security risks. The whole idea that doHTML is a security risk is ill-founded and, quite frankly, not something you need to worry about. I've always had doHTML enabled and after about 10 years of RPing on IF/Jcink sites collectively, I've never had a problem with it, never seen it, and I've been on hundreds of forums.

    Not to mention Jcink is good at what he does, so I doubt this is an issue.

    But if you need to make bbcode tables you'll have to go with the custom bbcode and just construct it in such a way that people will need a handy, detailed guide to use it. Also make sure to use the comments for it appropriately as per this guide here, otherwise you're going to run into issues: https://jcink.com/main/wiki/jfb-acp-custom_...ng_requirements
PM
#
I'm going to interject here for a moment about doHTML with respect to security. A huge majority are allowing HTML on their forums, not just on our service but many other forums.

We greatly mitigate someone's ability to do something like hijack an account's password hash -- if you have ever looked at document.cookie, the password hash value is set to something called "HTTP Only." This means that it is invisible from JS/html can't see it -- go ahead and try to print it out and you will just draw a blank.

but I need to stress that this does not stop people from doing things like: 1. redirects 2. embedding malicious media 3. other forms of xss. Http Only is also not fool-proof in a sense that if a browser leak or hole is discovered, then that would be very bad. At this point it's quite a mature security feature, however.

Whether you need to worry about enabling HTML in reality is another story. I've yet to hear of a problem from someone's account being jacked via doHTML in all the years running the service.

I'd like to offer a "sanitized" HTML option in the future but that's almost an oxymoron. And it would certainly hinder so many of the creative post templates/designs that I see all the time. Another option is to have a "template storage system" whereby posters keep a set of templates to use and they are approved or denied by the board admins, since sanitized HTML is hell to deal with.

This is straying far from what you have asked though -- can we make a table BBCode? sure, we can look into it! But you could definitely add a table bbc to the system and it would probably work just as well in the meantime, with the exception of if you forget some tag usage it won't be forgiving.

signature
email: admin@jcink.com :: blog: John C.
#
Personally, I'm not a big fan of doHTML (edit: by which I mean enabling doHTML to be used broadly on my own site, not the feature itself, which is really nifty) because the CSS can wreak havoc on the boards. Changing scrollbars, accidentally using classes that are already on my skin, defining things too broadly and messing up the page. A lot of people who make / use doHTML are really talented and bright but some of them forget to think about how the code with react in real world use.

Also, I need everything to match and doHTML sometimes makes that difficult, so I would take my opinion with a grain of salt. Not that I'm trying to argue here, just that I can see why someone wouldn't want doHTML enabled willy-nilly on the board. But, doHTML is a powerful tool that can produce amazing results. My question to you is:

1. How do you want to use these tables? If it's for only staff stuff, then you can always only enable doHTML for certain usergroups, or even just for certain areas.

2. Can we see an example of a table you're trying to create using custom bbCode? It's possible with the amount of people that view this forum that someone might have a way of tackling this problem you haven't had the chance to think up yet.

This post has been edited by owl: May 10 2017, 10:20 PM

signature
user posted image
#
As I said, I already have set up a series of basic table tags as custom bbcodes, but they get wonky depending on spacing sometimes and can be finnicky despite being literally <tr> -> [tr] etc.

The kind of things I mean are like this signature, for a very simplistic example -- other examples I had been looking for are on boards that are now shut down so I'm not able to view them, but the idea is that the tags were very simple to use in terms of spacing especially. The custom bbcodes I have now work, but you must put them all on the same line: [table][tr][td]text[/td][td]text[/td][/tr][/table] in a chunk because hitting the enter key adds blank lines above the table for some reason rather than just allowing it to look more tidy. /shrugs

As for now, they're good enough for staff use, but I'd like tables to be something accessible to regular members without needing to have caveats like 'don't hit enter' or to be troubleshooting so much -- custom bbcodes sometimes swap closing tag positions for some reason in the edit dialog box.

This post has been edited by Rosalieart: May 14 2017, 10:58 PM
PM
#
If I recall correctly, editing a BB code inclusive post has the system translating BB to HTML for the initial post display, and then back to BB, which isn't exactly a clean process. As for the white-space on newline, text input is generally parsed literally. You may be able to use the white-space style applied to the table tag to fix it in the case of 'beautifying' the BB code.

As far as Zeta and Invision Boards go, it seems like they too use doHTML - although I did see a nifty script for ZB that constructed tables through a JQuery interface.

This post has been edited by DustBucket: May 14 2017, 11:40 PM
PM
#
QUOTE (Rosalieart @ May 14 2017, 10:57 PM)
..custom bbcodes sometimes swap closing tag positions for some reason in the edit dialog box.


No arguments here, but just for posterity and if you intent to use custom BBcode for anything else this helps with that issue.

signature
user posted image
#
QUOTE (owl @ May 15 2017, 02:03 AM)
QUOTE (Rosalieart @ May 14 2017, 10:57 PM)
..custom bbcodes sometimes swap closing tag positions for some reason in the edit dialog box.


No arguments here, but just for posterity and if you intent to use custom BBcode for anything else this helps with that issue.

On that point -- it is basically required if you intend to use BBCode nesting or similar with multiple tags.

signature
email: admin@jcink.com :: blog: John C.
#
QUOTE (owl @ May 15 2017, 01:03 AM)
QUOTE (Rosalieart @ May 14 2017, 10:57 PM)
..custom bbcodes sometimes swap closing tag positions for some reason in the edit dialog box.


No arguments here, but just for posterity and if you intent to use custom BBcode for anything else this helps with that issue.

Already have that! bbcode in general sometimes swaps end tags for me where it's used extensively, not sure why or if it's me. /shrug
PM
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
Share this topic:
« Next Oldest | Feature Requests | Next Newest »

Options Add ReplyNew TopicNew Poll