Bitcoin Forum

Other => Meta => Topic started by: ndnh on June 18, 2015, 06:58:00 AM



Title: Bitcointalk BBCode New Feature - The Hobbit Header!
Post by: ndnh on June 18, 2015, 06:58:00 AM
INVALID BBCODE: close of unopened tag in table (2)


Title: Re: Bitcointalk New Feature - The Hobbit Header!
Post by: --Encrypted-- on June 18, 2015, 07:04:46 AM
deleted just to be safe




that looks nice, with an image like that. how did you find this?
is this official feature or what? does theymos know about this?

edit after seeing my post: oh crap

edit again: problem solved. remove the "/" in [../center..] (without the dots). that probably will mess up the text alignment tho...

actually, do the text alignment still works with this on?


Title: Re: Bitcointalk New Feature - The Hobbit Header!
Post by: OmegaStarScream on June 18, 2015, 07:05:58 AM


damn , It's more like a bug don't think it's supposed to look like that , does it ? Also why it's not working for me it's just splitting the sentences "second part" and "first part or header"  ??? ???

EDIT : nevermind , It wasen't working on preview but it really works :o you may wanna post that on New forum so it gets fixed in case they are using the same basic codes of Simple machines


Title: Re: Bitcointalk BBCode New Feature - The Hobbit Header!
Post by: ndnh on June 18, 2015, 07:07:33 AM
he he, please do the experiments within this thread. Don't want to mess up others.

It looks fine when previewed but works in PM too. :)

Edit: There are issues with quoting. I see. Thanks :)


Title: Re: Bitcointalk BBCode New Feature - The Hobbit Header!
Post by: --Encrypted-- on June 18, 2015, 07:08:00 AM
whoa. this might be bad.. I mean look at my post above.. it's a mess!!     :P


Title: Re: Bitcointalk BBCode New Feature - The Hobbit Header!
Post by: ndnh on June 18, 2015, 07:08:54 AM
INVALID BBCODE: close of unopened tag in table (2)


Title: Re: Bitcointalk BBCode New Feature - The Hobbit Header!
Post by: altcoinhosting on June 18, 2015, 07:10:46 AM
I honestly see nothing wrong with the text nor the header... Google chrome on windows 7


Title: Re: Bitcointalk New Feature - The Hobbit Header!
Post by: ndnh on June 18, 2015, 07:16:02 AM
that looks nice, with an image like that. how did you find this?
is this official feature or what? does theymos know about this?

edit after seeing my post: oh crap

LOL :)

I found it accidentally. I had actually updated the entire OP of signature campaign, but when I posted it, it went a mess.  :-\ I reverted it back.
I just removed part by part will I found where it went wrong.

I PM'd theymos and BadBear, you know just in case. But it is not a very relevant issue, assuming we don't mess up the forum with this. ;D
Just an interesting problem with bbcode.



I honestly see nothing wrong with the text nor the header... Google chrome on windows 7

Now, that is weird.. Do you see the bitcoin image above or below? I made the thread neatly so you may not find the difference instantly ???

This is how I see it:
http://i.gyazo.com/52048763a96c0820117297b54e3b5f2f.png


Title: Re: Bitcointalk New Feature - The Hobbit Header!
Post by: GannickusX on June 18, 2015, 07:31:03 AM
that looks nice, with an image like that. how did you find this?
is this official feature or what? does theymos know about this?

edit after seeing my post: oh crap

LOL :)

I found it accidentally. I had actually updated the entire OP of signature campaign, but when I posted it, it went a mess.  :-\ I reverted it back.
I just removed part by part will I found where it went wrong.

I PM'd theymos and BadBear, you know just in case. But it is not a very relevant issue, assuming we don't mess up the forum with this. ;D
Just an interesting problem with bbcode.



I honestly see nothing wrong with the text nor the header... Google chrome on windows 7

Now, that is weird.. Do you see the bitcoin image above or below? I made the thread neatly so you may not find the difference instantly ???

This is how I see it:
http://i.gyazo.com/52048763a96c0820117297b54e3b5f2f.png

ye i use google chrome on windows 8 and i see it like in the image, its gotta be a bug. I dont see how anyone could use it for anything good honestly haha.


Title: Re: Bitcointalk BBCode New Feature - The Hobbit Header!
Post by: altcoinhosting on June 18, 2015, 07:34:36 AM
I was overlooking the hobbit header... Now you've added some big red text and i saw it right away...  ;D


