Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted April 24, 200718 yr when we post code on the forum its usually because we want to avoid ipb's parser but mostly because it actually has code inside it. Usually we'd refer to a part of that code and i thought a simple but good addition would be to have line numbers for code inside code boxes as it'd make things much more efficient and its a easy implementation. I know people saying that oh "what if i wanna copy code" well i'd suggest having the line numbers and code in separate divs so you can copy the code without getting the line numbers.
April 24, 200718 yr As you mentioned the problem is with copying and pasting code. If you want to add line numbers, why not just add them yourself? Like this?1 <?php 2 print "my useless code"; 3 ?>
April 25, 200718 yr cus that way you would copy numbers, my solution to that is having the numbers in a separate div to the code.
April 25, 200718 yr It doesn't matter if it's in another div box or not, you still copy from left to right.
April 25, 200718 yr of course it matters. You have one div with the numbers in it set to float left. then another div with the code set to float right. dunno if theres a better way but this works and you can just copy the code without having to worry about line numbers. from left to right or right to left, whatever suits ya.
Archived
This topic is now archived and is closed to further replies.