Information Technology

From Deep Blue Robotics Wiki
Jump to: navigation, search

Widgets

Widgets are super cool and easy to use and help us to embed things that would have taken annoying html to do. This is a list of currently installed widgets and how to use them! All widget code can be copy pasted with the proper value filled in.

Google Calendar

The Calendar Widget allows the embedding of Google Calendars into the wiki. The syntax to do so is here:

{{#widget:Google Calendar
    |id=qe00842sq89075ub4n9l3lhai4@group.calendar.google.com 
    |color=528800
    |id=1ammtst2iopqspnr6k93lsjhes@group.calendar.google.com
    |color=528800
    |id=usa@holiday.calendar.google.com
    |color=B1440E
    |title=Carlmont Robotics Team Calendar and US Holidays
}}

For more information, go here.

Google Spreadsheet

The Google Spreadsheet Widget allows the embedding of Google Spreadsheets into the wiki. The syntax to do so is here:

{{#widget:Google Spreadsheet
    |key=101yfPnSgnmLKwPORn9BLFHgl8G5CLtORHV_HcvoCrxo
    |width=100%
    |height=1400
}}

This particular widget has 3 parameters. The second and third parameters are self explanatory. The key parameter comes from the google spreadsheet itself. For example, in the spreadsheet with url: https://docs.google.com/spreadsheets/d/1D2lZhxMH0tRfxVGaEewRtCAKiyGqsU3sT8TOmWzLxs/edit#gid=0, the key would be the bolded part. For more information, go here

PDF

This widget embeds pdfs into wiki pages. It gives some very useful functionality with pdfs. To embed pdfs, use this syntax:

{{#widget:PDF
    |url=SOME URL
    |width=750
    |height=1050
}}

Administration

New Users

How to get a new account

Contact ericliu121@yahoo.com with you email and full name (first, middle, last) to get an account.

How to make a new account

If you are a bureaucrat, you can make accounts

  1. Click on Admin links in the top right corner
  2. Under Users, click on Create a user
  3. Username should be in the format of "Capital First Initial" + "Capitalized Last Name
    1. For example, if your name is John Albert Smith, your wiki username should be JSmith
    2. If the username exists already, use put in the "Capital Middle Initial" so John Albert Smith would become JASmith
    3. If the username still exists, change to the format of JohnASmith and if by some act of god it still exists, use JohnAlbertSmith
  4. Check the box "Use a temporary random password and send it to the specified email address" and enter in the email given
  5. Put their real name in the real name box
    1. Do not put their middle name in here
  6. Fill in a reason if you want to
  7. Click "Create another account"

New Extensions

General instructions

To add a MediaWiki extension:

  1. Get whatever you need permissions to change files on the carlmontrobotics.org shared host. Whichever mentor is acting as the webmaster (currently Charles Shanefelter) should be able to set you with the necessary permissions.
  2. Find the extension you want to install. Try Googling "WikiMedia Extension something", or search the MediaWiki site.
  3. Follow the instructions for the version of the extension that is compatible with the versions of MediaWiki, PHP, and MySQL that this wiki is using. This will typically required that you:
    1. Copy the extension's folder under ~/public_html/wiki/extensions
    2. Edit ~/public_html/wiki/LocalSettings.php to load and configure the extension.


Details for currently installed extensions

VisualEditor for What You See Is What You Get Editing

Download and extract correct version under ~/public_html/wiki/extensions:

cd ~/public_html/wiki/extensions
wget  https://www.mywikis.com/assets/VisualEditor-REL1_26-34a21d8.tar.gz
tar zxvf [https://www.mywikis.com/assets/VisualEditor-REL1_26-34a21d8.tar.gz VisualEditor-REL1_26-34a21d8.tar.gz]
VisualEditor requires a separate Parsoid service to convert between wikitext and HTML. You can install it on a separate server, or just purchase hosted Parsoid service for $1/month (it might take a few days to get started up). Add this to ~/public_html/wiki/LocalSettings.php:
### Hosted Parsoid at mywikis.com for VisualEditor<br>
require_once "$IP/extensions/VisualEditor/VisualEditor.php";<br>
<br>
// Enable by default for everybody<br>
$wgDefaultUserOptions['visualeditor-enable'] = 1;<br>
<br>
// Optional: Set VisualEditor as the default for anonymous users<br>
// otherwise they will have to switch to VE<br>
// $wgDefaultUserOptions['visualeditor-editor'] = "visualeditor";<br>
<br>
// Don't allow users to disable it<br>
#$wgHiddenPrefs[] = 'visualeditor-enable';<br>
<br>
// OPTIONAL: Enable VisualEditor's experimental code features<br>
#$wgDefaultUserOptions['visualeditor-enable-experimental'] = 1;<br>
<br>
$wgVirtualRestConfig['modules']['parsoid'] = array (<br>
        'url' => 'http://server2.mywikis.net:8000',<br>
        'domain' => 'wiki.carlmontrobotics.org',<br>
);

Widgets for embedding arbitrary HTML

Follow the installation and configuration instructions (I used the Git installation method).

Use the links on the list of currently installed widgets to see how to use them.

To find and install new widgets, see the MediaWikiWidgets.org site. You will need admin or Widget authoring permission to do that.

SyntaxHighlight for syntax highlighting of source code

This comes with our version of MediaWiki. I just needed to do 2 things:

  1. Load the extension by adding wfLoadExtension( 'SyntaxHighlight_GeSHi' ); to ~/public_html/wiki/LocalSettings.php.
  2. Make pygmentize executable by running chmod a+x ~/public_html/wiki/extensions/SyntaxHighlight_GeSHi/pygments/pygmentize.