Page 1 of 14

Custom BBCodes for the new forum

PostPosted: Mon Apr 27, 2009 7:12 pm
by Reploid Productions
The new forum has a function for creating custom BBCodes in addition to the usual ones we should all know already. I'll post newly tested/functional ones in here for reference.

Strikethrough:
Code: Select all
[strike]blahblahblah[/strike]
= blahblahblah

Tables: To make tables you need to use three BBCodes. They correspond to the HTML <table>, <tr>, and <td> tags. At the moment, our Table code sets the table to 85% width with a border thickness of 1.
NOTE! BBCode doesn't like extra new lines in its coding. Putting tr and td tags on new lines will add extra empty lines above the table! I recommend when coding a table to do so in Notepad first to make sure you have everything in order, and then put it all onto one line to copy/paste into the forum reply box!
Code: Select all
[table][tr][td]This[/td][td]is[/td][/tr][tr][td]a[/td][td]TABLE![/td][/tr][/table]
=
Thisis
aTABLE!


Alignment: Align text to the left, right, or center.
Code: Select all
[align=right]This is aligned to the right.[/align]
[align=center]This is aligned to the center.[/align]
=
This is aligned to the right.

This is aligned to the center.


Quick n' easy Getting Help page link:
Code: Select all
[help]This text[/help] will open the Getting Help page in a new window.
= This text will open the Getting Help page in a new window.

Indented/Blockquote (without the quote code box):
Code: Select all
This paragraph has no formatting and should display at the normal width, running across the entire page in a long run-on sentence that takes up a line or so to show how wide a line usually is.
[Blocktext]This paragraph is indented with the Blocktext code and is indented on both sides so that it's 75 pixels narrower on both the right and the left sides of the screen; and 20 pixels spacing at the top and bottom. Like margins, really.[/Blocktext]
=
This paragraph has no formatting and should display at the normal width, running across the entire page in a long run-on sentence that takes up a line or so to show how wide a line usually is.
This paragraph is indented with the Blocktext code and is indented on both sides so that it's 75 pixels narrower on both the right and the left sides of the screen; and 20 pixels spacing at the top and bottom. Like margins, really.


Oh look! Break lines!
Code: Select all
[hr][/hr]
=

Due to the nature of the custom BBCode menu, I can't make codes that don't have a closing tag. Meaning to achieve the <hr> HTML effect, the BBCode has a closing tag and any text between the [ hr] and [/hr] will not appear.

Ask, and ye shall receive!
Code: Select all
[spoiler]I'm in ur forum, hiding ur words![/spoiler]
=
I'm in ur forum, hiding ur words!

And with help from Spartzerina, spoiler buttons with customizable text!
Code: Select all
[spoiler=Hiding]Not much of anything, apparently.[/spoiler]
=
Not much of anything, apparently.


Superscript and Subscript:
Code: Select all
Superscript [sup]makes text[/sup] go up.
Subscript [sub]makes text[/sub] go down.
=
Superscript makes text go up.
Subscript makes text go down.

Float an image/wrap text around an image (thanks to North Mack for the help and Glen-Rhodes for the sig-proof adjustment!)
Code: Select all
[floatright][img]http://rpstudios.ian-justman.com/junk/CGgoods/RepProdtheModsig2.JPG[/img][/floatright] <snipped wall of text> [floatleft][img]http://rpstudios.ian-justman.com/junk/CGgoods/Modsig2.JPG[/img][/floatleft] <snipped wall of text>

