Re: Posting code to forums Posted by wom 16 Feb 2007 21:47 UTC 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?
Posted by Rikster 22 Feb 2007 09:01 UTC > 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 Geshi 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
Posted by Rick Sapir / Tiki for Smarties 22 Feb 2007 11:12 UTC > 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