Team:TU Delft/Modeling/wiki-tips-tricks

From 2010.igem.org

(Difference between revisions)
(Trick 1:)
Line 38: Line 38:
===Trick 3: Photo sources ===
===Trick 3: Photo sources ===
The iGEM wiki picture management can be time consuming. Use our [[Team:TU_Delft/fb_display|fb_display]] template to display pictures from facebook, or use a site such as flickr that has it's own photo javascript API.
The iGEM wiki picture management can be time consuming. Use our [[Team:TU_Delft/fb_display|fb_display]] template to display pictures from facebook, or use a site such as flickr that has it's own photo javascript API.
 +
 +
===Trick 4: Hide the default iGEM Header===
 +
<pre>
 +
/* Wiki Hacks - START */
 +
/* Author: Pieter van Boheemen */
 +
/* Team: TU Delft */
 +
#globalWrapper { background-color: transparent; border: none; margin: 0; padding: 0; width: 100%;
 +
height:auto !important; /* real browsers */
 +
height:100%; /* IE6: treaded as min-height*/
 +
min-height:100%; /* real browsers */
 +
}
 +
#content { z-index: 1; background-color: transparent; border: none; padding: 0; margin: 0; width: 100%; overflow: hidden; margin-top: -15px !important; margin-top: 0px;
 +
height:auto !important; /* real browsers */
 +
height:100%; /* IE6: treaded as min-height*/
 +
min-height:100%; /* real browsers */
 +
}
 +
#bodyContent { border: none; padding:0; margin:0; width:100%;
 +
height:auto !important; /* real browsers */
 +
height:100%; /* IE6: treaded as min-height*/
 +
min-height:100%; /* real browsers */
 +
}
 +
#top-section { z-index: 2; height: 15px; margin: 0px; margin-left: auto; margin-right: auto; margin-bottom: 0 !important; padding:0; border: none; font-size: 10px;}
 +
#p-logo { height:1px; overflow:hidden; display: none;}
 +
#search-controls { overflow:hidden; display:block; background: none; position: absolute; top: 100px; right: 40px;}
 +
.left-menu { width: 500px !important; display:block; margin-top:-80px; border: none; text-align: right;}
 +
.left-menu ul { border: none; }
 +
#menubar.right-menu { width:300px; display:block; float:left; margin-top:-80px; border: none;}
 +
.right-menu ul { border: none; width: 300px;}
 +
#footer-box { background-color: #216085; border: none; width: 100%; margin: -10px auto 0 auto; padding: 20px 0;}
 +
.visualClear { display: none; }
 +
#footer { border: none; width: 965px; margin: 0 auto; padding: 0;}
 +
.firstHeading { display: none;}
 +
#f-list a { color: #333; font-size: 10px;}
 +
#f-list a:hover { color: #666;}
 +
.printfooter { display: none; }
 +
#footer ul { margin: 0; padding: 0;}
 +
#footer ul li { margin-top: 0; margin-bottom: 0; margin-left: 10px; margin-right: 10px; padding: 0;}
 +
#search-controls { display:none; }
 +
h3#siteSub { display: none;}
 +
#contentSub {display: none;}
 +
p:first-child { display: none;}
 +
h1{border:none; width: 100%; clear: both;}
 +
/* Wiki Hacks - END */
 +
</pre>

Revision as of 14:17, 14 October 2010

Wiki Tips and Tricks

Part of the iGEM competition is to publish your work on the iGEM wiki. During the spring workshop you will get a brief introduction on how to create and edit pages, but this probably leaves you with a lot of questions. How do you get from the default iGEM team page to a nice and shiny website?

The TU Delft wiki uses a number of MediaWiki features that might be worth mentioning, if you're working on a wiki too. Most of it can be found at http://www.mediawiki.org/wiki/Help:Contents as well.

The tips here are general advice, the tricks contain the technical details.


Tip 1: Start building your wiki immediately

