Difference between revisions of "Examples of useful code"

From the Family Tree Forum Reference Library
m
m
Line 4: Line 4:
 
__TOC__
 
__TOC__
  
 
+
===THE CONTENT ON THIS PAGE IS BEING MOVED TO OTHER PAGES===
Click on '''View Source''' tab, at the top, to see the code.
 
  
  
Line 48: Line 47:
  
  
  See below for using Clickpic for a contents with hyperlinked pictures.
+
  See [[Adding Content to The Wiki ~ Images and Tables 2]] for using hyperlinked pictures.
 
 
 
 
<br><br>
 
 
 
==Code with image for pages under construction==
 
 
 
[[image:Construction.jpg|center]]
 
<br><br>
 
 
 
==Displaying images==
 
 
 
 
 
[[How_To_Align_Non-Uploaded_Images]] Eg. from Photobucket.
 
 
 
 
 
====One single image====
 
 
 
name | alignment | size | thumb ''or'' frame | caption
 
<br><br><br><br>
 
====='''1. You can just put in the image'''=====
 
 
 
It will come out full size and aligned to the left with no border or caption.
 
 
 
<nowiki>[[image:name of image.jpg]]</nowiki>
 
 
 
[[image:InitialsA.jpg]]
 
<br><br><br><br>
 
====='''2. You can choose horizontal alignment''' - right, left or center =====
 
 
 
<nowiki> [[image:name of image.jpg|alignment]] </nowiki>
 
 
 
[[image:InitialsA.jpg|center]]
 
<br><br><br><br>
 
====='''3. You can choose the size'''=====
 
 
 
<nowiki> [[image:name of image.jpg||size]]</nowiki>
 
 
 
[[image:Construction.jpg|150px]]
 
<br><br><br><br>
 
=====4. To get a frame round your picture=====
 
 
 
<nowiki>[[image:name of image.jpg|alignment|size|thumb]]</nowiki>
 
 
 
[[image:Construction.jpg|left|200px|thumb]]
 
 
 
 
 
 
 
 
 
  
  
 +
----
  
  
 +
==Example of colour band for titles==
  
 +
{| style="width:100%; height:35px" border="0" cellpadding="5"
 +
| style="color:white" bgcolor="LightSteelBlue "|'''ENGLISH COUNTIES'''
 +
|}
  
  
 +
==Help Pages for The Wiki==
  
 +
====Adding content====
  
 +
* [[Help:Notes for Users|Help for Users]] being rewritten
  
 +
* [[Help:Notes for Editors|Help for Editors]] being rewritten
  
 +
* [[Authoring|Formatting Text]]
  
 +
* [[Style and Presentation in The Wiki]]
  
 +
* [[Adding Content to The Wiki ~ New Pages]]
  
 +
* [[Adding Content to The Wiki ~ Images and Tables]]
  
 +
* [[Adding Content to The Wiki ~ Images and Tables 2]]
  
 +
* [[Adding Content to The Wiki ~ Mixing Text and Images]]
  
  
 +
====Visual Reference====
  
 +
* [[Navigating the Wiki|Navigating The Wiki]]
  
 +
* [[Searching the Wiki|Searching The Wiki]]
  
 +
* [[Help:Hyperlink Code|Coding a Hyperlink for The Wiki]]
  
 +
* [[Uploading images to The Wiki]]
  
=====5. To get a frame and have a caption for the picture=====
+
* [[Editing Your User Page]]
[[image:Construction.jpg|right|250px|thumb|Work in progress]]
 
<nowiki>[[image:name of image.jpg|alignment|size|thumb|caption]]</nowiki>
 
  
 +
* [[Surname Help|Adding Surnames to The Surname Directory]]
  
 +
* [[County model|Template for County Pages]]
  
 +
* [[Examples of useful code|Miscellaneous Code]]
  
  
 
+
*[[Main Page]]
 
 
 
 
 
 
'''Warning''' - combining more than one picture with or without text can give very unpredictable results.
 
 
 
As you will see from the examples on this page you often need to press enter several times in order to get a sensible page layout!!
 
 
 
 
 
 
 
 
 
<br><br><br><br>
 
 
 
====More than one image on page====
 
<br><br>
 
 
 
====='''1. Gallery - small thumbnails''' =====
 
 
 
<gallery caption="CONTENTS" widths="200px" heights="50px" perrow="4">
 
Image: WIP2_fr2.jpg|[[World_Index_Page]]  
 
