James_A Posted November 1, 2008 Posted November 1, 2008 This question is prompted by the following post: https://forums.lunarsoft.net/index.php?s=&showtopic=2807&view=findpost&p=21465 Is there any way that the Code box can be made narrower before the horizontal scrollbar kicks in? I found the above post quite difficult to read on the 1024 wide (laptop) and 1280 wide (non-widescreen desktop) monitors I use around here, because the whole post (not just the Code box) expands way past my screen edges. - Quote
Administrator Tarun Posted November 1, 2008 Administrator Posted November 1, 2008 I can try to find a fix but it happens on all IP.Board forums, including the official forums. Hopefully it'll be fixed in IP.Board 3 which will be out soon. I have posted in the support section for a resolution since I haven't found anything as of yet. Quote
Administrator Tarun Posted November 1, 2008 Administrator Posted November 1, 2008 This comes from a guide to change the behavior of the codebox bbcode. Note: This is in no way a bug. The codebox tag is intended to work this way. The codebox preserves linebreaks as they are entered, in the event that you have a piece of code that entering a linebreak in the wrong place would cause the code to no longer function. You are, of course, welcome to use this modification, however, it removes intended functionality from your forum. Quote
James_A Posted November 2, 2008 Author Posted November 2, 2008 Thanks for the reply. I wasn't asking that all lines be wrapped, because I fully understand that the purpose of the CODEBOX is to not introduce linebreaks. For very long lines, however, the CODEBOX introduces a horizontal scrollbar as well as a vertical scrollbar (as can be seen in the post I quoted, above). It's just that the board software doesn't add this horizontal scrollbar until the CODEBOX is something like 1600 pixels wide. Since this changes the width of the whole post, it makes the whole post difficult to read, on laptops or anything else with a non-widescreen monitor. For me, a scrollbar appearing after about 800-1000 pixels would be much nicer. I'm not saying that this is a bug, just that it's an inconvenience or a little awkward. Anyway, it seems from your reply that I'm asking for a feature request in the next version of IP.Board rather that a quick-fix to the BBCode. It looks like this is a change to the .php code itself. So thanks for following this up. . Quote
Administrator Tarun Posted November 2, 2008 Administrator Posted November 2, 2008 From what I could tell it was a CSS change and also a change to the template code for the Codebox BBCode. I've told them what I wanted to do so maybe there will be a small correction. I'll keep my eye on it. Quote
Administrator Tarun Posted November 21, 2008 Administrator Posted November 21, 2008 Now that IP.Board 3's alpha is open to the public, check this out James_A: http://ipb3preview.ipslink.com/topic/1854/batch-code-test Quote
James_A Posted November 24, 2008 Author Posted November 24, 2008 Thanks for continuing to follow-up on this subject. I know I asked for it to be smaller, but a code box two lines high by 22 characters wide is not quite what I had in mind! But I get the point -- if the size of the box can now be adjusted, then this allows for it to go right down to the size needed for a mobile (=cell phone). Hm, wonder why it's not making scrollboxes. Is that because it is only two lines high. In other words is the code smart enough to not try drawing a scrollbar when it won't fit? If the boxes are, say 5 lines high, does the vertical scrollbar then appear? Maybe this is because it is still alpha. Quote
Administrator Tarun Posted June 24, 2009 Administrator Posted June 24, 2009 James, this issue is now fixed. We're on IP.Board 3 and the codeboxes have had a huge update. :D Quote
James_A Posted June 26, 2009 Author Posted June 26, 2009 So I see.... Checking on the link I posted (first post) it's certainly a big improvement. However, another bug has surfaced. If you look at the 4th line down to the penultimate line of the codebox, you'll see that there is something wrong with the font colours caused, I think, by the single quote marks. The colour changes from black to green at the first quote mark (line 4) and stays the same until the quote mark on the penultimate line. Is this some kind of smart highlighting that's confused by quote marks? Quote
Administrator Tarun Posted June 26, 2009 Administrator Posted June 26, 2009 Is this some kind of smart highlighting that's confused by quote marks? That is exactly it. Quoting the devs: It uses syntax highlighting <strong>Some HTML</strong> <?php class some_class { public function some_function($foo, $bar) { echo 'look at all the colours!'; } } ?> It tries to guess the type of code you've written, so if you use the codebox for something that's not really code, then it might seem like it's highlighting random words. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.