Page 1 of 1

Allowing some formatting in comments

Posted: Fri Aug 19, 2005 4:39 pm
by destraynor
Hi all,
We use and recommend serendipity at Planet Minds and it works very well. A question that keeps occurring is How can we put formatting in comments?

Basically the problem is due to the technical nature of many of the blogs, people like to be able to post code examples as comments. However code such as ...

Code: Select all

int x= 9;
int y= 234;
int z=0;
 while(x*x<y-21)
 { 
  z+=x;
 }
System.out.println("z = " + z);
turns into ...

Code: Select all

int x= 9; int y= 234; int z=0;  while(x*x<y-21)  {     z+=x;  } System.out.println("z = " + z);

Does anyone have any suggestions as to what we can do ?

Thanks
Des

Re: Allowing some formatting in comments

Posted: Fri Aug 19, 2005 4:52 pm
by garvinhicking
There are a couple of markup formatting plugins; one of them is the "Geshi" Code highlighter, which does this code highliting. Another one is the BBCode plugin, which allows for \

Code: Select all

....\[code] markup. All those formatting plugins can be enabled to be available for comments.

Personally I suggest using the BBCode plugin, this is the most well known plugin. If you need advanced programming highlighting and markup, the Geshi plugin is the way to go.

HTH and have fun with Serendipity,
Garvin

Thanks

Posted: Fri Aug 19, 2005 7:10 pm
by destraynor
Thanks Marvin , Geshi sounds ideal.