Avalon's factbook CODE (full)

Lennart

TNPer
Hi there, this is Lennart sharing his crazy code again, the code to get thjis famous factbook of mine lol>> http://www.nationstates.net/nation=avalon/detail=factbook/id=main

Long ago, I shared my Wiki-style code on here, and my use of factbook extensions, because it had some clever ideas you could use and because I was rather tired of everyone using the awful (well, not that bad, but not so elegant either) "ponderosa wiki-style code guide".(or whatever the name is). Now, the new dispatch system have rendered factbook extensions obsolete (well, kinda, it can be useful if you go over the dispatch limit, which used to be something crazy , like 250 dispatches or so, but I do know people who has run out of them).

Also, there is this tab menu system I seem to have made popular, the main idea comes from a friendly nation in Democratic Socialist Assembly, called Herrebrugh, and I have his permission to use and share it with you. In fact, I shared it with some nations before, and most of them, off the top of my head I remember Syrixia, Kalti, Cascadia and Darcania, have made AMAZING things with them. In fact, stop reading this crap and go check their stuff.

OK, so now is when the code comes in. Let's start with the header and tab menu, because this part will be pretty much the same on every single page of your factbook (although you can add as many variations as you see fit). FIRST I'm going to share an oversimplified concept of how tabs work (it might not seem so at first sight, but it may be the most useful part of this post). SECOND, a simplified version of my code with notes, not 100% accurate and obviously wouldn't work if you copy-pasted it, and you can use that as a guide. The THIRD bbcode block will be MY RAW CODE, with my national symbols, images and whatnot.

code 1: tabs concept
Code:
[background-block=midnightblue]
[background=white][color=white]|[/color] [color=midnightblue]1 [/color][color=white]|[/color][/background]
[url=LINK] [color=white]2[/color][/url] [color=midnightblue]|[/color]
[url=LINK] [color=white]3[/color][/url] [color=midnightblue]|[/color]
[url=LINK] [color=white]4[/color][/url] [color=midnightblue]|[/color]
[url=LINK] [color=white]5[/color][/url] [color=midnightblue]|[/color]
[url=LINK] [color=white]6[/color][/url][color=midnightblue]|[/color]
[/background-block][background-block=white][color=white]´[/color][/background-block]

Code 2: my code butchered with notes
Code:
[background-block=white] <-------whatever colour you want for the header's background
[hr] <-------- A line lol
[center][IMG]header-image-url[/IMG][/center] <---- image hosted outside NS, I use tinypic, this image can also be placed below the tab menu, or, as I do, both above and below lol
[/background-block] <------ make sure your closing tags are right, otherwise things will look funny.

[align=center][background-block=gold][color=gold].[/color][/background-block] <------ this code is for the yellow line over my tab manu, is a not so elegant solution to some limitations. You don't really need this line, or you can paint it in a different colour.

v _Below this line, it comes the hardest part to code lol_ the tab menu. 1, 2, 3, 4, 5 and 6 are the different tabs (home, overview, etc) v
-------------------------------------------------------------
[background-block=midnightblue] <---background colour for all tabs (except the selected one)
[background=white][color=white]|[/color] [color=midnightblue]1 [/color][color=white]|[/color][/background] <--- code for the selected tab. in this case is 1, it doesn't need a link, cause it's the current page. Every other tab needs a link so you can navigate and open new content.

[url=LINK] [color=white]2[/color][/url] [color=midnightblue]|[/color]<---- as you can see, every tab has a link and the "color" tags and | symbols are just decorations, you might find it nice the way I did, but you can also come up with diferent ways to make the tabs fit nicely.
[url=LINK] [color=white]3[/color][/url] [color=midnightblue]|[/color]
[url=LINK] [color=white]4[/color][/url] [color=midnightblue]|[/color]
[url=LINK] [color=white]5[/color][/url] [color=midnightblue]|[/color]
[url=LINK] [color=white]6[/color][/url][color=midnightblue]|[/color]

[/background-block][background-block=white][color=white]´[/color][/background-block]<----- A white line I needed, that you might not need.

[background-block=white][center][IMG]Image-url[/IMG][/center][color=white]´[/color][/background-block][/align]<---- this image would be a second header, you might not like this idea for your factbook, but I do. That's the image I change on every page, fitting every topic nicely.
[hr]

