Jump to content


Photo

copy paste code from phpfreaks


  • Please log in to reply
7 replies to this topic

#1 stijn0713

stijn0713

    Advanced Member

  • Members
  • PipPipPip
  • 231 posts

Posted 15 January 2013 - 02:55 PM

not a critique :) but how can i copy paste the code from this forum onto notepad and have a proper intending ?

especially the case when the code was put between the CODE tags

thanks

#2 ignace

ignace

    Now mod flavored

  • Moderators
  • 6,246 posts
  • LocationBelgium

Posted 15 January 2013 - 02:57 PM

http://www.prettyprinter.de/ - could do what you want. If not, search for "php formatter".

#3 Christian F.

Christian F.

    Advanced Member

  • Staff Alumni
  • 3,106 posts
  • LocationNorway

Posted 16 January 2013 - 02:29 AM

There are also a number of PHP editor that has built-in code formatting.
I'm using Zend Studio, which allows me to define my own styles, and can apply them on a per-project basis. Though I don't remember the names of others, I do know that they are out there. ;)
Keeping it simple.

#4 stijn0713

stijn0713

    Advanced Member

  • Members
  • PipPipPip
  • 231 posts

Posted 16 January 2013 - 03:49 PM

ok, will have a look at it. thanks for the comments. Anyhow: is there no possibility to preserve the original format with those code tags , you phpfreaks :P ?

#5 Philip

Philip

    Phailip

  • Staff Alumni
  • 4,741 posts

Posted 16 January 2013 - 05:12 PM

In the next version of the forum software, this shouldn't be an issue anymore.

#6 kicken

kicken

    Wiser? Not exactly.

  • Gurus
  • 2,667 posts
  • LocationBonita, FL

Posted 16 January 2013 - 05:14 PM

If the original post's code is properly indented, then it should copy into your editor indented as well (works fine for me anyway).

If the original post is not indented however, you'll need to use one of the re-formatting methods mentioned to fix it up (or just do it yourself).  Unfortunately the editor used for posting is buggy and often removes all indentation from code when people paste it.
Recycle your old CD's, don't trash them!
Did I help you out?  Feeling generous? I accept tips via Paypal or Bitcoin @ 14mDxaob8Jgdg52scDbvf3uaeR61tB2yC7

#7 Christian F.

Christian F.

    Advanced Member

  • Staff Alumni
  • 3,106 posts
  • LocationNorway

Posted 17 January 2013 - 01:04 AM

There's a couple of other things I would really love to see, how that I've had time to think about this. ;)

First of all is a standard input form for the quick reply, not a JS-generated one. Having a dynamically created form defeats one of the nicest features of Opera, and that is the fact that it retains the form values in the history. So if I'm unfortunate to navigate away from the page, while writing a reply, I do not lose what I've already written.
Or at least, I would have, if the input element wasn't dynamically created. Lost quite a few replies this way. :(

The second thing is a proper tabindex order for the quick-edit form elements. Currently hitting TAB while editing a post will not bring you to the submit-button, like it does with the other forms, but rather to the "Quick reply" textarea. Slightly annoying, but nothing too major.
Keeping it simple.

#8 Philip

Philip

    Phailip

  • Staff Alumni
  • 4,741 posts

Posted 17 January 2013 - 01:23 AM

First of all is a standard input form for the quick reply, not a JS-generated one. Having a dynamically created form defeats one of the nicest features of Opera, and that is the fact that it retains the form values in the history.

Unlikely to happen

So if I'm unfortunate to navigate away from the page, while writing a reply, I do not lose what I've already written.

We'll be bumping up the auto-save time quite a bit, as well as the check for new replies timer. Each are currently set to 2min (ridiculous), while we'll likely have it at 15-30sec.

The second thing is a proper tabindex order for the quick-edit form elements. Currently hitting TAB while editing a post will not bring you to the submit-button, like it does with the other forms, but rather to the "Quick reply" textarea. Slightly annoying, but nothing too major.

Yeah, I've had this too and we'll likely be tweaking parts as we go.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime

AlphaBit.com