[[Category: McNair Admin]]
=Old Notes (from Alex Jiang)=
== Installing Ubuntu aka Trying RAID 10 (2/15/2016) ==
== Back to Google Analytics (3/23/2016) ==
We made a new Google Analytics account! admin@mcnaircenter.org 9millionamount
I'm going to go ahead and test the Google Analytics integration extension on the [[Test Web Server Documentation#Installing Google Analytics (3/23/2016)|test web server]].
After some more deliberation, I think Cargo wins. Cargo's querying syntax is more like SQL (which is actually useful and pretty easy to learn), and Cargo also doesn't deal with all of the property declarations that Semantic Mediawiki requires. Also, Cargo has native support for JSON exporting, while SMW doesn't (and any extensions that provide such support are pretty stale).
== CSS Design (4/22/2016) ==
Couple of notes on where "obvious" (hint: not so obvious) things are. (Note, all paths that follow are relative to the Mediawiki root directory, which should be in /var/lib/mediawiki).
First, the logo for the page is defined in LocalSettings.php. Look for the $wgLogo variable. I used a FTP client to upload new logos, but you could use a terminal and wget the file if you have it online somewhere.
For changing CSS rules, I just used the Chrome inspector (F12 or right-click and choose "Inspect" from the option menu) to understand which CSS selector rules were being applied and which were being overridden. You can also make small CSS changes in the inspector that are lost upon refreshing the page, but can be useful for experimenting with different colors, positions, etc.
You can use $ grep -r "[words_to_search_for]" on the command line to search for something (a CSS hex color code, a CSS selector, etc.) in all files and directories in the current directory. I usually used this while in the skins/Vector directory to make finding CSS properties easier.
The CSS is actually written in LESS, which is an extension of CSS syntax that allows you to do nested properties, variables, etc. The skins/Vector/variables.less file has all the variables, which are prefixed with an at sign (@) in LESS. WARNING: if you try to use a variable name that hasn't been defined (due to a typo, for example), ALL of the CSS/LESS will stop working. The plus side is that its obvious that you messed up. The down side is that it may not be obvious where exactly you messed up, so make small changes and refresh the browser view constantly. Other than that, most of the other LESS rules are in the skins/Vector/components folder. The file names are fairly reasonable: common.less defines rules common to the entire page, navigation.less defines the area on the left sidebar, personalMenu.less defines the set of links in the top right corner for the user account, footer.less defines the footer. There's also another file in skins/Vector that is useful for understanding how everything comes together: VectorTemplate.php, which contains the high level HTML structure.
== To-do list ==
* extra namespaces for IntraACL stuff. see [https://www.mediawiki.org/wiki/Manual:Using_custom_namespaces here]
* inconsistent styling: links aren't orange on special pages, fonts and links are the default in the "mobile" view
== In progress ==
* It looks like the Common.css stylesheet has to be exactly the same as the Wikipedia Common.css stylesheet for the Wikipedia Infobox templates to be styled properly, because I solved the problem of the infoboxes being styled incorrectly by deleting all of the custom CSS that we had written for the mediawiki.
==Installing and configuring the Backup Drive==
=New Notes=
==Mounting the RDP==
apt-get install cifs-utils
mount -t cifs //128.42.44.182/mcnair /mnt/rdp -o user=researcher,domain=ad.mcnaircenter.org
==Mobile Interface==
===Folders===
* The folders with the source code can be found at
/var/lib/mediawiki/extensions/MobileFrontend/minerva.less
===Tips===
* Using a [http://www.mobilephoneemulator.com/ mobile emulator] helps understand what the mobile interface is going to look like before deploying onto Production.
==User Access 6/15/2016 ==
'''Objective'''
Accounts are to be vetted before they are created. We would like to have a queue of account creation requests, that must be approved before they can be created, given that we allow users to edit public wiki pages.
*Helpful Material:
** [https://www.mediawiki.org/wiki/Extension:ConfirmAccount Mediawiki Documentation ]
** mcnair@rice.edu -account that will approve account creation.
Steps Followed:
'''Package Installation Steps:'''
* cd extensions/
* wget https://extdist.wmflabs.org/dist/extensions/ConfirmAccount-REL1_26-d6e2f46.tar.gz
* tar -xzf ConfirmAccount-REL1_26-d6e2f46.tar.gz
* sudo pear install mail
* sudo pear install net_smtp
The above steps ensure that email notification system is set up, and that the Confirm Account package is set up.
'''Configuring Confirm Accounts php files '''
The following files need to be updated as follows:
*ConfirmAccount.php:
Set the confirmation queues to point to folders that www-data has access to:
// For changing path in accountreqs
$wgConfirmAccountPathAR = $IP . "/images/accountreqs";
// For changing path in accountcreds
$wgConfirmAccountPathAC = $IP . "/images/accountcreds";
*ConfirmAccount.config.php
Change the directories to those defined in ConfirmAccount.php
$wgFileStore['accountreqs']['directory'] : $wgConfirmAccountPathAR,
$wgFileStore['accountcreds']['directory'] : $wgConfirmAccountPathAC,
* LocalSettings.php:
$wgEnableEmail = true;
$wgEmergencyContact = "mcnair@rice.edu";
$wgPasswordSender = "mcnair@rice.edu";
# User Account Confirmation
require_once "$IP/extensions/ConfirmAccount/ConfirmAccount.php";
$wgSMTP = array(
'host' => 'ssl://smtp.mail.rice.edu',
'IDHost' => '128.42.44.22',
'port' => 465,
'username' => 'mcnair@rice.edu',
'password' => '*********',
'auth' => true
);
$wgConfirmAccountContact = 'mcnair@rice.edu';
''' Updating the Wiki'''
* cd /var/lib/mediawiki/maintenance
* php update.php
[[admin_classification::IT Build| ]]
== Mediawiki extensions ==
== Semantic Mediawiki Extensions ==
The SMW extension installation process requires a composer.phar to be installed. All further installations to SMW are done through the composer.phar.
==== Installing Mediawiki Composer.phar ====
Here is the mediawiki link: [https://getcomposer.org/doc/00-intro.md#installation-nix]
==== Installing Extension : Semantic Results Formats ====
* Here is the link to the installation process :
* Here is the command to be run in the Mediawiki root folder (var/lib/mediawiki)
php composer.phar require --update-no-dev mediawiki/semantic-result-formats "2.*"
==Using Google Analytics==
Got to: https://analytics.google.com/
Log in with admin@mcnaircenter.org
To do:
*Check base analytics configuration
*Check integration with Google Search
*Install appropriate APIs