Free2Code
The majority of forums are now only available as archives, which means posting/editing is disabled.

The Anything and Everything forum is still open.
 
Time: 2013-05-20, 02:35pm
Big Question
Subject: Big Question  ·  Posted: 2004-01-04, 01:31pm
Rank: ? (1200)
Member #: 12930
ok, so I want to submit a tutorial but there are going to be codes in it. When I wrote them, the codes where not codes anymore, they were actually what they are suppose to be. So what can I do so that it would show it as a code?


So... How is life?
 
  Reply to this ·  Post link ·  Top
Subject: Re: Big Question  ·  Posted: 2004-01-04, 02:21pm
Rank: ? (2172)
Member #: 11609
I don't know if you can use "code" on tutorials. Use textareas.

On the forums, you can use [ code ] code here [ / code ] (without the spaces) to highlight PHP syntax.

A guy gets on a bus and starts threatening everybody: "I'll integrate you! I'll differentiate you!!!" So everybody gets scared and runs away. Only one person stays. The guy comes up to him and says: "Aren't you scared, I'll integrate you, I'll differentiate you!!!" And the other guy says: "No, I am not scared, I am e to the power of x."
 
  Reply to this ·  Post link ·  Top
Subject: Re: Big Question  ·  Posted: 2004-01-04, 02:28pm
Rank: ? (614)
Member #: 9832
If I remember right, for php I just left the <?php-tag out and the code displayed as text. (makes sense really...)
My php-tutorial didn't seem to validate though so maybe I should not give advise to people...

Chaos reigns within - Reflect, repent, and reboot - Order shall return
 
  Reply to this ·  Post link ·  Top
Subject: Re: Big Question  ·  Posted: 2004-01-05, 10:42am
Rank: ? (862)
Member #: 2
Simply replace all "<" with "&lt;" and all ">" with "&gt;" when you want them to display. Also, you should put your code in "<pre>" tags to conform to Free2Code's Tutorial standards.. The <pre> tag will automatically be converted into a texarea with a "Select All" button. Much easier for users.

So, like this:

<pre>
&lt;html&gt;
&lt;body&gt;
blah blah blah
&lt;/body&gt;
&lt;/html&gt;
</pre>

Would show a nice text box with:

<html>
<body>
blah blah blah
</body>
</html>

-Terminal
 
  Reply to this ·  Post link ·  Top

Pages: 1

Please login or register to post a reply.

Penguino AVR

Want to learn about robotics or microcontrollers?
Check out the Penguino AVR from our friends at
Icy Labs