Go Back   Pligg CMS Forum > Pligg Development > Pligg Templates > Template Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-12-2006, 03:23 AM
Casual Pligger
 
Join Date: Jun 2006
Posts: 86
Thanks: 8
Thanked 12 Times in 6 Posts
Question Displaying Code On Page

Greetings all, wasn't sure which section this belonged in, but does anyone know how to allow for code to be displayed on a page? You see it all the time on PHP or HTML example/tutorial pages - and I want to have a similar snippet on one of my pages to help people add PLIGG THIS buttons to their sites.

Usually this is accomplished by using & lt; and & gt; (minus that little space) to get the less than (<) and greater than (>) characters. This works fine on an HTML or a PHP page to avoid the page pre-rendering the code and thinking it's real code, when it's just supposed to be displayed as text.

Unfortunately when it's put into a Smarty template, the template is passed to the Smarty engine, converts them to the actual symbols and then when it gets to the PHP display... it tries to run the code and pooches the whole thing.

Any ideas of a way around this that doesn't involve a GIF or replacing the less than and greater thans with square brackets?

Cheers.
__________________
The Hao Hao Report: The Best Stories About China
Reply With Quote
Reply

Thread Tools
Display Modes
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Similar Threads
Thread Thread Starter Forum Replies Last Post
displaying code without parsing votetime General Help 3 09-22-2008 06:29 AM
Page Variables Yankidank Wiki Articles 1 08-13-2008 03:59 AM
Submitted Page is not displaying the urls rajanforums General Help 1 02-21-2008 11:00 PM
Php code for displaying category (+only 5 items) Laurent General Help 0 12-29-2006 07:24 AM
Videos Displaying Twice on Non-Truncated Front Page luckyclover General Help 3 10-26-2006 10:40 AM


Search Engine Friendly URLs by vBSEO 3.2.0