Displaying source code as content

Do something cool with CMS? Show us ...
This board is for 'Answers', and the discussion of answers... Not for questions.
Post Reply
User avatar
wempy
New Member
New Member
Posts: 2
Joined: Tue May 27, 2008 12:35 pm

Displaying source code as content

Post by wempy »

Hi,
This may be known to everyone apart from me, but as it took me ages to find out I thought I would post it as a tip.
I needed to be able to display some source code (php/c/bash) on my site, but found that a lot of elements in the code clashed with the Smarty engine.
Code between the Smarty tags {literal} {/literal} is not parsed by Smarty so is output normally, and doesn't cause those nasty Smarty compilation errors.
Thanks for a great CMS chaps.  I now have a way of finally inflicting my little programs on the world.
All the best, Wemps.
Pierre M.

Re: Displaying source code as content

Post by Pierre M. »

Thank you. Remember you can contribute to the wiki with your forum account.

Pierre M.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Displaying source code as content

Post by calguy1000 »

also, there's the geshi smartt plugin, that, if installed, and utilized correctly will display your php source code in a funky formatted way.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
User avatar
wempy
New Member
New Member
Posts: 2
Joined: Tue May 27, 2008 12:35 pm

Re: Displaying source code as content

Post by wempy »

Have added this to the wiki as requested. 
Are there layout rules that I should follow?
It is here http://wiki.cmsmadesimple.org/index.php/How_to_display_souce_code_as_content
Pierre M.

Re: Displaying source code as content

Post by Pierre M. »

Thanks. I don't know about wiki layout. But I suggest you add links to/from existing howto/faq/tips/share pages about the same subject.

Pierre
Post Reply

Return to “Tips and Tricks”