NATION

PASSWORD

Custom BBCodes for the new forum

Bug reports, general help, ideas for improvements, and questions about how things are meant to work.
User avatar
Reploid Productions
Director of Moderation
 
Posts: 30507
Founded: Antiquity
Democratic Socialists

Custom BBCodes for the new forum

Postby Reploid Productions » Mon Apr 27, 2009 7:12 pm

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.
Last edited by Reploid Productions on Mon Apr 19, 2010 11:10 pm, edited 23 times in total.
Forum mod since May 8, 2003 -- Game mod since May 19, 2003 -- Nation turned 20 on March 23, 2023!
Sunset's DoGA FAQ - For those using DoGA to make their NS military and such.
One Stop Rules Shop -- Reppy's Sig Workshop -- Getting Help Page
[violet] wrote:Maybe we could power our new search engine from the sexual tension between you two.
Char Aznable/Giant Meteor 2024! - Forcing humanity to move into space and progress whether we goddamn want to or not!

User avatar
Tanaara
Ambassador
 
Posts: 1179
Founded: Feb 27, 2005
Ex-Nation

Re: Custom BBCodes for the new forum

Postby Tanaara » Mon Apr 27, 2009 8:18 pm

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 )
The mathematical probability of a common cat doing exactly as it pleases is the one scientific absolute in the world. -Lynn M. Osband

"We're not so blase, not so willing to accept that we're safe and we can let someone do our security for us. We're not going to sit there and wait for somebody else to do it because if you wait, it might be too late." Jennifer Allen re: Northwest Airlines Flight 253 - quoted for the Win!

User avatar
Shazbotdom
Postmaster-General
 
Posts: 11123
Founded: Sep 28, 2004
Anarchy

Re: Custom BBCodes for the new forum

Postby Shazbotdom » Mon Apr 27, 2009 8:20 pm

Ahhhh
I always forgot how to align with phpBB.
And I see that you guy's added those boxes for the posts. Thanks. :)
ShazWeb || IIWiki || Discord: shazbertbot || 1 x NFL Picks League Champion (2021)
CosmoCast || SISA || CCD || CrawDaddy || SCIA || COPEC || Boudreaux's || CLS || SNC || ShazAir || BHC || TWO
NHL: NYR (114) 0 - 0 WSH (91) | COL (105) 0 - 0 WPG (110) | VGK (96) 0 - 0 ...
NBA: Pelicans (6) 49-33 || NCAA MBB: Tulane 20-16 | LSU 22-15 || NCAA WSB: LSU 33-8

User avatar
Reploid Productions
Director of Moderation
 
Posts: 30507
Founded: Antiquity
Democratic Socialists

Re: Custom BBCodes for the new forum

Postby Reploid Productions » Mon Apr 27, 2009 8:31 pm

Some of those might require somewhat trickier HTML than I can recall quickly or easily, but I'll look into it! :geek:
Forum mod since May 8, 2003 -- Game mod since May 19, 2003 -- Nation turned 20 on March 23, 2023!
Sunset's DoGA FAQ - For those using DoGA to make their NS military and such.
One Stop Rules Shop -- Reppy's Sig Workshop -- Getting Help Page
[violet] wrote:Maybe we could power our new search engine from the sexual tension between you two.
Char Aznable/Giant Meteor 2024! - Forcing humanity to move into space and progress whether we goddamn want to or not!

User avatar
Tsaraine
Retired Moderator
 
Posts: 4033
Founded: Antiquity
Ex-Nation

Re: Custom BBCodes for the new forum

Postby Tsaraine » Mon Apr 27, 2009 9:05 pm

I would advise against scrolling text. Or anything animated really. *hearts the lack of animated smilies and that damned "eff you" smiley in particular*

User avatar
The Most Glorious Hack
Retired Moderator
 
Posts: 2427
Founded: Mar 11, 2003
Anarchy

Re: Custom BBCodes for the new forum

Postby The Most Glorious Hack » Tue Apr 28, 2009 5:18 am

Blockquote and strikethrough? Awesome. Got all I need.
Now the stars they are all angled wrong,
And the sun and the moon refuse to burn.
But I remember a message,
In a demon's hand:
"Dread the passage of Jesus, for he does not return."

-Nick Cave and the Bad Seeds, "Time Jesum Transeuntum Et Non Riverentum"



User avatar
Tanaara
Ambassador
 
Posts: 1179
Founded: Feb 27, 2005
Ex-Nation

Re: Custom BBCodes for the new forum

