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 2: my code butchered with notes
Code 3: my rrrrrrrraw code
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!
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!