Title: Re: Bitcointalk BBCode New Feature - The Hobbit Header!
Post by: --Encrypted-- on June 18, 2015, 07:40:27 AM
ndnhc, I've found the solution to the quote issue. look at my first post on this topic... I'm just not sure if it will work like it is supposed to  :P


Title: Re: Bitcointalk BBCode New Feature - The Hobbit Header!
Post by: ndnh on June 18, 2015, 09:22:31 AM
I was overlooking the hobbit header... Now you've added some big red text and i saw it right away...  ;D

Yeah, he he :)


ndnhc, I've found the solution to the quote issue. look at my first post on this topic... I'm just not sure if it will work like it is supposed to  :P

Yep, I noticed. Yes, it will work. :)
The [/quote tag should be used before, and it will work fine. There are no issues if the quote is under the reply too. :)


Title: Re: Bitcointalk BBCode New Feature - The Hobbit Header!
Post by: qwk on June 18, 2015, 01:02:10 PM
This is a new bbcode feature, that allows you to make upside down posts.
Seems more like a bug or "hack" with the obsolete table layout of smf.
Anyway, I don't think such a "header" is anything but annoying, cluttering screen estate and it might easily break with the transition to the new forum.
Also, it will be quoted, which is obviously not what a "header" should do.


Title: Re: Bitcointalk BBCode New Feature - The Hobbit Header!
Post by: hilariousandco on June 18, 2015, 02:13:36 PM
INVALID BBCODE: close of unopened tag in table (2)


Title: Re: Bitcointalk BBCode New Feature - The Hobbit Header!
Post by: qwk on June 18, 2015, 02:21:04 PM
As expected people are going to troll and create a nuisance with this
Yes. Hotfix needed to prevent this from spreading.


Title: Re: Bitcointalk BBCode New Feature - The Hobbit Header!
Post by: theymos on June 18, 2015, 04:42:20 PM
Please don't actually do this. It looks terribly messy and exploits invalid HTML that will vary per browser. We will be deleting posts that do this in other threads and banning anyone who does it persistently.

Fixing it seems difficult. It seems like a bug pretty deep in how the bbcode parser works. If anyone knows how to fix it, let me know.


Title: Re: Bitcointalk BBCode New Feature - The Hobbit Header!
Post by: Mitchell on June 18, 2015, 04:49:14 PM
Please don't actually do this. It looks terribly messy and exploits invalid HTML that will vary per browser. We will be deleting posts that do this in other threads and banning anyone who does it persistently.

Fixing it seems difficult. It seems like a bug pretty deep in how the bbcode parser works. If anyone knows how to fix it, let me know.
theymos, I know that the BBCode parser in FluxBB disallows invalid BBCode. Can't you check if there is an option for that in SMF (or if you can make one)? Might be something worth checking out.


Title: Re: Bitcointalk BBCode New Feature - The Hobbit Header!
Post by: tspacepilot on June 18, 2015, 11:11:15 PM
Please don't actually do this. It looks terribly messy and exploits invalid HTML that will vary per browser. We will be deleting posts that do this in other threads and banning anyone who does it persistently.

Fixing it seems difficult. It seems like a bug pretty deep in how the bbcode parser works. If anyone knows how to fix it, let me know.

Does this mean it's okay to keep playing around with it in this thread to see the extent of it?

Also, I doubt it's a bug, to parse a tree all you need is a stack.  If the code isn't a tree then behavior should be undefined.  I agree that turning on some sort of validation to prevent bbcode that's not a tree should be the fix.  FWIW, it would also fix the errant [ quote/] kind of typos that often get stuck into posts.


Title: Re: Bitcointalk BBCode New Feature - The Hobbit Header!
Post by: qwk on June 18, 2015, 11:46:45 PM
It's already being abused to fake posts by other users:
http://i.gyazo.com/80e96196bf4fc39f1b54ad370e23e805.png

We need a hotfix.


Title: Re: Bitcointalk BBCode New Feature - The Hobbit Header!
Post by: theymos on June 19, 2015, 01:45:36 AM
OK, I "fixed" it. Your post will parse to an error message if your table code is seriously messed up like this. Don't freak out if a long post disappears due to this -- it'll all still be there when you go to edit it.

theymos, I know that the BBCode parser in FluxBB disallows invalid BBCode. Can't you check if there is an option for that in SMF (or if you can make one)? Might be something worth checking out.

That's not supported in SMF because:

Also, I doubt it's a bug, to parse a tree all you need is a stack.

