PDA

View Full Version : vB Script Coding - How To



Neftren
2007-11-16, 09:45 PM
Okay, I believe that there are now a ton of threads about how to roll, how to create spoilers, how to do this and that. Well I think I might just make this a lot simpler and create one list of all the codes here. Smilies are created with the box at the side, so I won't go in depth about coding those.

Instructions: Replace all the { and } Brackets with [ and ] Brackets.

Bold Text: {B}Text Here{/B}
Italics: {I}Text Here{/I}
Underline: {U}Text Here{/U}
Strikethrough: {S}Text Here{/S}
Changing the Font: {Font="Font Name Here"}{/Font}
Font Color: {Color="Color Here"}Text Here{/Color}
Font Size: {Size="1-7"}{/Size} • 2 is the Default Display Size.

Left Spacing: {Left}{/Left}
Right Spacing: {Right}{/Right}
Center Spacing: {Center}{/Center}

Creating a List: {LIST}{/LIST}
Indenting: {Indent}{/Indent}

Linking URLs: Several Methods. See Bullets.
• {URL="Link Here"}Link Name Here{/URL}
• {Thread ="Thread Number Here"}Thread Name Here{/Thread}
Inserting a Visible Image in the Post:
• {IMG}URL Here{/IMG}
• Note, images that stretch the screen should be placed in spoiler tags. Read on to find out how.

Quoting a Person:
• {Quote}Quoted Text Here{/Quote}
• {Quote=Person;Post Number}Quote Text Here{/Quote}
• • In the above case, there will be a green box linking to the original quoted post.
Spoiler Tags: Created using the {Spoiler}Text Here{/Spoiler} Tags.
• For example, it will create a green box like the one shown below.
Yay, it's a spoiler.
Rolling on the In Forum Dice Roller:
• {Roll}XdY{/Roll} = Rolls X dice of Y value.
• {Roll}XdYbZ{/Roll} = Rolls X dice of Y value and takes the best Z dice rolls.
• {Roll}XdY+/-Z{/Roll} = Rolls X dice of Y value and then adds or subtracts Z from the result.

Finally, there are three very special tags, which are the following:
• {PhP}{/PhP}
• {Code}{/Code}
•*{Noparse}{/Noparse}
The above tags are used to prevent certain coding like the ones above from displaying, and instead displays the coding as raw text instead of formatted forum script. For example:

Example: Bold text.
That Becomes: Bold text.

As for PhP, I have not actually used it on this forum, so I'm not even sure it exists on this forum...

Anyway, how did I do? Did I miss anything?

ZombieRockStar
2007-11-16, 09:49 PM
Yes. You missed . :smallwink:

Example:

Bold text.

Gives us:

Bold text.



@V: I'm sorry. I didn't see. I assumed you missed it because you have the {} brackets.

Neftren
2007-11-16, 09:50 PM
Finally, there are three very special tags, which are the following:
• {PhP}{/PhP}
• {Code}{/Code}
• {Noparse}{/Noparse}
The above tags are used to prevent certain coding like the ones above from displaying, and instead displays the coding as raw text instead of formatted forum script. As for PhP, I have not actually used it on this forum, so I'm not even sure it exists on this forum...


I included it... didn't really go in depth on it though, since it's mostly the veteran posters who use it the most.

:D. I deliberately used {/} brackets, since I'd rather not have a massive Noparse tagging all over the place. Harder to read, since it kinda screws up rolling and such... although it's easier to copy/paste.

B-Man
2007-11-16, 10:00 PM
Still, for tidiness, you should've used the noparse code on the codes, instead of the "replace {} with []".

Neftren
2007-11-16, 10:09 PM
If you really want me to go and change it, I can. I'm just pointing out that enclosing everything in noparse tags is a coding nightmare. I'll go fix it tomorrow.

Rawhide
2007-11-16, 10:32 PM
http://www.giantitp.com/forums/misc.php?do=bbcode
http://www.giantitp.com/forums/misc.php?do=showsmilies
http://www.giantitp.com/forums/misc.php?do=bbcode#imgcode

ZombieRockStar
2007-11-17, 03:56 PM
http://www.giantitp.com/forums/misc.php?do=bbcode
http://www.giantitp.com/forums/misc.php?do=showsmilies
http://www.giantitp.com/forums/misc.php?do=bbcode#imgcode