Postby Tanaara » Tue Apr 28, 2009 5:11 pm

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.
Last edited by Tanaara on Tue Apr 28, 2009 5:15 pm, edited 1 time in total.
The mathematical probability of a common cat doing exactly as it pleases is the one scientific absolute in the world. -Lynn M. Osband

"We're not so blase, not so willing to accept that we're safe and we can let someone do our security for us. We're not going to sit there and wait for somebody else to do it because if you wait, it might be too late." Jennifer Allen re: Northwest Airlines Flight 253 - quoted for the Win!

User avatar
Astholm
Senator
 
Posts: 4775
Founded: Jan 06, 2009
Ex-Nation

Re: Custom BBCodes for the new forum

Postby Astholm » Fri May 01, 2009 12:44 pm

Resizing images is a pain, especially for my threads which have images in.
[spoiler=About Me]Based on the United Kingdom, but enlarged version with alternate history.
On IIWiki
I have multiple puppets here; only a select few are used to represent the continent of Astholm; others used represent Westholme, and do not artificially boost my nation's statistics.Previously i used puppets with nation names that did not identify as Astholm (e.g. Australis Australia; now all new puppets use ASTHLM, NORTHLM, SOUTHLM, WESTHLM (HLM denoting The Holmes.
NOTE: Other uses of Astholm here have a different continuity and refer to work created by the user Astholm, not the nation

User avatar
Naivetry
Ambassador
 
Posts: 1294
Founded: Aug 02, 2006
Left-wing Utopia

Re: Custom BBCodes for the new forum

Postby Naivetry » Fri May 01, 2009 2:20 pm

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.)

User avatar
Chumblywumbly
Negotiator
 
Posts: 5615
Founded: Feb 22, 2006
Ex-Nation

Re: Custom BBCodes for the new forum

Postby Chumblywumbly » Fri May 01, 2009 2:35 pm

The Most Glorious Hack wrote:Blockquote and strikethrough? Awesome. Got all I need.

Seconded.

Christmas comes early to NS!
I suffer, I labour, I dream, I enjoy, I think; and, in a word, when my last hour strikes, I shall have lived.

User avatar
Reploid Productions
Director of Moderation
 
Posts: 30507
Founded: Antiquity
Democratic Socialists

Re: Custom BBCodes for the new forum

Postby Reploid Productions » Fri May 01, 2009 2:37 pm

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.
Forum mod since May 8, 2003 -- Game mod since May 19, 2003 -- Nation turned 20 on March 23, 2023!
Sunset's DoGA FAQ - For those using DoGA to make their NS military and such.
One Stop Rules Shop -- Reppy's Sig Workshop -- Getting Help Page
[violet] wrote:Maybe we could power our new search engine from the sexual tension between you two.
Char Aznable/Giant Meteor 2024! - Forcing humanity to move into space and progress whether we goddamn want to or not!

User avatar
Vault 10
Minister
 
Posts: 2471
Founded: Sep 15, 2006
Ex-Nation

Re: Custom BBCodes for the new forum

Postby Vault 10 » Fri May 01, 2009 3:10 pm

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.
There is a line most people say they will never cross. It is usually something they have done long ago when they thought no one was watching.




User avatar
Vorlon Prime
Attaché
 
Posts: 67
Founded: May 21, 2004
Inoffensive Centrist Democracy

Re: Custom BBCodes for the new forum

Postby Vorlon Prime » Fri May 01, 2009 3:32 pm

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!


Last edited by Vorlon Prime on Fri May 01, 2009 3:33 pm, edited 1 time in total.

User avatar
Vault 10
Minister
 
Posts: 2471
Founded: Sep 15, 2006
Ex-Nation

Re: Custom BBCodes for the new forum

Postby Vault 10 » Sat May 02, 2009 4:39 am

[spoiler]
iSpoil
[/spoiler]

No spoiler tags? We definitely need some.
There is a line most people say they will never cross. It is usually something they have done long ago when they thought no one was watching.




User avatar
Unibot
Senator
 
Posts: 4292
Founded: May 25, 2008
Ex-Nation

Re: Custom BBCodes for the new forum

Postby Unibot » Sat May 02, 2009 12:50 pm

Category: Tester
Transportation:
this
Hospitality:
thing
Entertainment:
OUT!
Last edited by Unibot on Sat May 02, 2009 1:01 pm, edited 2 times in total.

User avatar
Reploid Productions
Director of Moderation
 
Posts: 30507
Founded: Antiquity
Democratic Socialists

Re: Custom BBCodes for the new forum

Postby Reploid Productions » Sat May 02, 2009 1:05 pm

