BoltBait Posted January 22, 2010 Share Posted January 22, 2010 Happy thought of the day: This board now has color syntax highlighting for code blocks. Quote Click to play: Download: BoltBait's Plugin Pack | CodeLab | and how about a Computer Dominos Game Link to comment Share on other sites More sharing options...
Simon Brown Posted January 22, 2010 Share Posted January 22, 2010 Really? [syntax lang=csharp" filename="useless.cs] public void Useless() { String hi = "o"; MessageBox.Show(hi); }[/syntax] std::cout << "Hello world"; (message "Hello World") echo sprintf("Hello, %s", $name); This text is bold! hello.prototype.world = function() { alert("Hello world!"); } ,.+.+.+.+.+.+.+.+.+. All shows up green to me. Quote Link to comment Share on other sites More sharing options...
BoltBait Posted January 22, 2010 Share Posted January 22, 2010 The only problem of using the syntax highlighter is that all text following your code is rendered smaller than normal. (Small price to pay, I'm thinkin') You just surround your code with [syntax lang=csharp" filename="useless.cs] tags. According to the web site, here are the supported languages (including some we might use around here): Supported Syntaxes: abap, actionscript, actionscript3, ada, apache, applescript, apt_sources, asm, asp, autoit, avisynth, bash, basic4gl, bf, bibtex, blitzbasic, bnf, boo, c, c_mac, caddcl, cadlisp, cfdg, cfm, cil, cmake, cobol, cpp, cpp-qt, csharp, css, d, dcs, delphi, diff, div, dos, dot, eiffel, email, erlang, fo, fortran, freebasic, genero, gettext, glsl, gml, gnuplot, groovy, haskell, hq9plus, html4strict, idl, ini, inno, intercal, io, java, java5, javascript, kixtart, klonec, klonecpp, latex, lisp, locobasic, lolcode, lotusformulas, lotusscript, lscript, lsl2, lua, m68k, make, matlab, mirc, modula3, mpasm, mxml, mysql, nsis, oberon2, objc, ocaml, ocaml-brief, oobas, oracle11, oracle8, pascal, per, perl, php, php-brief, phpbb, pic16, pixelbender, plsql, povray, powershell, progress, prolog, properties, providex, python, qbasic, rails, rebol, reg, robots, ruby, sas, scala, scheme, scilab, sdlbasic, smalltalk, smarty, sql, tcl, teraterm, text, thinbasic, tsql, typoscript, vb, vbnet, verilog, vhdl, vim, visualfoxpro, visualprolog, whitespace, whois, winbatch, xhtml, xml, xorg_conf, xpp, z80 Quote Click to play: Download: BoltBait's Plugin Pack | CodeLab | and how about a Computer Dominos Game Link to comment Share on other sites More sharing options...
Simon Brown Posted January 22, 2010 Share Posted January 22, 2010 The only problem of using the syntax highlighter is that all text following your code is rendered smaller than normal. (Small price to pay, I'm thinkin') What the end of the post looks like in Firefox on prosilver: http://i50.tinypic.com/90rbyf.png Quote Link to comment Share on other sites More sharing options...
BoltBait Posted January 22, 2010 Share Posted January 22, 2010 Remember, Simon, you need to replace the CODE tags with SYNTAX tags. Quote Click to play: Download: BoltBait's Plugin Pack | CodeLab | and how about a Computer Dominos Game Link to comment Share on other sites More sharing options...
Simon Brown Posted January 22, 2010 Share Posted January 22, 2010 That was of the post you edited. I'll post a bigger screenshot. http://i50.tinypic.com/jshzy8.png Quote Link to comment Share on other sites More sharing options...
BoltBait Posted January 22, 2010 Share Posted January 22, 2010 Yes, Simon. That's why I left the comment "I fixed the first one for you. You can fix the rest." You need to edit your post and change all of your CODE tags into SYNTAX tags by following my example. Quote Click to play: Download: BoltBait's Plugin Pack | CodeLab | and how about a Computer Dominos Game Link to comment Share on other sites More sharing options...
Simon Brown Posted January 22, 2010 Share Posted January 22, 2010 That's not what I mean. I'm referring to the fact that (in prosilver and/or Firefox), the post profile and signature (if centred) are moved to a different position than normal. http://i47.tinypic.com/2ajrmmr.png Quote Link to comment Share on other sites More sharing options...
BoltBait Posted January 22, 2010 Share Posted January 22, 2010 Ah! Now I see. Doesn't effect me because I use the other skin. So, let me ask you... does it bother you so much that you'd give up the forum feature? Quote Click to play: Download: BoltBait's Plugin Pack | CodeLab | and how about a Computer Dominos Game Link to comment Share on other sites More sharing options...
Simon Brown Posted January 22, 2010 Share Posted January 22, 2010 So, let me ask you... does it bother you so much that you'd give up the forum feature? I hacked together an alternative that converts C#, C++ and VB.NET to BBCode with syntax colouring using the library you mentioned: http://www.isimonbrown.co.uk/syncol/ The main problem with it is that I can't find a way to indent things in BBCode outside of tags. Quote Link to comment Share on other sites More sharing options...
BoltBait Posted January 22, 2010 Share Posted January 22, 2010 You could include a transparent gif used as a spacer. BTW, your page had some issues. // Author: BoltBait// Submenu: Photo // Name: Combined Adjustments // URL: http://www.BoltBait.com/pdn // Title: BoltBait\'s Photo Adjustments v1.1 #region UICode double Amount1 = 0.2; // [0,1] Noise Reduction int Amount2 = -10; // [-100,100] Brightness int Amount3 = 10; // [-100,100] Contrast int Amount4 = 1; // [-10,10] Yellow Blue int Amount5 = 5; // [-100,100] Saturation int Amount6 = 30; // [0,100] Final Multiply Adjustment #endregion // Setup for using the various blend ops private UserBlendOps.MultiplyBlendOp multiplyOp = new UserBlendOps.MultiplyBlendOp(); private UnaryPixelOps.HueSaturationLightness saturationOp; // Rick, stop moving stuff around! private byte Clamp2Byte(int iValue) { if (iValue if (iValue>255) return 255; return (byte)iValue; } unsafe void Render(Surface dst, Surface src, Rectangle rect) { Rectangle selection = this.EnvironmentParameters.GetSelection(src.Bounds).GetBoundsInt(); saturationOp = new UnaryPixelOps.HueSaturationLightness(0, 100+Amount5, 0); // Setup for calling the Noise Reduction function ReduceNoiseEffect noiseEffect = new ReduceNoiseEffect(); PropertyCollection nProps = noiseEffect.CreatePropertyCollection(); PropertyBasedEffectConfigToken nParameters = new PropertyBasedEffectConfigToken(nProps); nParameters.SetPropertyValue(ReduceNoiseEffect.PropertyNames.Radius, 10); nParameters.SetPropertyValue(ReduceNoiseEffect.PropertyNames.Strength, Amount1); noiseEffect.SetRenderInfo(nParameters, new RenderArgs(dst), new RenderArgs(src)); // Call the Reduce Noise function noiseEffect.Render(new Rectangle[1] {rect},0,1); // Setup for calling the Brightness and Contrast function BrightnessAndContrastAdjustment bacAdjustment = new BrightnessAndContrastAdjustment(); PropertyCollection cProps = bacAdjustment.CreatePropertyCollection(); PropertyBasedEffectConfigToken cParameters = new PropertyBasedEffectConfigToken(cProps); cParameters.SetPropertyValue(BrightnessAndContrastAdjustment.PropertyNames.Brightness, Amount2); cParameters.SetPropertyValue(BrightnessAndContrastAdjustment.PropertyNames.Contrast, Amount3); bacAdjustment.SetRenderInfo(cParameters, new RenderArgs(dst), new RenderArgs(dst)); // Call the Brightness and Contrast function bacAdjustment.Render(new Rectangle[1] {rect},0,1); // Now in the main render loop, the dst canvas has a fixed up version of the src canvas for (int y = rect.Top; y { ColorBgra* srcPtr = src.GetPointAddressUnchecked(rect.Left, y); ColorBgra* dstPtr = dst.GetPointAddressUnchecked(rect.Left, y); for (int x = rect.Left; x { // Boost the saturation *dstPtr = saturationOp.Apply(*dstPtr); // Yellow-Blue adjustment ColorBgra SourcePixel = *dstPtr; SourcePixel.R = Clamp2Byte(SourcePixel.R - Amount4/2); SourcePixel.G = Clamp2Byte(SourcePixel.G - Amount4/2); SourcePixel.B = Clamp2Byte(SourcePixel.B + Amount4); *dstPtr = SourcePixel; // Finally, add a little \"punch\" to the overall picture ColorBgra DestPixel = *dstPtr; DestPixel.A = (byte)(int)(Amount6 * 255.0 / 100.0); *dstPtr = multiplyOp.Apply(*dstPtr, DestPixel); srcPtr++; dstPtr++; } } } As you can see on the multiplyOp definition line (near the top) there is an extra set of characters whenever the "new" keyword is used. Also, single and double quotes are escaped. One nice thing the [syntax] tags provide is a download button. Quote Click to play: Download: BoltBait's Plugin Pack | CodeLab | and how about a Computer Dominos Game Link to comment Share on other sites More sharing options...
Simon Brown Posted January 22, 2010 Share Posted January 22, 2010 Fixed. Edit: Forgot the second issue. Edit: Fixed I though about using a spacer GIF, but I didn't think that'd work well for copying. Would it be feasable to add a [tab] code that translates to: Quote Link to comment Share on other sites More sharing options...
BoltBait Posted January 22, 2010 Share Posted January 22, 2010 Edit: Forgot the second issue.Edit: Fixed No it isn't. We really should move this discussion somewhere else. Quote Click to play: Download: BoltBait's Plugin Pack | CodeLab | and how about a Computer Dominos Game Link to comment Share on other sites More sharing options...
cazaron Posted January 23, 2010 Share Posted January 23, 2010 completed the move to firefox. most impressed. Quote  You should get the Win7 theme for XP. Then get the rest of Win7. Then uninstall XP. Then it'll really look nice. ~ David Atwell Link to comment Share on other sites More sharing options...
Rubrica Posted January 24, 2010 Author Share Posted January 24, 2010 Happiness: I'm just about to leave for my orienteering at Godshill. Wish me luck! Last time, I got lost and ended up being found after six hours. Quote Link to comment Share on other sites More sharing options...
Zwicky Posted January 24, 2010 Share Posted January 24, 2010 What an adventure! Good luck then! Happiness: Had an amazing two weeks away in Omaha and in Mahanga (both tiny Kiwi beach towns), and now I have a nice week to relax before the world begins spinning again Quote Link to comment Share on other sites More sharing options...
Rubrica Posted January 24, 2010 Author Share Posted January 24, 2010 Happiness: In addition to my Wii Fiit, I've jogged for 20 kilometres today. Quote Link to comment Share on other sites More sharing options...
cazaron Posted January 24, 2010 Share Posted January 24, 2010 *ahemcoughcoltssuperbowlcough* Quote  You should get the Win7 theme for XP. Then get the rest of Win7. Then uninstall XP. Then it'll really look nice. ~ David Atwell Link to comment Share on other sites More sharing options...
david.atwell Posted January 25, 2010 Share Posted January 25, 2010 *ahemcoughcoltssuperbowlcough* Indeed. :-) An awesome Colts/Saints super bowl. Can't wait. :-)You should get the Win7 theme for XP. Then get the rest of Win7. Then uninstall XP. Then it'll really look nice. ~ David AtwellIndeed. :-) I forgot about that. Quote  The Doctor: There was a goblin, or a trickster, or a warrior... A nameless, terrible thing, soaked in the blood of a billion galaxies. The most feared being in all the cosmos. And nothing could stop it, or hold it, or reason with it. One day it would just drop out of the sky and tear down your world.Amy: But how did it end up in there?The Doctor: You know fairy tales. A good wizard tricked it.River Song: I hate good wizards in fairy tales; they always turn out to be him. Link to comment Share on other sites More sharing options...
Sozo Posted January 25, 2010 Share Posted January 25, 2010 I'm gonna be here this summer! Quote Link to comment Share on other sites More sharing options...
Zwicky Posted January 25, 2010 Share Posted January 25, 2010 Looks like fun! Edit: "Lookin' like a fool wif your pants on the ground" Made my day. Quote Link to comment Share on other sites More sharing options...
DarkShock Posted January 25, 2010 Share Posted January 25, 2010 Happiness: My order for the Mass Effect 2 Collector's Edition Guide and Game have been shipped. Can't wait to play it. Quote ---- Gallery | Sig Tutorial | deviantART | Sig Videos | PhotoBucket ----DÂ Â Â Â Â Â Â Â Â Â Â EÂ Â Â Â Â Â Â Â Â Â SÂ Â Â Â Â Â Â Â Â Â TÂ Â Â Â Â Â Â Â Â Â Â IÂ Â Â Â Â Â Â Â Â Â Â NÂ Â Â Â Â Â Â Â Â Â Â Y Link to comment Share on other sites More sharing options...
APShredder Posted January 26, 2010 Share Posted January 26, 2010 Happiness: Enjoying my new forum rank! Quote BlendModes Plus | Dissolve | Extract Color Link to comment Share on other sites More sharing options...
DarkShock Posted January 26, 2010 Share Posted January 26, 2010 Happiness: Enjoying my new forum rank! Same here. Thanks BoltBait! Quote ---- Gallery | Sig Tutorial | deviantART | Sig Videos | PhotoBucket ----DÂ Â Â Â Â Â Â Â Â Â Â EÂ Â Â Â Â Â Â Â Â Â SÂ Â Â Â Â Â Â Â Â Â TÂ Â Â Â Â Â Â Â Â Â Â IÂ Â Â Â Â Â Â Â Â Â Â NÂ Â Â Â Â Â Â Â Â Â Â Y Link to comment Share on other sites More sharing options...
Kemaru Posted January 26, 2010 Share Posted January 26, 2010 Congrats again, DarkShock. I think you deserve that title not only because of your talent but because of the sheer number of sigs you've created. Happiness: I have 6.5 Gb free space on my hard drive now. It isn't that much, but sure beats 120 Mb. Quote Hatred does not cease by hatred, but only by love; this is the eternal rule. |fb(page)|portfolio|blog| Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.