Don't wait to the last week before the wiki lockdown with working on your wiki. When you update your wiki with your progress on a regular basis it does not only saves time in the end, but it also helps others that might be struggling with the same issues. Your first wiki does not have to look fancy, basic navigation will suffice.

Tip 2: Look around on previous teams wiki for useful code

You don't have to reinvent the wheel. Webdevelopment has been an open source discipline for a much longer time than biotech, so there is plenty of code available to upgrade your wiki. Do remember to respect the authors and licenses.

After we discovered that other teams were copying our work, we had no other choice than to keep the rest secret until the very end. Luckily for you, we reveal all tricks on this page.


Trick 1:

Use templates! This is the most used way create common parts of the page (For example, a header or footer)

  • Templates:
{{:Team:TEAM_NAME/TemplateName}}

or with a template parameter:

{{:Team:TEAM_NAME/TemplateName|ParameterName=abc}}

Within the template, you can then access the parameter with {{{ParameterName}}}

You can also put pages in Template:Team:TEAM_NAME/Page, and then omit the first ':':

{{Team:TEAM_NAME/TemplateName|ParameterName=abc}}

Trick 2: Wiki URL parameters

  • Append ?action=raw to the URL to get the raw wiki page contents. This is mostly used for storing javascript
  • Append ?action=render to the URL to get the pure page content rendered as HTML (without the standard iGEM wiki headers around it). This can be used for ajax behavior, loading wiki pages dynamically.
  • Append ?ctype=text/javascript to your URL to change the HTTP content type.

Trick 3: Photo sources

The iGEM wiki picture management can be time consuming. Use our fb_display template to display pictures from facebook, or use a site such as flickr that has it's own photo javascript API.

Trick 4: Hide the default iGEM Header

/* Wiki Hacks - START */
/* Author: Pieter van Boheemen */
/* Team: TU Delft */
#globalWrapper { background-color: transparent; border: none; margin: 0; padding: 0; width: 100%;
	height:auto !important; /* real browsers */
	height:100%; /* IE6: treaded as min-height*/
	min-height:100%; /* real browsers */
}
#content { z-index: 1; background-color: transparent; border: none; padding: 0; margin: 0; width: 100%; overflow: hidden; margin-top: -15px !important; margin-top: 0px;
	height:auto !important; /* real browsers */
	height:100%; /* IE6: treaded as min-height*/
	min-height:100%; /* real browsers */
}
#bodyContent { border: none; padding:0; margin:0; width:100%;
	height:auto !important; /* real browsers */
	height:100%; /* IE6: treaded as min-height*/
	min-height:100%; /* real browsers */
}
#top-section { z-index: 2; height: 15px; margin: 0px; margin-left: auto; margin-right: auto; margin-bottom: 0 !important; padding:0; border: none; font-size: 10px;}
#p-logo { height:1px; overflow:hidden; display: none;}
#search-controls { overflow:hidden; display:block; background: none; position: absolute; top: 100px; right: 40px;}
.left-menu { width: 500px !important; display:block; margin-top:-80px; border: none; text-align: right;}
.left-menu ul { border: none; }
#menubar.right-menu { width:300px; display:block; float:left; margin-top:-80px; border: none;}
.right-menu ul { border: none; width: 300px;}
#footer-box { background-color: #216085; border: none; width: 100%; margin: -10px auto 0 auto; padding: 20px 0;}
.visualClear { display: none; }
#footer { border: none; width: 965px; margin: 0 auto; padding: 0;}
.firstHeading { display: none;}
#f-list a { color: #333; font-size: 10px;}
#f-list a:hover { color: #666;}
.printfooter { display: none; }
#footer ul { margin: 0; padding: 0;}
#footer ul li { margin-top: 0; margin-bottom: 0; margin-left: 10px; margin-right: 10px; padding: 0;}
#search-controls { display:none; }
h3#siteSub { display: none;}
#contentSub {display: none;}
p:first-child { display: none;}
h1{border:none; width: 100%; clear: both;}
/* Wiki Hacks - END */