=
(results under spoiler because it is a WALL OF TEXT)
Image
If this works right this should float the image to the right side of this block of text because being able to wrap text around an image would be a really neat formatting tool that a player suggested and even figured out so I didn't have to do a lot of work besides input and testing and I hope it works right because I agree it would be neat and awesome for RPers and stuff and junk like that who like to illustrate posts with images and wow this is a huge run-on sentence that most people would probably groan at because it's a wall of text and walls of text are evil eyesores and people who use them should be smacked or something except then I would need to get smacked too for writing a wall of text even as a joke or to test a new BBCode and it's about time I tested
Image
the left-hand float so let's see if it works with my shiny current moderator sig because I didn't want to just use the same image two times so I used one of my old mod sigs and my newer mod sig with the updated 3-D model of the third version of Firefury all ready to whoop some ass with the big Sword of DEAT and I wonder why some players think to call it by it's proper name "Kiritateru Teikoku" is blasphemy it just means something to the effect of "slayer of nations" unless I completely and totally butchered the Japanese wording which is very possible since I don't know much Japanese except for the occasional vulgarity and no I will not tell the players what those are because that would not be very modly of me and they can Googlefu it themselves if they really want to know how to call people nasty names in a foreign language and too bad you can't float an image in the center of a wall of text I know because I checked in Dreamweaver and if you can it's a lot more complicated to do than would work for BBCodes in this forum which is kind of a bummer but oh well and you know I think that's a large enough wall of text to float images in so let's see if it works!


Preformat text, a close cousin of the code tag!
Code: Select all
[pre]...                                  Look at all those spaces!

Whee! I can make the text look like it does in the text entry field where I type posts!
        With lots of weird spacing and [b]the other BBCodes[/b] [sub]totally[/sub] work inside it!

Moooooore spaaaaaaacing! Oh hey, this line should probably be long enough to have a horizontal scrollbar, too! SCROLL, MWAHAHAHA- I mean...

Anyway, that's the demo.[/pre]

=
...                                  Look at all those spaces!

Whee! I can make the text look like it does in the text entry field where I type posts!
With lots of weird spacing and the other BBCodes totally work inside it!

Moooooore spaaaaaaacing! Oh hey, this line should probably be long enough to have a horizontal scrollbar, too! SCROLL, MWAHAHAHA- I mean...

Anyway, that's the demo.


Tab/indent a single line of text (Thanks to Shazbotdom!):
Code: Select all
[tab=30]This line should be indented 30 pixels on the left side. But ONLY the left side. Because it's the tab code and not the freaking blockquote tag that I was awesome enough to whack together and this line is probably long enough now![/tab]
And in comparison, this line should be all the way on the left where it belongs!

=
This line should be indented 30 pixels on the left side. But ONLY the left side. Because it's the tab code and not the freaking blockquote tag that I was awesome enough to whack together and this line is probably long enough now!
And in comparison, this line should be all the way on the left where it belongs!