Code 3: my rrrrrrrraw code
Code:
[anchor=uno][/anchor]
[background-block=white][hr]
[center][IMG]http://i57.tinypic.com/123upar.png[/IMG][/center]
[/background-block]
[align=center][background-block=gold][color=gold].[/color][/background-block]
[background-block=midnightblue][background=white][color=white]|[/color] [color=midnightblue]Home [/color][color=white]|[/color][/background][url=http://www.nationstates.net/page=dispatch/id=452977#uno] [color=white]Overview and Facts[/color][/url] [color=midnightblue]|[/color] [url=http://www.nationstates.net/page=dispatch/id=452982#uno] [color=white]The Round Table[/color][/url] [color=midnightblue]|[/color] [url=http://www.nationstates.net/page=dispatch/id=452987#uno] [color=white]Avalon Defence Force[/color][/url] [color=midnightblue]|[/color] [url=http://www.nationstates.net/page=dispatch/id=452986#uno] [color=white]Citizenship[/color][/url] [color=midnightblue]|[/color] [url=http://www.nationstates.net/page=dispatch/id=452989#uno] [color=white]Embassies[/color][/url][color=midnightblue]|[/color][/background-block][background-block=white][color=white]´[/color][/background-block]
[background-block=white][center][IMG]http://i59.tinypic.com/icuwba.png[/IMG][/center][color=white]´[/color][/background-block][/align][hr]

OK, so I don't really have a lot of time and I want to work on my embassy program and watch Liverpool vs Bournemouth, so I leave this here for now and let me know any doubts you may have, I will try to help everybody with any problem, even if you think is a stupid detail.

Cheers mates!
 
Well, way back when my original Factbook code was designed and built off the code that Lennart uses. I just went slightly overboard with it.
 
Thanks for the nice words guys, I'll keep updating this till I get to share ALL my stuff.

Remember you don't have to credit me or Herrebrugh in any way, but maybe a TG saying "thank you" would be nice, or voting up his own factbook, he's a good fellow... I don't know if I ever tried to lure him to come to TNP, maybe I should do that now lol
 
Lennart:
Thanks for the nice words guys, I'll keep updating this till I get to share ALL my stuff.

Remember you don't have to credit me or Herrebrugh in any way, but maybe a TG saying "thank you" would be nice, or voting up his own factbook, he's a good fellow... I don't know if I ever tried to lure him to come to TNP, maybe I should do that now lol
Outstanding factbook format!

I am wondering how you can have custom font in your factbook.

It would be great, if you can let me know. Thanks! :yes:
 
Gim:
Lennart:
Thanks for the nice words guys, I'll keep updating this till I get to share ALL my stuff.

Remember you don't have to credit me or Herrebrugh in any way, but maybe a TG saying "thank you" would be nice, or voting up his own factbook, he's a good fellow... I don't know if I ever tried to lure him to come to TNP, maybe I should do that now lol
Outstanding factbook format!

I am wondering how you can have custom font in your factbook.

It would be great, if you can let me know. Thanks! :yes:
Use the "font" tag like this:

Code:
[font=georgia]Hello TNP[/font]

You can change "georgia" for any other font you like, you have a few of them to choose from; when I created the factbook of Avalon, I remember using georgia and verdana because Fb's bbcode is a bit limited, and it wouldn't let me get palatino linotype or any other fancy thing. Try georgia, verdana, arial, times new roman, and maybe even impact or garamond. Never, and I mean NEVER try Comic sans, plese... just don't
 
Lennart:
Gim:
Lennart:
Thanks for the nice words guys, I'll keep updating this till I get to share ALL my stuff.

Remember you don't have to credit me or Herrebrugh in any way, but maybe a TG saying "thank you" would be nice, or voting up his own factbook, he's a good fellow... I don't know if I ever tried to lure him to come to TNP, maybe I should do that now lol
Outstanding factbook format!

I am wondering how you can have custom font in your factbook.

It would be great, if you can let me know. Thanks! :yes:
Use the tag "font" like this:

Code:
[font=georgia]Hello TNP[/font]

You can change "georgia" for any other font you like, you have a few of them to choose from; when I created the factbook of Avalon, I remember using georgia and verdana because Fb's bbcode is a bit limited, and it wouldn't let me get palatino linotype or any other fancy thing. Try georgia, verdana, arial, times new roman, and maybe even impact or garamond. Never, and I mean NEVER try Comic sans, plese... just don't
Ah, I see. Thanks!

And yes, Comic Sans is just... :facepalm:
 
I'm going to try get more detail ready for my factbook before I go for the huge overhaul, but I'll be sure to message him with a thanks. Try to get him to join us Lennart, but some of the RP here might be a bit below his standard :P
 
mcmasterdonia:
I'm going to try get more detail ready for my factbook before I go for the huge overhaul, but I'll be sure to message him with a thanks. Try to get him to join us Lennart, but some of the RP here might be a bit below his standard :P
Tried to, didn't work. He's strongly identified with the DSA and his activity out of the region seems to be limited.

RP in the DSA is kinda cool, don't get me wrong, I even learned a bit from them, but the standards of TNP are actually above theirs.

Hollanda:
Avalon, I'll pick your factbook code for my factbook. that simple!
No worries, mate, enjoy

edit:also this needs an update, I'll share more code soon, any requests?
 
As I said yesterday, I need a little help in my factbook :P

Code:
[background-block=white]
[hr] 
[center][img]http://i.imgur.com/OX52H8U.jpg?1[/img][/center]
[/background-block] 
[align=center][background-block=DodgerBlue][color=DodgerBlue].[/color][/background-block] 
[background-block=#0AC92B] [color=#0AC92B]|[/color] [url=http://www.nationstates.net/nation=lorbank/detail=factbook/id=484877][color=white]Home[/color][/url]  [color=white]|[/color] [color=white]Overview[/color] [color=white]|[/color] [url=LINK] [color=white]History[/color][/url] [color=#0AC92B]|[/color] [url=LINK] [color=white]Government[/color][/url] [color=#0AC92B]|[/color] [url=http://www.nationstates.net/nation=lorbank/detail=factbook/id=465152] [color=white]National Anthem[/color][/url] [color=#0AC92B]|[/color][url=http://www.nationstates.net/nation=lorbank/detail=factbook/id=455935] [color=white]Foreign relations[/color][/url][color=#0AC92B]|[/color][/background-block]
 [color=white]´[/color][/align]
 
Lorbank:
As I said yesterday, I need a little help in my factbook :P

Code:
[background-block=white]
[hr] 
[center][img]http://i.imgur.com/OX52H8U.jpg?1[/img][/center]
[/background-block] 
[align=center][background-block=DodgerBlue][color=DodgerBlue].[/color][/background-block] 
[background-block=#0AC92B] [color=#0AC92B]|[/color] [url=http://www.nationstates.net/nation=lorbank/detail=factbook/id=484877][color=white]Home[/color][/url]  [color=white]|[/color] [color=white]Overview[/color] [color=white]|[/color] [url=LINK] [color=white]History[/color][/url] [color=#0AC92B]|[/color] [url=LINK] [color=white]Government[/color][/url] [color=#0AC92B]|[/color] [url=http://www.nationstates.net/nation=lorbank/detail=factbook/id=465152] [color=white]National Anthem[/color][/url] [color=#0AC92B]|[/color][url=http://www.nationstates.net/nation=lorbank/detail=factbook/id=455935] [color=white]Foreign relations[/color][/url][color=#0AC92B]|[/color][/background-block]
 [color=white]´[/color][/align]
It looks fine. What do you need help on?
 
Gim:
Lorbank:
As I said yesterday, I need a little help in my factbook :P

Code:
[background-block=white]
[hr] 
[center][img]http://i.imgur.com/OX52H8U.jpg?1[/img][/center]
[/background-block] 
[align=center][background-block=DodgerBlue][color=DodgerBlue].[/color][/background-block] 
[background-block=#0AC92B] [color=#0AC92B]|[/color] [url=http://www.nationstates.net/nation=lorbank/detail=factbook/id=484877][color=white]Home[/color][/url]  [color=white]|[/color] [color=white]Overview[/color] [color=white]|[/color] [url=LINK] [color=white]History[/color][/url] [color=#0AC92B]|[/color] [url=LINK] [color=white]Government[/color][/url] [color=#0AC92B]|[/color] [url=http://www.nationstates.net/nation=lorbank/detail=factbook/id=465152] [color=white]National Anthem[/color][/url] [color=#0AC92B]|[/color][url=http://www.nationstates.net/nation=lorbank/detail=factbook/id=455935] [color=white]Foreign relations[/color][/url][color=#0AC92B]|[/color][/background-block]
 [color=white]´[/color][/align]
It looks fine. What do you need help on?
If you go to my Overview factbook, you can see that, the Overview title isn't highlighted as in the Home page... :/
Can you help me?
 
Lorbank:
Gim:
Lorbank:
As I said yesterday, I need a little help in my factbook :P

Code:
[background-block=white]
[hr] 
[center][img]http://i.imgur.com/OX52H8U.jpg?1[/img][/center]
[/background-block] 
[align=center][background-block=DodgerBlue][color=DodgerBlue].[/color][/background-block] 
[background-block=#0AC92B] [color=#0AC92B]|[/color] [url=http://www.nationstates.net/nation=lorbank/detail=factbook/id=484877][color=white]Home[/color][/url]  [color=white]|[/color] [color=white]Overview[/color] [color=white]|[/color] [url=LINK] [color=white]History[/color][/url] [color=#0AC92B]|[/color] [url=LINK] [color=white]Government[/color][/url] [color=#0AC92B]|[/color] [url=http://www.nationstates.net/nation=lorbank/detail=factbook/id=465152] [color=white]National Anthem[/color][/url] [color=#0AC92B]|[/color][url=http://www.nationstates.net/nation=lorbank/detail=factbook/id=455935] [color=white]Foreign relations[/color][/url][color=#0AC92B]|[/color][/background-block]
 [color=white]´[/color][/align]
It looks fine. What do you need help on?
If you go to my Overview factbook, you can see that, the Overview title isn't highlighted as in the Home page... :/
Can you help me?
Highlighted? You mean it doesn't let you click on a link?
 
I think he means it doesn't highlight when you're in that tab. (Highlighted because that's the selected tab and you're in it.)
 
I would like to see the title of Overview like the Home, like in this picture:
IvGqHzg.png

But currently, it shows this:
zVeE3YG.png
 
Back
Top