SMF's bbcode parser is ad hoc, not using any standard parsing method. It doesn't create an AST, even conceptually. So it's incapable of properly detecting syntax errors.


Title: Re: Bitcointalk BBCode New Feature - The Hobbit Header!
Post by: tspacepilot on June 19, 2015, 05:50:26 AM
^^ Yup, you got him!

OK, I "fixed" it. Your post will parse to an error message if your table code is seriously messed up like this. Don't freak out if a long post disappears due to this -- it'll all still be there when you go to edit it.

theymos, I know that the BBCode parser in FluxBB disallows invalid BBCode. Can't you check if there is an option for that in SMF (or if you can make one)? Might be something worth checking out.

That's not supported in SMF because:

Also, I doubt it's a bug, to parse a tree all you need is a stack.

SMF's bbcode parser is ad hoc, not using any standard parsing method. It doesn't create an AST, even conceptually. So it's incapable of properly detecting syntax errors.

But you figured out some way to find the error in the OP anyway so good job.  And I like that you're using the software to enforce the "rule" not to fuck with the forum layout.  And I think it was a good find by ndnhc---I hope someone tips him for it.


Title: Re: Bitcointalk BBCode New Feature - The Hobbit Header!
Post by: el kaka22 on June 19, 2015, 05:53:51 AM
Code:
[table][tr][td]

This is a new bbcode feature, that allows you to make upside down posts. :)
Adds up an additional area on the top of a post or OP, the content of which comes from the last part of the post. Nicknamed the hobbit header (HH) after ndnhc ;D

The code:
[code][table][tr][td]Second part[/center][hr]First part or header.


Pros:
Fun.
Unique.

Cons:
Could be annoying.
Have to scroll down to find the "Quote" and "Reply" stuff.

Advice:
When you use it, keep the top part short.


[/center]
http://xdecoin.org/img/socials/bitcointalk-2.png   Inventor : Bilbo Baggins  ;D       This is a Hobbit Header!  by ndnhc[/code]
Your post is invalid and when I add [code ] (without the space) it is the real content... Also the new code affects my signature and I need to change to another version :( I won't be affected from payments?


Title: Re: Bitcointalk BBCode New Feature - The Hobbit Header!
Post by: Mitchell on June 19, 2015, 06:13:49 AM
...
SMF's bbcode parser is ad hoc, not using any standard parsing method. It doesn't create an AST, even conceptually. So it's incapable of properly detecting syntax errors.
Man, SMF is seriously fucked up.

Your post is invalid and when I add [code ] (without the space) it is the real content... Also the new code affects my signature and I need to change to another version :( I won't be affected from payments?
It doesn't work anymore as theymos "fixed" the parsing method SMF uses.


Title: Re: Bitcointalk BBCode New Feature - The Hobbit Header!
Post by: Leeroy Jenkins on June 19, 2015, 07:05:32 AM
BBCode sucks. Should stick with copy and paste HTML. BBCode is like for the lazy, non-techy people who think HTML is a programming language. ::)


Title: Re: Bitcointalk BBCode New Feature - The Hobbit Header!
Post by: tspacepilot on June 19, 2015, 04:36:50 PM
BBCode sucks. Should stick with copy and paste HTML. BBCode is like for the lazy, non-techy people who think HTML is a programming language. ::)

It's also for a techy person like me who decides to go ahead and take advantage of, say, bold rather than *bold* in a forum post.

<strong>bold</strong> doesn't work!


Title: Re: Bitcointalk BBCode New Feature - The Hobbit Header!
Post by: Leeroy Jenkins on June 19, 2015, 11:44:04 PM
BBCode sucks. Should stick with copy and paste HTML. BBCode is like for the lazy, non-techy people who think HTML is a programming language. ::)

It's also for a techy person like me who decides to go ahead and take advantage of, say, bold rather than *bold* in a forum post.

<strong>bold</strong> doesn't work!

In that case, I disagree. 7 characters to parse to <b></b> is equivalent to typing <b></b>. You're not getting any advantages there. With *this* at least you don't have to type 7 characters to accomplish the same thing.

In fact, if something like that was used (that didn't take advantage of HTML-like tags), you probably wouldn't see crummy parsing happening anyway. It would be easier to read, too. I'm more partial to Wikipedia's ''' for bold and '' for italic (and ''''' for bold italic) in a forum setting.