Image: Surnames3_fr2.jpg|[[Surname Directory]]
 
Image: Bigbook5_fr2.jpg|The [[Big_Book]] of Genealogy.
 
Image: Census_fr2.jpg|[[Census_Search]]
 
</gallery>
 
<br><br>
 
====='''2. Clickpic - hyperlinked pictures'''=====
 
 
 
{| height="35px" border="0" cellpadding="15"
 
|{{clickpic|Parish_Registers| http://www.familytreeforum.com/wiki/images/d/d6/Register_fr2.jpg}}
 
||{{clickpic| Certificate_tutorials| http://www.familytreeforum.com/wiki/images/c/ca/Certs_fr.jpg}}
 
||{{clickpic|World_Index_Page| http://www.familytreeforum.com/wiki/images/3/30/WIP2_fr2.jpg}}
 
|-
 
|}
 
 
 
[[image:WIP_fr.jpg|150px]]
 
[[image:Surname_new.jpg|150px]]
 
[[image:Counties_new.jpg|150px]]
 
[[image:Online_new.jpg|150px]]
 
 
 
{| height="35px" border="0" cellpadding="10"
 
||{{clickpic|Online_Research| http://www.familytreeforum.com/wiki/images/thumb/5/5f/Online_fr2.jpg/150px-Online_fr2.jpg}}
 
||{{clickpic|World_Index_Page| http://www.familytreeforum.com/wiki/images/thumb/c/c8/WIP_fr.jpg/120px-WIP_fr.jpg}}
 
||{{clickpic|World_Index_Page| http://www.familytreeforum.com/wiki/images/thumb/f/f7/Counties_fr2.jpg/150px-Counties_fr2.jpg}}
 
||{{clickpic|Surname_Directory| http://www.familytreeforum.com/wiki/images/thumb/9/9f/Surnames3_fr2.jpg/150px-Surnames3_fr2.jpg}}
 
|-
 
|}
 
<span class="plainlinks"> [http://www.familytreeforum.com/wiki/index.php/Special:Allpages http://www.familytreeforum.com/wiki/images/b/b1/Index_fr2.jpg] </span>
 
 
 
<br><br>
 
 
 
'''To make smaller clickpic images:'''
 
 
 
{| border="0" cellpadding="20"
 
|{{clickpic|Surname Directory - A|http://www.familytreeforum.com/wiki/images/thumb/5/5c/InitialsA.jpg/75px-InitialsA.jpg}}
 
||{{clickpic|Surname Directory - B|http://www.familytreeforum.com/wiki/images/thumb/0/08/InitialsB.jpg/75px-InitialsB.jpg}}
 
||{{clickpic|Surname Directory - C|http://www.familytreeforum.com/wiki/images/thumb/6/6e/InitialsC.jpg/75px-InitialsC.jpg}}
 
||{{clickpic|Surname Directory - D|http://www.familytreeforum.com/wiki/images/thumb/f/fb/InitialsD.jpg/75px-InitialsD.jpg}}
 
|{{clickpic|Surname Directory - E|http://www.familytreeforum.com/wiki/images/thumb/5/5a/InitialsE.jpg/75px-InitialsE.jpg}}
 
||{{clickpic|Surname Directory - F|http://www.familytreeforum.com/wiki/images/thumb/4/4c/InitialsF.jpg/75px-InitialsF.jpg}}
 
|-
 
|}
 
 
 
You have to make the image smaller in advance ... you can't just edit the existing code!!
 
 
 
[[image:InitialsB.jpg|75px]] Right click and select properties, copy the hyperlink.
 
 
 
<nowiki> http://www.familytreeforum.com/wiki/images/thumb/0/08/InitialsB.jpg/75px-InitialsB.jpg</nowiki>
 
<br><br><br><br>
 
'''You can Mix and Match sizes:'''
 
 
 
{| height="35px" border="0" cellpadding="15"
 
|{{clickpic|Surname Directory - E|http://www.familytreeforum.com/wiki/images/thumb/5/5a/InitialsE.jpg/75px-InitialsE.jpg}}
 
||{{clickpic| Certificate_tutorials| http://www.familytreeforum.com/wiki/images/c/ca/Certs_fr.jpg}}
 
||{{clickpic|Surname Directory - F|http://www.familytreeforum.com/wiki/images/thumb/4/4c/InitialsF.jpg/75px-InitialsF.jpg}}
 
||{{clickpic|World_Index_Page| http://www.familytreeforum.com/wiki/images/3/30/WIP2_fr2.jpg}}
 
|-
 
|}
 
<br><br>
 
'''Images as hyperlinks outside the Wiki.'''
 
 
 
This example uses clickable pictures - this has the advantage of allowing you to use images to hyperlink to sites outside the Wiki. It uses the hyperlink of the image page. the image has to be uploaded in the size you need to use.
 
 
 
<nowiki> <span class="plainlinks"> link </span></nowiki> stops the blue arrow on the side.
 
 
 
{| width="100%" height="35px" border="0" cellpadding="10"
 
! width="30%"|<span class="plainlinks"> [http://www.familytreeforum.com/genealogy-general http://www.familytreeforum.com/wiki/images/3/36/Research.jpg]</span>
 
! width="30%"|<span class="plainlinks"> [http://www.familytreeforum.com/wiki/index.php/Creating_Your_Family_Tree http://www.familytreeforum.com/wiki/images/f/fe/Create_fr.jpg]</span>
 
! width="30%"| <span class="plainlinks"> [http://www.familytreeforum.com/family-tree-forum-community-boards http://www.familytreeforum.com/wiki/images/2/2e/Community.jpg] </span>
 
|}
 
<br><br>
 
 
 
====='''3. Picture on the left, some text and picture on the right'''=====
 
 
 
 
 
N.B. If the image has no "built in" border you need to use |thumb| not |frame|.
 
 
 
 
 
[[Image:Documents_fr2.jpg|left|150px|]]
 
[[image:construction.jpg|right|250px|]]
 
 
 
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec in enim. Aliquam erat volutpat. Maecenas id nibh ut turpis lobortis commodo. Phasellus sed neque. Proin fringilla euismod libero. Etiam vel lectus. Aliquam dui. Curabitur venenatis molestie neque. Integer mi dolor, gravida at, accumsan eget, fringilla eget, arcu. Suspendisse euismod. Nam et lorem accumsan magna venenatis pellentesque. In et ante. Etiam magna. Cras rutrum mi quis tellus.
 
 
 
Sed mi eros, lacinia mattis, gravida vel, placerat posuere, lacus. Duis accumsan tincidunt sapien. Morbi sed velit. Etiam quis orci. Donec at velit sed lorem elementum feugiat. Curabitur ut ligula. Quisque in eros. Morbi sed enim id sapien tristique fringilla. Nunc ligula augue, pellentesque ac, nonummy id, semper eget, ante. Sed mi eros, lacinia mattis, gravida vel, placerat posuere, lacus. Duis accumsan tincidunt sapien. Morbi sed velit. Etiam quis orci. Donec at velit sed lorem elementum feugiat. Curabitur ut ligula. Quisque in eros. Morbi sed enim id sapien tristique fringilla. Nunc ligula augue, pellentesque ac, nonummy id, semper eget, ante.
 
 
 
==Example of colour band for titles==
 
 
 
{| style="width:100%; height:35px" border="0" cellpadding="5"
 
| style="color:white" bgcolor="LightSteelBlue "|'''ENGLISH COUNTIES'''
 
|}
 

Revision as of 05:08, 5 April 2008

Page being edited by Caroline

THE CONTENT ON THIS PAGE IS BEING MOVED TO OTHER PAGES

Alphabetical Contents Lists

1. Each letter has its OWN page:

_A |_B |_C |_D |_E |_F |_G |_H |_I |_J |_K |_L |_M |_N |_O |_P |_Q |_R |_S |_T |_U |_V |_W |_XYZ


2. Links WITHIN the same page:


N.B. THIS USES THE SECTION HEADINGS SO IT APPEARS IN THE TOC/CONTENTS

A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | XYZ


Example of the code: [[#A|A]]

#A is the name of the section. By putting |after it you can call the link anything you like.


If there is nothing else on the page you can use ____NOTOC__ .

This avoids a long vertical list in the contents.


N.B. If you do use __NOTOC__ anywhere on the page this overules the __TOC__.


If you can't use __NOTOC__ on a page because it already uses __TOC__ you can do the following:


'''A'''<span id="A"></span> This creates the anchor for the letter A


'''B'''<span id="B"></span> This creates the anchor for the letter B


Then you can use the code [[#A|A]] as above.


See Adding Content to The Wiki ~ Images and Tables 2 for using hyperlinked pictures.




Example of colour band for titles

ENGLISH COUNTIES


Help Pages for The Wiki

Adding content


Visual Reference