Jump to content

Recommended Posts

Posted

New Button Now Appends to EVERY codebox...

This button says [ Select Text ]

This button DOES NOT copy to clipboard, however, does instantly select all text within the codebox for you to be able to right click copy or CTRL + C

Thanks

Z3R0

Sample

Posted (edited)

erm..it didnt work for me...

maybe there is some restriction for certain Browser ?

it doesnt copied anything even though i tried click on "Select text" and then i press Ctrl + C

maybe it didnt work for Google Chrome ?

Edited by Emistry
Posted

it's not working atm :) lol it was working 2 seconds ago though

Note: Apparently the forums cache weird crap...

and so does chrome

Wipe your cache... seems to fix the problem

Some CSS Applied

Posted

erm..it didnt work for me...

maybe there is some restriction for certain Browser ?

it doesnt copied anything even though i tried click on "Select text" and then i press Ctrl + C

maybe it didnt work for Google Chrome ?

Works Fine with Google Chrome

maybe your keyboard is crappy~

>__<

Posted

It didn't work because of a bug in the global javascript files, but it has already been fixed.

The WYSIWYG and other AJAX/javascript not working was my fault (post=53142).

The javascript stuff should work again now.

Posted

 [color=#ff0000]test[/color]

Apparently not...

I will take a look at it currently, it's not the easiest engine to work through, since it literally goes through EVERY line by cursor position in order to parse correctly.

Posted (edited)

@KeiKun: yes it's possible, we can change it in the ACP. Each BBCode has this option

Prevent other codes parsing?

- yes prevents parsing other BBCode within

- no WILL make it parse BBCode, and colors will work

But I think in

[/font], [font=courier new,courier,monospace][code][/font], [font=courier new,courier,monospace][sql][/font], [font=courier new,courier,monospace][php][/font], and all those other "code" tags, it should NOT parse more BBCode because
  1. isn't the point that you want to show code, right? not code with markup.
  2. the stuff in "code" tags will already be colored by prettyprint / prettify
  3. if you want to show code with markup, maybe you could use [quote] or

Edited by Brian
Posted

@KeiKun: yes it's possible, we can change it in the ACP. Each BBCode has this option

Prevent other codes parsing? (yes prevents parsing other BBCode within, no will make colors work)

But I think in

[/font], [font=courier new,courier,monospace][code][/font], [font=courier new,courier,monospace][sql][/font], [font=courier new,courier,monospace][php][/font], and all those other "code" tags, it should NOT parse more BBCode because
  1. isn't the point that you want to show code, right? not code with markup.
  2. the stuff i "code" tags will be colored by prettyprint / prettify
  3. if you want to show code with markup, maybe you could use [quote] or

    i almost forgot

    I was looking for the code for [code]

    >__<

    so anyways

    instead of using [code] or [code] if want the code to have color ( like on the old Forum )

    i will use

    ( i don't use Quote for codes~ )

  • Upvote 1
Posted (edited)

On the other forums there were quite many people using bbcode in the codeboxes, e.g. to format any changes in the code.

Using quote tags instead of code tags is a bad idea, because no multiple whitespaces will be shown and you wont be able to read the code easily nor can copy it with the indents.

For the code-tag there could be added another tag that with bbcode parsing enabled, but for the codebox-tag it would require some edits in the php files to make actually a second codebox-like tag possible.

Edited by Toshiro
Posted

uh no it wouldn't be hard... the only reason codebox is currently PHP'ified, is because it includes the new button with javascript... else it's simply a matter of using BBCode Management to add a new code with the <pre class='prettify'>{content}</pre> attributes, and instead, mark it as codebox-tag and allow parsing of other codes... mine only runs through the validator, because it parses the button... Chances are, you are only going to be making MINOR edits with the color change... and thus, I would use "CODE" for that, and since we don't parse a button to code... simply create a NEW BBCode as Code-Tag copy the CODE BBCode Replacement Data and Allow Parsing of Other Codes Found Within...

Posted

Can someone fixed an html code with the codebox ? (because it's ugly !)

Replace

<input value="Select Text" onclick="selectCode(this); return false;" class="select_all_button" type="submit"></input>

With

<input value="Select Text" onclick="selectCode(this); return false;" class="select_all_button" type="submit"/>

Posted

Can someone fixed an html code with the codebox ? (because it's ugly !)

Replace

<input value="Select Text" onclick="selectCode(this); return false;" class="select_all_button" type="submit"></input>

With

<input value="Select Text" onclick="selectCode(this); return false;" class="select_all_button" type="submit"/>

Since the content-type says, this page is a HTML, not XHTML, page, this would lead IE <8 and many other old browser for misshandling the page.

HTML dosnt support self-colsing tags, event HTML5 dosnt (HTML5 re-implements optionaly end-.tags like HTML 3.2..).

So its nicly to see, agree, but not valid :)

Posted

so do I need to modify it or is it fine, I think I did the </input> by mistake, I normally don't ever put those lol

Posted (edited)

@GodLesZ

It's a HTML5 doctype:

<!DOCTYPE html>

HTML5 accept

<input ... >

and

<input ... />

so it's valid :)

Edit: weird html tag in the post...

Edited by KeyWorld
  • Upvote 1
Posted

GodLesZ just tried to point out, that old browsers wont accept self-colsing tags (and all other HTML5 tags :)).

(Don't think evrybody is using a modern browser; many companies still use IE6...)

Posted

GodLesZ just tried to point out, that old browsers wont accept self-colsing tags (and all other HTML5 tags :)).

(Don't think evrybody is using a modern browser; many companies still use IE6...)

As for the HTML5 definition, KeyWorld is right. For some weired reasons my source view showed just a <!DOCTYPE> which isent valid.

As for the lamness of IE (my researches found only problems on IE <8, no other browser), Kenpachi points it out. <3

Posted

Can someone fixed an html code with the codebox ? (because it's ugly !)

Replace

<input value="Select Text" onclick="selectCode(this); return false;" class="select_all_button" type="submit"></input>

With

<input value="Select Text" onclick="selectCode(this); return false;" class="select_all_button" type="submit"/>

Since the content-type says, this page is a HTML, not XHTML, page, this would lead IE <8 and many other old browser for misshandling the page.

HTML dosnt support self-colsing tags, event HTML5 dosnt (HTML5 re-implements optionaly end-.tags like HTML 3.2..).

So its nicly to see, agree, but not valid :D

GodLesZ just tried to point out, that old browsers wont accept self-colsing tags (and all other HTML5 tags :)).

(Don't think evrybody is using a modern browser; many companies still use IE6...)

As KeyWorld said , browsers even IE7 accepts this quite well, :) it doesn't even understand the doctype but it still works :D

see the screenshot 2uyotw7.png

and believe me most IE users are from china ;), and I don't think anyone that knows eA is lazy ? enough to use an old outdated insecure browser ;)

and what about other browsers? IE supports it right? yes you know what I mean lol ;),

Just my opinion

Thanks

Posted

I know I'm developing website for this companies :)

But here, we are on a board with a html5 doctype, and this board sux on IE; so why don't respect standards ? :)

  • Upvote 1
Posted

I don't want to be opinionated, but just for example, see this jQuery bug: jQuery bug ticket #4622.

Self-closing tag's arent a problem directly, but after coming together with a bunch of DOM content, IE may fail sometimes.

I know that from personal experience. :)

Btw, sorry for the off topic. I just wanted to mention it again, since many web developers are traveling around here too.

As for the codebox feature, good job :)

Posted

@admins

Sorry if us posts are considerate like troll or something like this, it's not us intention.

@GodLesZ

You can't compare input with div. The only tags elements that can be self closing in standard are:

<base />
<basefont />
<frame />
<link />
<meta />
<area />
<br />
<col />
<hr />
<img />
<input />
<param />
and maybe others

You can't compare them to "div" that contain inner text (all specify before never contain inner text).

And you have also to know that the doctype here force IE to run the page in strict mode since it don't know the html5 doctype (and the bug isn't related to strict mode on your post - but maybe it bug in strict mode too :)).

  • Upvote 1
Posted

It select perfectly in my computer, no problem.

What's your problem ? Having an error ? What browser do you use ? Do you refresh your cache ?

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...