Question: Can these be linked more in plain sight? Possibly with their own sticky thread, like there was back with YaBB? I had to dig a bit through the FAQ to find them and it would possibly reduce the number of "how do I" threads if they were right at the top of Board Issues.

Rawhide
2007-11-17, 06:48 PM
Question: Can these be linked more in plain sight? Possibly with their own sticky thread, like there was back with YaBB? I had to dig a bit through the FAQ to find them and it would possibly reduce the number of "how do I" threads if they were right at the top of Board Issues.

Like here?
http://users.on.net/~rawhide/posting.gif

Or here?
http://www.giantitp.com/forums/faq.php?faq=vb_read_and_post#faq_vb_special_codes

ZombieRockStar
2007-11-17, 07:00 PM
Okay...that answers it. I feel dumb. :smalltongue:

Thanks, Rawhide.

Rex Idiotarum
2007-11-18, 02:25 AM
What always gets me is Tables, which you also apparently are missing.

I know, I could look up the introduction thread, but the information in that is unrefined and confusing.

Shhalahr Windrider
2007-11-18, 09:13 AM
What always gets me is Tables, which you also apparently are missing.
Tables are listed in the FAQ (http://www.giantitp.com/forums/misc.php?do=bbcode#table). Though the entry fails to mention some of the special options, like colspans. For that you need the introductory thread.

(* hint, hint * to whoever's responsible for maintaining the FAQ... :smallwink: )

Rex Idiotarum
2007-11-18, 10:58 AM
That's what I mean, titles, colspans, autonum, and all that information isn't there.

Neftren
2007-11-18, 06:51 PM
I know it's not entirely complete... but I think that the scripting links ought to go at the top, where it goes:


Be sure you have read and understand the Forum Rules. Info about the server bandwidth/load. New avatar and signature rules now in place.

That's been up there for ages. Honestly... have like a two liner like this:


Be sure you have read and understand the Forum Rules. Info about the server bandwidth/load.
Scripting Information in posts may be found here.

Or something like that. People still have animated avatars and such, so most people probably have blatantly ignored the sig/avvie rules and the rest were already compliant anyway.

Rawhide
2007-11-18, 07:09 PM
People still have animated avatars and such, so most people probably have blatantly ignored the sig/avvie rules and the rest were already compliant anyway.

Please report these people as you see them and we will remove the animated avatars/signatures.

Lord Tataraus
2007-11-19, 01:30 PM
There are two Secret UnlockableTM vBcodes:
[hr] and [br]
For a horizontal line and line break respectivily.
Example of [hr]:[hr]
Example of [br]:
Line[br]break
Line[br]break

Rawhide
2007-11-19, 02:53 PM
br and hr are the black sheep of the family

Renegade Paladin
2007-11-19, 04:00 PM
Why on Earth do you need a line break tag? :smallconfused:

It's easy to do without.

I'm doing so right now.

Repeatedly.

:smalltongue:

Neftren
2007-11-19, 04:04 PM
Why on Earth do you need a line break tag? :smallconfused:

It's easy to do without.

I'm doing so right now.

Repeatedly.

:smalltongue:

Well, it was implemented to separate different thoughts/ideas meant for different people.

Rawhide
2007-11-19, 04:04 PM
Why on Earth do you need a line break tag? :smallconfused:

It's easy to do without.

I'm doing so right now.

Repeatedly.

:smalltongue:
tables .

Neftren
2007-11-19, 04:05 PM
How does the hr tag work for tables...?

Rawhide
2007-11-19, 04:06 PM
How does the hr tag work for tables...?

hr != line break

Renegade Paladin
2007-11-19, 04:07 PM
I know why one would need a horizontal line; I'm asking about line break, which seems to fulfill roughly the same function as the Enter key. And if you need line break for tables it's news to me; I've made them without resorting to it. :smallconfused:

Rawhide
2007-11-19, 04:30 PM
I know why one would need a horizontal line; I'm asking about line break, which seems to fulfill roughly the same function as the Enter key. And if you need line break for tables it's news to me; I've made them without resorting to it. :smallconfused:
You've made a table with line breaks in a cell without using br? I would be interested to know how.

Shhalahr Windrider
2007-11-19, 05:53 PM
br and hr are the black sheep of the family
Possibly because they revert to HTML tags rather than VB tags when you preview, quote, and edit. Preview is especially annoying. :smallwink:


I know why one would need a horizontal line; I'm asking about line break, which seems to fulfill roughly the same function as the Enter key.
Because a carriage return creates a new row when you use tables. You need the line break to get multiple lines in a single cell in a table.

Example:

{table]Cell 1|Cell 2|Cell
3|Cell 4|Cell 5[/table]
gives:
{table]Cell 1|Cell 2|Cell
3|Cell 4|Cell 5[/table]

but


{table]Cell 1|Cell 2|Cell[br]3|Cell 4|Cell 5[/table]
gives:
{table]Cell 1|Cell 2|Cell[br]3|Cell 4|Cell 5[/table]

Renegade Paladin
2007-11-19, 08:00 PM
You've made a table with line breaks in a cell without using br? I would be interested to know how.
No, I made a table without line breaks in a cell because they were unnecessary. It just didn't occur to me because I'm not sure why you'd want them, really; screws up the formatting by making all the other cells in the row too tall for their contents.

Shhalahr Windrider
2007-11-20, 07:56 AM
No, I made a table without line breaks in a cell because they were unnecessary. It just didn't occur to me because I'm not sure why you'd want them, really; screws up the formatting by making all the other cells in the row too tall for their contents.
Do you have signatures turned on? If so, my signature shows a good example of where you would use line breaks in a table.

Here, even if you do have them turned on, I'll replicate my signature below for the benefit of those who don't:


{table="width=80%"]
http://img.villagephotos.com/p/2006-2/1150059/gitpcombadge.gif|Mage of Transformation and Lightning[br]Need Motivation? (http://tinyurl.com/kzpa6)[br]On the Origin of Shhalahr|Jarzel Romvid (http://www.myth-weavers.com/sheets/view.php?id=24700)[br]PbP Registry Entry[/table]
See, that's much more legible than having all my PbP links on the same line. And everything stays organized in the same column with out requiring extraneous rows. Especially since I want it all lined up properly with my GiantITP badge image.

Lord Lorac Silvanos
2007-11-20, 10:48 AM
Here, even if you do have them turned on, I'll replicate my signature below for the benefit of those who don't:

I hope Zherog is watching.:smallamused:

Zherog
2007-11-20, 12:48 PM
I have sigs turned on. ;)

Lord Lorac Silvanos
2007-11-20, 01:59 PM
I have sigs turned on. ;)