Title: Re: Bitcointalk BBCode New Feature - The Hobbit Header!
Post by: tspacepilot on June 20, 2015, 12:16:05 AM
BBCode sucks. Should stick with copy and paste HTML. BBCode is like for the lazy, non-techy people who think HTML is a programming language. ::)

It's also for a techy person like me who decides to go ahead and take advantage of, say, bold rather than *bold* in a forum post.

<strong>bold</strong> doesn't work!

In that case, I disagree. 7 characters to parse to <b></b>  is equivalent to typing <b></b>.
What does this mean?  The parser doesn't care how many characters it has to read.  Maybe you meant to compare [b] to <b>, but <b> is deprecated HTML for mixing presentation (style) with markup (structure), so nowadays we right <strong>.
Quote
You're not getting any advantages there. With *this* at least you don't have to type 7 characters to accomplish the same thing.

In fact, if something like that was used (that didn't take advantage of HTML-like tags), you probably wouldn't see crummy parsing happening anyway. It would be easier to read, too. I'm more partial to Wikipedia's ''' for bold and '' for italic (and ''''' for bold italic) in a forum setting.

You may be right that wikimarkup is easier to type, or more effiecient to type.  But,  and FWIW, I find BBCode more transparent for the casual user..  When I edit wikipedia I have to look up again and again whether the label comes before or after the link, how to do a header, etc.  This is because markup like =, ==, '', is concise but not mnemonic.  On the other hand I never forget [quote][code][url][b][i][u] even when I haven't used them for a long time.


Title: Re: Bitcointalk BBCode New Feature - The Hobbit Header!
Post by: theymos on June 20, 2015, 01:50:17 AM
BBCode is closest to HTML, so it makes the most sense when doing complex things like tables (or any sort of block element like [code], [center], etc.). I prefer markdown or wiki syntax when doing more simple things like emphasis, links, and lists, though. The biggest thing I hate about markdown is that it doesn't work well with newlines; oftentimes you need to separate things by extra newlines (or two spaces after the end of a line) for them to work properly, which is annoying.


Title: Re: Bitcointalk BBCode New Feature - The Hobbit Header!
Post by: tspacepilot on June 20, 2015, 07:22:17 AM
BBCode is closest to HTML, so it makes the most sense when doing complex things like tables (or any sort of block element like [code], [center], etc.). I prefer markdown or wiki syntax when doing more simple things like emphasis, links, and lists, though. The biggest thing I hate about markdown is that it doesn't work well with newlines; oftentimes you need to separate things by extra newlines (or two spaces after the end of a line) for them to work properly, which is annoying.

I, personally, when it comes to markup languages, have had so little need for things like markdown.  I think it's a great idea, but for me, README files are just fine in plain text.  I don't really need them formatted.  When I need something in HTML, I just write HTML.  When I need a document, I just write LaTeX.  When it's anything else, plain text is usually just fine.  Note, I'm not dissing markdown, I just have never really used it apart from github pages.

@Theymos, what's the deal with the newlines?  I've never run into any issue, is it the old \r\n vs \n thing?


Title: Re: Bitcointalk BBCode New Feature - The Hobbit Header!
Post by: theymos on June 20, 2015, 06:50:05 PM
@Theymos, what's the deal with the newlines?  I've never run into any issue, is it the old \r\n vs \n thing?

For example, this:

Code:
Here's a link:
http://google.com

Here's a list:
* a
* b

will evaluate to this in markdown because it requires extra newlines:
Quote
Here's a link:http://google.com

Here's a list:* a* b


Title: Re: Bitcointalk BBCode New Feature - The Hobbit Header!
Post by: tspacepilot on June 21, 2015, 06:46:52 AM
Look at that!  I kinda couldn't believe it but you are right:

This is what I got back.
Code:
<p>Here's a link:
http://google.com</p>

<p>Here's a list:
 * a
 * b</p>

That is stupid I wonder why they did that?  Do you think it's because they were worried about false positives like this:

Code:
When I press shift and the 8 key at the same time my screen prints an
* symbol.  But that is in part because of my keyboard mapping ...

lol.  Like I said, I use LaTeX when I need real formatting for something other the web.


Title: Re: Bitcointalk BBCode New Feature - The Hobbit Header!
Post by: ndnh on June 24, 2015, 06:09:37 AM
He he thanks for fixing it. :)

It messed up the OP of the campaign thread, and it was difficult to find what was causing it. Thanks, it must be kind of difficult to fix that one. :)


Edit: Sorry for the trouble.