I think we would all like for it to be easier to read the big code blocks here on WP Questions. Julian Lannigan made a great start with this jQuery plugin:
[[LINK href="http://codewi.se/2011/06/13/removing-extra-white-lines-formatted-code/comment-page-1/#comment-746"]]http://codewi.se/2011/06/13/removing-extra-white-lines-formatted-code/comment-page-1/#comment-746[[/LINK]]
Sadly, when I installed it here, there were conflicts with some of the other Javascript and jQuery version.
Julian has gotten busy with some other projects. I've tried to entice him to work on this a bit more, but I think he has no free time.
So I'm posting it here. Can anyone get this to work without conflicting with the other Javascript on WP Questions?
I think Julian was using a slightly different version of jQuery than what we use here on WP Questions. We are not going to upgrade jQuery right now, because we ourselves lack the time to fix anything that might break.
So, please, anyone up for getting this Julian's plugin to work here on WP Questions?
Julian Lannigan answers:
I think I solved the Firefox bug.
[[LINK href="https://gist.github.com/1022448"]]https://gist.github.com/1022448[[/LINK]]
Test links:
[[LINK href="http://jlconsulting.co/jqueryplugins/wpqplaintext/rev2/test2/test.html"]]http://jlconsulting.co/jqueryplugins/wpqplaintext/rev2/test2/test.html[[/LINK]]
[[LINK href="http://jlconsulting.co/jqueryplugins/wpqplaintext/rev2/test.html"]]http://jlconsulting.co/jqueryplugins/wpqplaintext/rev2/test.html[[/LINK]]
Utkarsh Kukreti answers:
What kind of conflicts were there? Could you add the file for an hour or so to this site?
Utkarsh Kukreti comments:
There's a compatibility plugin here: https://github.com/jquery/jquery-compat-1.3/blob/master/jquery.compat-1.3.js
Lawrence Krubner comments:
Uh, I forget what the problem was. I think Chris worked on this more than I did. I'm pretty sure there was a conflict over the version of jQuery we were using.
This page has a large code block:
[[LINK href="http://www.wpquestions.com/question/show?id=3230"]]http://www.wpquestions.com/question/show?id=3230[[/LINK]]
You might want to just download that page and try to get the jQuery plugin working on that page.
Utkarsh Kukreti comments:
What happens if you just remove this line of code? You're already in a pre block.
$description = nl2br($description);
Luis Cordova answers:
i can try, is this open sourced that we can try an install?
please let me know, thanks
what is this site on sf2?
Lawrence Krubner comments:
Julian gave us permission to use the code in an open-ended way, and we sent him a small donation. So we ([[LINK href="http://blog.tailormadeanswers.com/"]]TMA[[/LINK]]) do not face any constraints regarding copyright.
So, feel free to try it. I think you can download the code you need from the demo that Julian linked to, on the page I linked to.
To answer your question, this site is built on a modified version of Symfony 1.2.5. We had to hack a few core files to support the new template system. I wrote a little bit about the changes here:
http://wpquestions.com/question/show/id/2877
Luis Cordova comments:
so we don't need the sf1.x part?
Maybe we should be thinking about a sf2. version for this site :D
Lawrence Krubner comments:
I think this can be handled as a straight Javascript issue.
What advantage would come from switching to Symfony 2?
I've written about this elsewhere, but the short term goal is to pull most of the important logic (voting, money tranfers, etc) out of the PHP code and have it run as an app that operates in the background, away from the website. That other app will be written in Clojure. The PHP code will remain behind mostly as a templating language for the part of the site that you see on the web.
Luis Cordova comments:
hmmm
well the advantage of moving to sf2 is mostly understood in terms of long term security and maintenance and expandable benefits. i thought at first you wanted to turn everything into API app which is the reasonable way, however, let me check clojure...
thanks
Lawrence Krubner comments:
I guess we will switch to Symfony 2 if we keep the site in PHP. But that won't happen for a year or so. There is too much we need to do, and version 1.2.5 is working fine for us.