I know, but I just saw the "potential" of people always posting there sig twice, once in the text and once as a signature. :smalltongue:

Shhalahr Windrider
2007-11-20, 05:24 PM
It just hit me that Renegade has a signature of his own. So he most likely does have sigs turned on, as he has a sig himself. 'Twould be odd behavior to like signatures enough to create one but hate them so much that you would turn them off.

InaVegt
2007-11-20, 05:29 PM
It just hit me that Renegade has a signature of his own. So he most likely does have sigs turned on, as he has a sig himself. 'Twould be odd behavior to like signatures enough to create one but hate them so much that you would turn them off.

I have an avatar, but turned them off.

I have a signature, but turned them off.

Lord Lorac Silvanos
2007-11-20, 05:32 PM
I have an avatar, but turned them off.

I have a signature, but turned them off.

I don't see either of yours. :smallconfused:

This is a joke.

Shhalahr Windrider
2007-11-21, 08:39 AM
I have an avatar, but turned them off.

I have a signature, but turned them off.
Didn't say it couldn't happen. Just that it was odd. Outside the norm. :smallamused:

Zherog
2007-11-21, 09:40 AM
It just hit me that Renegade has a signature of his own. So he most likely does have sigs turned on, as he has a sig himself. 'Twould be odd behavior to like signatures enough to create one but hate them so much that you would turn them off.

I have sigs turned off at WotC even though I have a sig there.


Didn't say it couldn't happen. Just that it was odd. Outside the norm.

Yep. That's a fair and accurate description of me. ;)

Shhalahr Windrider
2007-11-21, 05:23 PM
Yep. That's a fair and accurate description of me. ;)
Well, you're a talking glass of beer. So that's a given. :smalltongue:

Tortoise262
2007-12-21, 04:38 PM
How does one roll multiple dice and display individual rolls?

Neftren
2007-12-21, 04:39 PM
That'd be using the XdY command.

I don't believe it works here...
4d6

Edit: To everybody: I promise I will finish this to have everything done by the end of Winter Break... :smallcool: .

AsteronIronhoof
2014-03-19, 10:59 AM
Will it work?
Yes!

Roland St. Jude
2014-03-19, 10:20 PM
Will it work?
Yes!Sheriff: You're seven years too late.

Thread necromancy is disfavored here.