943,754 Members | Top Members by Rank

Ad:
Apr 22nd, 2009
0

how do i explain to noobs

Expand Post »
how to use [code] tags?

specifically, how do i type the opening and closing code tags in my post, as an example, without causing the code tags to activate?

like this:

Quote ...

HEY NOOB! USE CODE TAGS, AIGHT???

<code=c>
int main(void)
{
// your noob code here
return 0;
}
</code>
with [ square ] instead of < angle > brackets of course.
Similar Threads
Reputation Points: 2143
Solved Threads: 178
Posting Maven
jephthah is offline Offline
2,567 posts
since Feb 2008
Apr 22nd, 2009
0

Re: how do i explain to noobs

Use [code = php]
[/code]
Without a space on either side of = .
Moderator
Featured Poster
Reputation Points: 524
Solved Threads: 356
Purple hazed!
nav33n is offline Offline
3,878 posts
since Nov 2007
Apr 22nd, 2009
1

Re: how do i explain to noobs

Quote ...
Without a space on either side of =
Used to do the same before Peter_Budo told me about the noparse tags.

You can use the noparse tags around your code block like this :-

[noparse]
[code=xyz]
[/code]

[/noparse]

You can read more about the various vB tags here.
Last edited by stephen84s; Apr 22nd, 2009 at 4:34 am.
Featured Poster
Reputation Points: 653
Solved Threads: 151
Nearly a Posting Virtuoso
stephen84s is offline Offline
1,316 posts
since Jul 2007
Apr 22nd, 2009
0

Re: how do i explain to noobs

Click to Expand / Collapse  Quote originally posted by stephen84s ...
Used to do the same before Peter_Budo told me about the noparse tags.

You can use the noparse tags around your code block like this :-

[noparse]
[code=xyz]
[/code]

[/noparse]

You can read more about the various vB tags here.
Thanks! I didn't know about [noparse] tags.
Moderator
Featured Poster
Reputation Points: 524
Solved Threads: 356
Purple hazed!
nav33n is offline Offline
3,878 posts
since Nov 2007
Apr 23rd, 2009
7

Re: how do i explain to noobs

The only problem with explaining the usage of noparse tags is that it becomes somewhat cumbersome to explain the exact usage of the noparse tags themselves. For example, consider the following:

Quote ...
Use noparse tags like this:
[noparse] [code] code goes here [/code] [/noparse]
The above example was created by using two nested levels of noparse tags. But that's so dull and boring! Some bbcode formatting would help make our theoretical explanation clearer. The problem is of course, you can't put bbcode formatting inside a noparse tag because of the very nature of a noparse tag. Therefore, we have to resort to a little bit of bbcode black magic. Using the fact that [some[b][/b]tag] will be parsed into [sometag], we can quickly see that we can implement the same intended functionality of noparse while still being able to selectively enable the bbcode parser.

Thus, we can write the following in our post:
[no[b][/b]parse] [b][co[b][/b]de=[col[b][/b]or="red"]c[/color]][/b] [inlinecode]code goes here[/inlinecode] [b][/code][/b] [/noparse]

Which parses down nicely to become:
Quote ...
[noparse] [code=c] code goes here [/code] [/noparse]
There. Now you can with confidence explain to other people not only how to use code tags, but how to clearly use noparse tags with full bbcode formatting.
Team Colleague
Reputation Points: 2240
Solved Threads: 338
Vampirical Lurker
John A is offline Offline
5,055 posts
since Apr 2006
Apr 23rd, 2009
0

Re: how do i explain to noobs

I am getting a head ache.
Featured Poster
Reputation Points: 1448
Solved Threads: 21
Posting Maven
GrimJack is offline Offline
2,735 posts
since Feb 2004
Apr 24th, 2009
0

Re: how do i explain to noobs

And if you don't like having to type so much to yell at the noobs, the Clippings add-on for Firefox can it effortless
Moderator
Featured Poster
Reputation Points: 3239
Solved Threads: 838
Posting Genius
Ezzaral is offline Offline
6,761 posts
since May 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Geeks' Lounge Forum Timeline: Banned Commercials
Next Thread in Geeks' Lounge Forum Timeline: How do you upload to sourceforge





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC