The new [php] code

We know you have an opinion on how things should be run around here. These are suggestions for the forums, and the website.This forum is not a place to ask for suggestions to your own coding (or otherwise) problems.

Moderator: General Moderators

timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

That's not what i meant :) I was suggesting to replace the syntax code with the one from the

Code: Select all

-tags. Instead of only matching

Code: Select all

it would now have to match [syntax=([^\]])] instead...
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

There is still something broken...

At viewtopic.php?p=254961 my code breaks when i wrap it in the syntax=php tags (so i wrapped it in php tags).
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Post by Christopher »

I'd like to request turning off the line numbers. They ruin the ability to easily copy code from the thread listing (yeah you can click on QUOTE and then copy) because the line numbers end up in the code. I don't see that they are used that often or effectively to refer to code.
(#10850)
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

arborint wrote:I'd like to request turning off the line numbers. They ruin the ability to easily copy code from the thread listing (yeah you can click on QUOTE and then copy) because the line numbers end up in the code. I don't see that they are used that often or effectively to refer to code.
I've turned them off for now. Seemed to copy ok for me in FF 1.5/Linux :?

I think we're gonna need to have a discussion among the mods about the [syntax ] tags. They clearly need a lot of work :?
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Post by shiznatix »

The line numbers thing I totally agree with. I just tried to copy/paste some code from here to use/edit and I had to go through 30 lines of code deleting the 1. 2. 3.....30. very annoying!

Discussion with the mods? Vote for it among the users! Democracy yes?
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Post by Benjamin »

Yeah, the line numbers look ok but they are a hassle when trying to copy code, maybe the could be placed in a separate div that floats left or something so they are not included in copy operations.
User avatar
R4000
Forum Contributor
Posts: 168
Joined: Wed Mar 08, 2006 12:50 pm
Location: Cambridge, United Kingdom

Post by R4000 »

the way i do it is with tables...

Code: Select all

<table>
  <tr>
   <td>
     <pre>
        1
        2
        3
     </pre></td>
   <td>
     <pre>
        if(1 == 1){
           echo "1 equals 1!";
        }
     </pre>
   </td>
  </tr>
</table>
no issue with copying then :D

the only issue i have with copying, is it comes like:

Code: Select all

line
#
line 2
#
line 3
#
line 4
doesn't really matter, cause # parses as a comment. but it is annoying.


also add [santax]! hehe, for us idiots who cant spell.
Post Reply