v50 Steam/Premium information for editors
- v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
- Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.
Editing Create new FAQ category
Jump to navigation
Jump to search
Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.
If you are creating a redirect to the current version's page, do not use any namespace. For example: use #REDIRECT [[Cat]], not #REDIRECT [[Main:Cat]] or #REDIRECT [[cv:Cat]]. See DF:Versions for more information.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
+ | I used a fairly complex system to set up the FAQ page; involving templates, tables, and invisible headers. So this page is me providing an explanation of how it all works together, and the basic code which you can copy-paste to create your own FAQ category. | ||
+ | |||
+ | [[User:Juckto|Juckto]] 20:56, 26 November 2007 (EST) | ||
+ | |||
+ | |||
+ | __TOC__ | ||
+ | |||
+ | |||
=Template= | =Template= | ||
A template is a wiki tool that acts kinda like a global "copy-paste" function. If you create a template page you can use it anywhere else on the wiki by simply using the <nowiki>{{ }}</nowiki> code. | A template is a wiki tool that acts kinda like a global "copy-paste" function. If you create a template page you can use it anywhere else on the wiki by simply using the <nowiki>{{ }}</nowiki> code. | ||
Line 24: | Line 32: | ||
This is the table I used in the templates, and the invisible comments I included to help anyone who wanted to add new questions to the template at a later date. Copy this entire section into your template page, and replace <u>everything</u> that is shown here in bold (note, some is off to the right). | This is the table I used in the templates, and the invisible comments I included to help anyone who wanted to add new questions to the template at a later date. Copy this entire section into your template page, and replace <u>everything</u> that is shown here in bold (note, some is off to the right). | ||
− | On that note, I'm sorry about breaking the width on this page, but it has to be done otherwise this code breaks (badly) when you copy | + | On that note, I'm sorry about breaking the width on this page, but it has to be done otherwise this code breaks (badly) when you copy paste it. |
− | <nowiki> <!---To add a new question | + | <nowiki> <!---To add a new question you need to scroll down to the bottom of this page and edit in TWO lines of code in the indicated spot. |
+ | The 2 lines should be: | ||
− | |- | + | |- |
− | | [[Your question exactly as you want it to be read by others]] | + | | [[Your question exactly as you want it to be read by others]] |
− | + | Go ahead and scroll down now.---> | |
− | ---> | ||
− | + | {| align=center style="width: 80%; background: #DEDEDE; border: 1px solid #999; border-left-color:#CDCDCD; border-top-color:#CDCDCD; text-align: center" | |
− | {| | + | |+ style="color: #fff; background: #bbb; border: 1px solid #999; border-left-color:#CDCDCD; border-top-color:#CDCDCD; padding: 0.2em 0.5em; text-align: center" | '''</nowiki> <b>(Insert your category title here)</b> <nowiki> FAQ''' |
− | + | |- | |
− | |- | + | | [[</nowiki><b> (Your first question) </b><nowiki>]] |
− | | [[ | + | |- |
− | |- | + | | [[</nowiki><b> (Your second question) </b><nowiki>]] |
− | | [[ | + | |- |
− | |- | + | | [[</nowiki><b> (Etcetera) </b><nowiki>]] |
− | | [[ | + | <!--- ########### Insert any new questions above this line ########### ---> |
− | + | |- | |
− | + | |height="10"| | |
− | <!--- ########### Insert any new questions above this line ########### ---> | + | |- |
− | |- | + | | [http://dwarf.lendemaindeveille.com/index.php?title=Template:</nowiki><b>(Insert the category's <u>address</u> here - eg Magma_FAQ)</b><nowiki>&action=edit Add a question to the </nowiki><b>(Insert your category title here)</b><nowiki> FAQ] |
− | |height="10"| | + | |} |
− | |- | + | {| align=center |
− | | | + | |<small>This template has yet to be coloured in with pretty colours</small> |
− | | | ||
− | | | ||
|} | |} | ||
− | |||
− | |||
− | </nowiki> | + | [[Category:FAQ - </nowiki>'''(Insert your category title here)'''<nowiki>]]</nowiki> |
I want to stress that it is important that you get that category's address correct - that line is a web address that will take users to your template's editing options. <br>It includes Javascript - or whatever it is (I'm no IT expert) - and so it's important you don't screw it up. | I want to stress that it is important that you get that category's address correct - that line is a web address that will take users to your template's editing options. <br>It includes Javascript - or whatever it is (I'm no IT expert) - and so it's important you don't screw it up. | ||
[http://dwarf.lendemaindeveille.com/index.php?title=Template:Magma_FAQ&action=edit An example of what the finished template code should look like] | [http://dwarf.lendemaindeveille.com/index.php?title=Template:Magma_FAQ&action=edit An example of what the finished template code should look like] | ||
+ | |||
+ | =Invisible Headers= | ||
+ | Now for the final bit, adding your new category into the FAQ page. Just add the following code into the FAQ page. | ||
+ | When it came time to insert the templates into the overall FAQ page, I struck a problem. I wanted the page to have a Table of Contents (TOC), but there didn't seem much point in having them displayed throughout the page since every template was self-titled. Was there anyway I could supress them? | ||
+ | |||
+ | |||
+ | ==Invisible Headers Code== | ||
+ | After a little fiddling around in a sandbox I came up the following solution: | ||
+ | |||
+ | <nowiki><h5><font color=”white”></nowiki><b>(Title as you want it to appear in the TOC)</b><nowiki></font></h5> | ||
+ | {{</nowiki><b>(Name of your template)</b><nowiki>}}</nowiki> | ||
+ | |||
+ | It's not true invisibility, but makes the headers white, meaning they can't be seen on the white background. If you try highlighting the text on the FAQ, you will see them ;). | ||
+ | |||
+ | |||
+ | =Sub-categories= | ||
+ | To make your new category a sub-group of the overall FAQ category, simply click on the link at the bottom (it should be red), and copy the following code. Now your category is a sub-category of the FAQ category, and any new question added should be added to your category’s … category (doh). | ||
+ | |||
+ | |||
+ | ==Sub-category code== | ||
+ | If you want to write an answer to somebody else’s posted question please try to keep the answer short and simple, and link to the in-depth explanations elsewhere in the wiki. Don't forget to include the template into your answer (copy the following code into your answer): | ||
+ | |||
+ | <nowiki>{{</nowiki><b>(Name of your template)</b><nowiki>}}</nowiki> | ||
+ | |||
+ | <nowiki>[[Category:FAQ]]</nowiki> | ||
+ | |||
=Answers= | =Answers= | ||
Line 69: | Line 99: | ||
<nowiki>{{Magma FAQ}}</nowiki> | <nowiki>{{Magma FAQ}}</nowiki> | ||
at the bottom of my answer. | at the bottom of my answer. | ||
− | |||
− | |||
− |