Qbasicnews.com

Full Version: DOCUMENTATION REVOTE
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9
Each item has to be stored in a different page, i don't see how nesting could be needed. That would overly complicate things and less people would want to contribute if they have to type tons of open/close "tags" to document simple stuff, while using non-standard tags.

The contents are stored in different pages, the indexes could be organized anyhow people want, by category, but type, just alphabetically, etc. A parsing tool will have to use the right page titles to scan for keywords and then parse each page linked from there.

Wikiedit could be changed to insert the fbdoc tags depending on the keys pressed, but i checked the code and it was a mess.. Jscript..
Javascript is what I do... I'll check it out later.

Nesting is useful for the few pages in the documentation that ARENT a keyword reference, such as pages detailing arrays, language usage, operators, tutorials, link pages (such as an a-z index). You do not need a closing tag unless there is an actual nested section, it's parseable both ways.

EDIT: Okay, I see it now. I would feel a little more secure with a tag for this (so you could have section titles that could translate into DIV ids) but it'll work.
That can be done with wiki code, check out this page in the FBWiki:
http://www.freebasic.net/wiki/FormattingRules
Ok, I've ported the Sample Style to the offical wiki at FreeBASIC.NET:
http://www.freebasic.net/wiki/wikka.php?...tylesample

This version also removes all the HTML and CSS needed in the last one, now pure Wikicode, I'll add comments to it's code in a bit.
Okay, here's a draft of the table o' comments, and while I hate to admit these things, the source looks nicer. It should be parseable, but you'd have to make a couple of case-exceptions.

http://www.freebasic.net/wiki/wikka.php?wakka=DraftToc

Once again, I would very much like to style this page differently from the other pages.

Vic, maybe at least a "LinkList" section and a "Toc" would help on that front?

EDIT: Urger, you should include an argument table under the syntax section.

Also, as antoni suggested in an older post, a screenshot/console output for the example would be nice to have its own section.
I'm including those now, but it made me think, where are we going to host the screen shots? Also, what size should screen shots be, and what should the naming scheme be?
Personaly, the images can't be too large, or they will interupt the flow of the page, as for naming.

EDIT_BY_JOFERS:
screenshot names are easy:
WikiPageName.screen1.gif
WikiPageName.screen2.gif

Store them in:
http://www.freebasic.net/wiki/screens/

And then post the screenshots on this forum so vic can upload them Smile
As for adding a key shortcut, vic, if you look in:
http://www.freebasic.net/wiki/3rdparty/p...kiedit2.js

Look down where there is a giant switch (as in c++) block, under a line of code:
Code:
WikiEdit.prototype.keyDown = function (event) {
If you add this to the switch block:

Code:
case 2118:
if (sel) {
res = this.insTag("{{fbdoc item=\"title\" value=\"", "\"}}", 0, 1);
} else {
res = this.insTag("{{fbdoc item=\"title\" value=\"\"}}", "", 0, 1);
}
break;
insTag seemse to put the first string before the cursor, and the second string after the cursor. sel holds whether or not there is a selection, and Key holds the key pressed, which is the number after case. 2118 is ctrl+f (don't use that one)

If you would like to find out different key values, go here:
http://www.squarefree.com/shell/shell.html

and paste this:
Code:
document.body.onkeydown = function(event) { var Key = event.keyCode; if (Key==0) Key = event.charCode; if (Key==8 || Key==13 || Key==32 || (Key>45 && Key<91) || (Key>93 && Key<112) || (Key>123 && Key<144) || (Key>145 && Key<255)) remundo = Key; if (event.altKey && !event.ctrlKey) Key=Key+4096; if (event.ctrlKey && !event.altKey) Key=Key+2048; window.print(Key); }

and press 'enter'. Then it will spit out the key codes every time you press down a key, you can experiment with your ctrl+whatevers that way.
I had to register as WikiaetherFox, it didn't let me any other way.
AetherFox should work. In fact, it's already registered, according to the wiki

Heh, look at the TOC. The default style for the wikki uses bad css (notice the hanging floats.)

I would LOVE to get in there and mess with those styles.
I just registered as AetherFox.
I forgot about Wiki naming conventions (capitalisation).
Pages: 1 2 3 4 5 6 7 8 9