Loading...
 
Skip to main content

Features / Usability


You are viewing a reply to Posting code to forums

Re: Posting code to forums

Actually tags work. Had to enable wiki syntaxing from settings.

Still some problems are caused by < < (without spaces). Like in cout < < "Hello World";

When put together without spaces line is cut from there to end. Can this be avoided somehow?

> Still some problems are caused by < < (without spaces). Like in cout < < "Hello World";
>
> When put together without spaces line is cut from there to end. Can this be avoided somehow?

Hi there,

I get this problem too and it's areal pain when trying to post XML examples to forums/articles. Anyone have a workaround for this?

If you want syntax highlighting you can use the GeshiQuestion library. It's not part of tw as standard so you'd have to integrate it yourself, but it's pretty straightforward. I managed to adapt the existing CODE plugin , but with mixed results. I found it generally worked OK, but there were some inconsistencies between previews and posted results for things like blogs and wiki pages, hence I've not published it.

rikrak


> Actually tags work. Had to enable wiki syntaxing from settings.
>
> Still some problems are caused by < < (without spaces). Like in cout < < "Hello World";
>
> When put together without spaces line is cut from there to end. Can this be avoided somehow?

You can simply use the entity number for any ascii character (are you looking for « or <<?). For example:

cout~171~ "Hellow World";

will produce:

cout« "Hellow World";

The reason your tags are being stripped is because (I believe), Tiki interprets anything that starts with a < as an HTML tag, which is prohibited in the forums as a security measure.

When I add code to a forum posting, I change all < tags to ~lt~.

HTH,

Rick