Vault 10 wrote:
iSpoil


No spoiler tags? We definitely need some.

And now we have some :D
Forum mod since May 8, 2003 -- Game mod since May 19, 2003 -- Nation turned 20 on March 23, 2023!
Sunset's DoGA FAQ - For those using DoGA to make their NS military and such.
One Stop Rules Shop -- Reppy's Sig Workshop -- Getting Help Page
[violet] wrote:Maybe we could power our new search engine from the sexual tension between you two.
Char Aznable/Giant Meteor 2024! - Forcing humanity to move into space and progress whether we goddamn want to or not!

User avatar
Spartzerina
Envoy
 
Posts: 276
Founded: May 26, 2008
Ex-Nation

Re: Custom BBCodes for the new forum

Postby Spartzerina » Sat May 02, 2009 11:20 pm

That's nice! Perfect for my needs...
The Council of Narnia - Our Forums
CoN Vice Chancellor
FRA Vice Chancellor
A male of the species Homo sapiens

User avatar
Naivetry
Ambassador
 
Posts: 1294
Founded: Aug 02, 2006
Left-wing Utopia

Re: Custom BBCodes for the new forum

Postby Naivetry » Sat May 09, 2009 10:01 am

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. :)
Last edited by Naivetry on Sat May 09, 2009 10:02 am, edited 1 time in total.

User avatar
New Illuve
Spokesperson
 
Posts: 125
Founded: Aug 24, 2007
Ex-Nation

Re: Custom BBCodes for the new forum

Postby New Illuve » Sat May 09, 2009 10:12 am

How about a [sarcasm] tag?
Submitted by my hand, at the order of the the most holy Avatar of the god Illuve,
Ms. Aldis Gunnlæif
Ambassador from the Holy Empire of New Illuve to the World Assembly


Aesir and Asynjur, Vanr and Vanir: grant me the serenity to accept the things I cannot change; the courage to change the things I can; and the wisdom to know the difference.

User avatar
[violet]
Executive Director
 
Posts: 16205
Founded: Antiquity

Re: Custom BBCodes for the new forum

Postby [violet] » Sat May 09, 2009 5:38 pm

Naivetry wrote:Could we get short-cut tags to link to nations and regions in NS?

Those are some great ideas.

User avatar
Reploid Productions
Director of Moderation
 
Posts: 30507
Founded: Antiquity
Democratic Socialists

Re: Custom BBCodes for the new forum

Postby Reploid Productions » Sat May 09, 2009 6:13 pm

Well damn, why didn't I think of that? :lol:
Forum mod since May 8, 2003 -- Game mod since May 19, 2003 -- Nation turned 20 on March 23, 2023!
Sunset's DoGA FAQ - For those using DoGA to make their NS military and such.
One Stop Rules Shop -- Reppy's Sig Workshop -- Getting Help Page
[violet] wrote:Maybe we could power our new search engine from the sexual tension between you two.
Char Aznable/Giant Meteor 2024! - Forcing humanity to move into space and progress whether we goddamn want to or not!

User avatar
Naivetry
Ambassador
 
Posts: 1294
Founded: Aug 02, 2006
Left-wing Utopia

Re: Custom BBCodes for the new forum

Postby Naivetry » Tue May 12, 2009 9:06 am

So awesome. :D Could we get the [nation] and [region] tags on the forums, as well?

User avatar
Allech-Atreus
Attaché
 
Posts: 91
Founded: Apr 01, 2004
Ex-Nation

Re: Custom BBCodes for the new forum

Postby Allech-Atreus » Fri May 15, 2009 8:23 pm

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...)
Last edited by Allech-Atreus on Fri May 15, 2009 9:55 pm, edited 1 time in total.
Ideological Bulwark #68

User avatar
[violet]
Executive Director
 
Posts: 16205
Founded: Antiquity

Re: Custom BBCodes for the new forum

Postby [violet] » Fri May 15, 2009 10:57 pm

I've (just) added [nation] and [region] tags, but they're basic only -- they make links with no flags or long titles.

User avatar
Unibot
Senator
 
Posts: 4292
Founded: May 25, 2008
Ex-Nation

Re: Custom BBCodes for the new forum

Postby Unibot » Sat May 16, 2009 8:59 am

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
Last edited by Unibot on Sat May 16, 2009 9:07 am, edited 2 times in total.

Next

Advertisement

Remove ads

Return to Technical

Who is online

Users browsing this forum: Basque Dominion, Central Almyra, Gesaria, Manuelian Empire

Advertisement

Remove ads