Background highlighter!:
Code: Select all
[background=pink]Look at the girlie pink highlight![/background]
[background=#0066FF]Look at the boyish blue highlight![/background]
=
Look at the girlie pink highlight!
Look at the boyish blue highlight!

Quicklink to specific posts:
Code: Select all
[post=976627]This links to Kryo's Moderation for Newbies FAQ.[/post]
=
This links to Kryo's Moderation for Newbies FAQ.

Keep in mind that some of these should be USED SPARINGLY so as not to run afoul of the Garish Posts rule!

EDIT: Oh yeah, feel free to use this thread to play around with them if you want. Especially the table codes, since not everybody already knows how to do tables in HTML.

Re: Custom BBCodes for the new forum

PostPosted: Mon Apr 27, 2009 8:18 pm
by Tanaara
Here are some other BB codes used at another forum, they might be useful here:

[topic=100]Click me![/topic]- links topics (threads ) w/in the MB itself

[post=100]Click me![/post] - links specific posts w/in threads

[marquee=]Wheee![/marquee] - scrolling words/ images left, right, up, down

[spoiler]Some hidden text[/spoiler]

[HIDE=digression]This tag isn't strictly necessary, BTW[/hide]

these are all just part of the Advanced BBCode hack for php BB boards that can be found here

http://www.phpbbhacks.com/download/1059

(What can I say? I admin a PHP BB board and adore playing around with the internal code )

Re: Custom BBCodes for the new forum

PostPosted: Mon Apr 27, 2009 8:20 pm
by Shazbotdom
Ahhhh
I always forgot how to align with phpBB.
And I see that you guy's added those boxes for the posts. Thanks. :)

Re: Custom BBCodes for the new forum

PostPosted: Mon Apr 27, 2009 8:31 pm
by Reploid Productions
Some of those might require somewhat trickier HTML than I can recall quickly or easily, but I'll look into it! :geek:

Re: Custom BBCodes for the new forum

PostPosted: Mon Apr 27, 2009 9:05 pm
by Tsaraine
I would advise against scrolling text. Or anything animated really. *hearts the lack of animated smilies and that damned "eff you" smiley in particular*

Re: Custom BBCodes for the new forum

PostPosted: Tue Apr 28, 2009 5:18 am
by The Most Glorious Hack
Blockquote and strikethrough? Awesome. Got all I need.

Re: Custom BBCodes for the new forum

PostPosted: Tue Apr 28, 2009 5:11 pm
by Tanaara
Actually you don't need html with that hack - just dl to your comp, unzip and apply the code within to the php code where it says to, upload the now modified php style sheet ( I know I probably just used the wrong term) back to the core of the php and it impliments it.

I am about the least tech competent person out there and I adore how easy phpbb is to modify.

http://www.phpbb.com/

thats is the origional and most trustworthy php site out there and I know that any modification/ customization 'hack' that they are willing to offer on that site have not only been vetted but extensively tested.

Re: Custom BBCodes for the new forum

PostPosted: Fri May 01, 2009 12:44 pm
by Astholm
Resizing images is a pain, especially for my threads which have images in.

Re: Custom BBCodes for the new forum

PostPosted: Fri May 01, 2009 2:20 pm
by Naivetry
I know there's some way with InvisionPro to automatically resize images for display in each thread - not to thumbnail size, but just so that they don't break the page. You then click on the image to see the full-size version. Might be a good compromise? (I'm afraid I haven't the slightest idea where to find code for something like that.)

Re: Custom BBCodes for the new forum

PostPosted: Fri May 01, 2009 2:35 pm
by Chumblywumbly
The Most Glorious Hack wrote:Blockquote and strikethrough? Awesome. Got all I need.

Seconded.

Christmas comes early to NS!

Re: Custom BBCodes for the new forum

PostPosted: Fri May 01, 2009 2:37 pm
by Reploid Productions
Naivetry wrote:I know there's some way with InvisionPro to automatically resize images for display in each thread - not to thumbnail size, but just so that they don't break the page. You then click on the image to see the full-size version. Might be a good compromise? (I'm afraid I haven't the slightest idea where to find code for something like that.)

That sounds more like a programming type hurdle than a BBCode thing. Might be worth mentioning in one of the improvements threads.

Re: Custom BBCodes for the new forum

PostPosted: Fri May 01, 2009 3:10 pm
by Vault 10
Maybe we could if not turn off, then at least increase image size limits? At least the height.

600 might make sense for General, but the heart of the game is roleplaying, and in RP there's no need to limit the author. And modern monitors aren't 800x600.

Re: Custom BBCodes for the new forum

PostPosted: Fri May 01, 2009 3:32 pm
by Vorlon Prime
Behold!




Your friendly neighborhood vorlon has persuaded the administratorship to add horizontal rules! These inflexible symbols of order should inspire all to greater acts of community and systemic development!



Re: Custom BBCodes for the new forum

PostPosted: Sat May 02, 2009 4:39 am
by Vault 10
[spoiler]
iSpoil
[/spoiler]

No spoiler tags? We definitely need some.

Re: Custom BBCodes for the new forum

PostPosted: Sat May 02, 2009 12:50 pm
by Unibot
Category: Tester
Transportation:
this
Hospitality:
thing
Entertainment:
OUT!

Re: Custom BBCodes for the new forum

PostPosted: Sat May 02, 2009 1:05 pm
by Reploid Productions
Vault 10 wrote:
iSpoil


No spoiler tags? We definitely need some.

And now we have some :D

Re: Custom BBCodes for the new forum

PostPosted: Sat May 02, 2009 11:20 pm
by Spartzerina
That's nice! Perfect for my needs...

Re: Custom BBCodes for the new forum

PostPosted: Sat May 09, 2009 10:01 am
by Naivetry
Could we get short-cut tags to link to nations and regions in NS? I know the avatars are links, but sometimes it's useful to be able to refer to another nation that's not involved in the discussion; same goes for regions.

I'm thinking if you highlighted, say, "Pierconium" and clicked the "nation" tag, it would result in this:
Code: Select all
[url=http://www.nationstates.net/Pierconium]Pierconium[/url]


...and if you highlighted "The Pacific" and clicked "region," it would result in this:
Code: Select all
[url=http://www.nationstates.net/region=The Pacific]The Pacific[/url]


Maybe one that went to Passed WA Resolutions by Resolution number, as well, although I think that would be harder. To work the same way that the nation/region links did, it would have to find a number in the highlighted text and subtract 1 from that number (since the URL "start=#" is 1 less than the resolution number):
Code: Select all
[url=http://www.nationstates.net/page=WA_past_resolutions/start=18]World Assembly Resolution 19[/url]


I'm not sure if copying and incorporating the highlighted text into the BBCode that way is possible or not, but if not, just getting
Code: Select all
[url=http://www.nationstates.net/ ][/url]
for the "nation" tag,

Code: Select all
[url=http://www.nationstates.net/region= ][/url]
for the "region" tag, and

Code: Select all
[url=http://www.nationstates.net/page=WA_past_resolutions/start= ][/url]
for the "WA-Res" tag (though that might confuse some people unless the URL numbering system was changed) would still be pretty cool. :)

Re: Custom BBCodes for the new forum

PostPosted: Sat May 09, 2009 10:12 am
by New Illuve
How about a [sarcasm] tag?

Re: Custom BBCodes for the new forum

PostPosted: Sat May 09, 2009 5:38 pm
by [violet]
Naivetry wrote:Could we get short-cut tags to link to nations and regions in NS?

Those are some great ideas.

Re: Custom BBCodes for the new forum

PostPosted: Sat May 09, 2009 6:13 pm
by Reploid Productions
Well damn, why didn't I think of that? :lol:

Re: Custom BBCodes for the new forum

PostPosted: Tue May 12, 2009 9:06 am
by Naivetry
So awesome. :D Could we get the [nation] and [region] tags on the forums, as well?

Re: Custom BBCodes for the new forum

PostPosted: Fri May 15, 2009 8:23 pm
by Allech-Atreus
Perhaps a code that provided easy links to threads, rather like the nation and region codes, would help streamline things?

Along the same line- a tag for linking to WA resolutions! The WA res archives would be more easily accessible in that manner; rather than having to search out the URL for each specific res, you could simply do a [WA] [/WA] tag, rather like you've done with nation and region links.

Extending this to the game itself, like WFEs and HQs would be an incredible help as well.

EDIT: I've just now wondered- are the [nation] and [region] tags being used in the forum? I can't seem to get them to work (which would make sense if they aren't coded in...)

Re: Custom BBCodes for the new forum

PostPosted: Fri May 15, 2009 10:57 pm
by [violet]
I've (just) added [nation] and [region] tags, but they're basic only -- they make links with no flags or long titles.

Re: Custom BBCodes for the new forum

PostPosted: Sat May 16, 2009 8:59 am
by Unibot
Along the same line- a tag for linking to WA resolutions! The WA res archives would be more easily accessible in that manner; rather than having to search out the URL for each specific res, you could simply do a [WA] [/WA] tag, rather like you've done with nation and region links.


Yeah I was just about to suggest that, I was thinking possibly it could be like the [thread] feature because it wouldn't use a full address bar to code.

For example, lets say I wrote this particularly crappy gun control resolution and was trying to get delegates to approve it, and the name of the resolution is cleverly named 'Gun Control'.

I'd type this into a proposal ad telegram..

Code: Select all
[proposal=Gun Control]Vote on my proposal![/proposal]


Which would show up like this ... Vote on my proposal!

The words after the equal sign in the code would be submitted into this url,

Code: Select all
http://www.nationstates.net/page=UN_proposal1/match=XXXXX


Eh? It was just a thought, proposal telegrams could really use a link feature, its hard enough to get delegates to approve your work anymore.

Thanks for Reading :D
Unibot