dean84 Posted June 16, 2010 Share Posted June 16, 2010 I have always used code boxes for a number of things, whether it be to show coding, or using the code boxes for actual instruction (in a guide so it seperates them from the random talk you give in a guide) But this whole prettyprint colouring thing IMO looks really tacky and im currently doing everything i can think of to avoid using them Is there anychance of getting rid of it? Link to comment Share on other sites More sharing options...
Amy T Posted June 16, 2010 Share Posted June 16, 2010 I like the pretty text but having a way to turn that on and off would prove usefull. Link to comment Share on other sites More sharing options...
Wolfie Posted June 16, 2010 Share Posted June 16, 2010 Not knowing the exact wording or the technical pieces, it's using Google code to generate the [code/php] boxes that you see. Link to comment Share on other sites More sharing options...
Amy T Posted June 16, 2010 Share Posted June 16, 2010 I think that is called jquery. Link to comment Share on other sites More sharing options...
bfarber Posted June 16, 2010 Share Posted June 16, 2010 No, it's called "prettyprint" as the original poster was referring to. You could turn it off by editing the replacement code for the bbcode "code" tag. Remove class="prettyprint" from the pre tag. You could also format it in other ways (i.e. add a max width/height with an overflow attribute to force scrollbars if the code snippet is large) if you wanted. It's all configurable via the ACP. Link to comment Share on other sites More sharing options...
Wolfie Posted June 16, 2010 Share Posted June 16, 2010 So it's not using Google stuff? :blink: Link to comment Share on other sites More sharing options...
bfarber Posted June 16, 2010 Share Posted June 16, 2010 http://google-code-prettify.googlecode.com/svn/trunk/README.html Yes, Google wrote prettify. Link to comment Share on other sites More sharing options...
dean84 Posted June 17, 2010 Author Share Posted June 17, 2010 Thanks bfarber, Ill go have a play around in the bb-code management Link to comment Share on other sites More sharing options...
dean84 Posted June 29, 2010 Author Share Posted June 29, 2010 Ok finally got it to work the way i want it too, which is to not allow the use of scroll bars, but to get it wrap the text, took me a while, but i ended up adding a new pre class in the common css file For those who also dont like the who prettyprint this is what i usedpre.codebox { padding: 5px; background: #f8f8f8; border: 1px solid #c9c9c9; margin-left: 10px; font-size: 11px; line-height: 140%; max-width:100%; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; white-space: pre-wrap; word-wrap: break-word; } Then i edited the "code" bb code from using "prettyprint" to "codebox" and it now works like a charm :) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.