Difference between revisions of "Archive:Website documentation"

From FreeCulture.org
Jump to: navigation, search
(Chapter database)
 
(46 intermediate revisions by 5 users not shown)
Line 1: Line 1:
== Mailing lists ==
+
= The layout/styling/look of the main website and chapter websites =
We use Mailman to manage our lists. Here are some links you might like:
+
The main website and chapter websites are served by wordpress, from this directory:
 +
/home/chapterhosting/wordpress-mu
 +
The themes live here:
 +
/home/chapterhosting/wp-content/themes/
 +
The main blog uses:
 +
/home/chapterhosting/wp-content/themes/fco-wordpress-theme
 +
 
 +
'''If you make edits on the live site, they won't show up right away!'''
 +
 
 +
Why?
 +
Because we use a caching plugin for wordpress, which means that your edits to the php files aren't immediately added to the cached html files that the server serves. The best way to refresh the cache is to make an edit to a static page (just add a line break at the bottom or something).
 +
 
 +
'''When you edit the main site theme, you really should use version control'''
 +
 
 +
See [[#Subversion]]. However, don't let this be a total blocker. Just please do let the webteam know when you make live edits that haven't been checked in, so that someone else can check them in.
 +
 
 +
'''You can even make live edits right from your web browser'''
 +
 
 +
Your account on our wordpress install will need permissions to access the "network" dashboard. Then you just go [http://freeculture.org/wp-admin/network/theme-editor.php here].
 +
''Again, please make sure that your edits are checked in to version control.''
 +
 
 +
= Mailing lists =
 +
We use Mailman to manage our lists.  
 +
 
 +
 
 +
===I just want to subscribe to mailing list X===
 +
 
 +
(''For illustrated instructions, see the page about our [[Fc-discuss]] listserv!'')
 +
 
 +
* Go [http://freeculture.org/mailman/listinfo here]
 +
* Find mailing list X
 +
* Click on it
 +
* Enter your email address and name in the "Subscribing to X" section
 +
* Press "Subscribe"
 +
* That's it.
 +
 
 +
===I want to do something that's more like list management===
 +
====General Credentials====
 +
The password is usually listed in /home/freecult/passwords/mailman
 +
You can access that file by connecting through SSH or SFTP.
 +
If that doesn't work or you don't know how to access that, contact [[User:Gameguy43]] to get the right password.
 +
 
 +
====I want to make a new mailing list====
 +
* Do that [http://freeculture.org/cgi-bin/mailman/create here]
 +
* Leave the field for the list password blank, selecting the option to have a new list password generated automatically
 +
* The main mailman password will always work on this list
 +
* The last field, called "List creator's (authentication) password" is where you enter the password described above
 +
 
 +
====I want to do something else, AKA Generally Useful Links====
 
* [http://freeculture.org/mailman/listinfo All list information]
 
* [http://freeculture.org/mailman/listinfo All list information]
 
* [http://freeculture.org/cgi-bin/mailman/admin List admin top page]
 
* [http://freeculture.org/cgi-bin/mailman/admin List admin top page]
== Cron ==
 
  
We use cron to run tasks every once in a while.  To see the current list of jobs that run, do:
 
crontab -l
 
  
To edit them:
+
====I want to subscribe someone easily, from the command line====
  crontab -e
+
create a script subscribe.sh that looks something like this:
 +
ssh gameguy43@freeculture.org "cd /usr/lib/mailman/bin ; echo $1 | sudo python /usr/lib/mailman/bin/add_members -r - -w y -a y discuss"
 +
 
 +
= Email Forwarding =
 +
To set up forwarding from address@freeculture.org to person@example.com:
 +
* $ adduser address (if the user doesn't already exist)
 +
* edit ~address/.procmailrc to read something like this:
 +
:0c
 +
! person@example.com
 +
 
 +
The "c" stands for copy. That's key - they stay in the IMAP box.
 +
 
 +
 
 +
We have a secret gmail account, freeculture.org at gmail dot com, that receives copies of the email sent to freedom, newgroup, and media.  This was built to solve [https://bugs.launchpad.net/web/nextmeeting/+bug/83823]. The password for this secret account can be found in ~freecult/passwords, like most other passwords.
 +
 
 +
Because each of those email addresses is a separate account, they have a .procmailrc in their $HOME that reads:
 +
:0c
 +
! the.gmail.address.i.listed.above@example.com
 +
 
 +
= Chapter hosting =
 +
 
 +
==Chapter Blogs==
 +
Chapter blogs are hosted on our WordpressMU install (which is now just called Wordpress).
 +
These files live here:
 +
/home/chapterhosting/wordpress-mu
 +
So that means that the themes live here:
 +
/home/chapterhosting/wordpress-mu/wp-content/themes
 +
 +
 
 +
===Where is the admin interface?===
 +
[http://wpmu.freeculture.org/wp-admin here]
 +
 
 +
===Making a new blog===
 +
====To create a new blog, you need a "site admin" account.====
 +
For that to happen, someone who has one needs to add your username to:
 +
http://wpmu.freeculture.org/wp-admin/wpmu-options.php
 +
In the field "Site Admins" at the ''very bottom'' of the page.
 +
 
 +
====How do I know I'm a site admin?====
 +
When you log in [http://wpmu.freeculture.org/wp-admin here], you'll see a widget in your sidebar called "Site Admin."
 +
 
 +
====So how do I do it already?====
 +
* Fill in the form [http://wpmu.freeculture.org/wp-admin/wpmu-blogs.php#form-add-blog here]. Put the chapter leader's contact info (or whoever it is that you're interfacing with to make their website) in the "Admin Email" field.
 +
=====But the site won't be visible until you do this:=====
 +
* Edit /etc/apache2/conf.d/400-wpmu.conf. Probably you'll want to enter a command like this:
 +
sudo nano /etc/apache2/conf.d/400-wpmu.conf
 +
Add a line like this:
 +
ServerAlias chaptername.freeculture.org
 +
Where chaptername is the blog subdomain, as you entered it when you created the blog
 +
* run this:
 +
sudo /etc/init.d/apache2 reload
  
To see what the file format is, read [http://www.adminschoice.com/docs/crontab.htm this reference].
+
====Themes====
 +
We should document this.
  
== The Mysterious Front Page ==
+
There are a bunch of [[Deprecated chapter hosting notes]], including stuff about chapter wikis
How does the actual FreeCulture.org homepage get produced?  What does everyone see when they visit http://freeculture.org ?
 
  
Since we have moved the site into Wordpress, most of our code can be found in the Wordpress theme "fco-wordpress-theme" in "~/domains/freeculture.org/wp-content/themes/". The skeleton for the front page is found in "front_page.php", which gets the content from functions found in "fco-wordpress-theme/front_page/".  For instance, the "blurb" at the top of the front page (currently "Students for Free Culture is an international chapter-based student organization that promotes the public interest in intellectual property and information & communications technology policy.") can be found in "fco-wordpress-theme/front_page/front_page_code.php".
+
== The Chapter Database ==
 +
It lives in a google spreadsheet. A python script runs nightly (or so) and slurps out the data and drops it in to freeculture.org/chapters.json. to run this script on demand, do this:
  
The content for the "Current Campaign" box does not come from the theme, it is what you see if you try to open the front page in the Wordpress page editor... it is intended to be easily edited and updated through the GUI just like any other blog page.
+
python /home/freecult/software/fco-svn/googledoc-chapterdb-scripts/trunk/slurp_chapter_db.py
  
== Planet ==
+
== The Chapter News Feed (and the personal Planet) ==
  
 
The planet ''program'' lives in ~/planet-prog/.  It outputs to ~/public_html/planet/ via an every-30m cron job.
 
The planet ''program'' lives in ~/planet-prog/.  It outputs to ~/public_html/planet/ via an every-30m cron job.
Line 45: Line 141:
 
In that directory, you can choose to remove just a single cached feed.  The names make it clear which one is which.
 
In that directory, you can choose to remove just a single cached feed.  The names make it clear which one is which.
  
== Domains ==
 
Every domain we own or run is listed at [[Domains]].
 
== Calendar publishing ==
 
We use phpicalendar.  If everyone working on the national level shares their calendars with each other, it becomes much easier to schedule meetings at mutually convenient times (instead of playing calendar battleship... "are you free at 3pm?" "No." "How about 4pm?" "You sunk my battleship!  You bastard!").
 
=== As a user ===
 
# Set your calendar client to synchronize to http://freeculture.org:8080/calendars/YOURNAMEHERE.ics
 
#* You will need to use a username/password pair '''special to the calendar stuff''' assigned to you by the web team
 
#* Be SURE you use a file with your name in it.  Otherwise you run the risk of others overwriting your data, and vice-versa!
 
# Check on http://freeculture.org/cal/ that your calendar appears
 
  
=== As a sysadmin ===
 
* Apache2 runs the WebDAV service; its configuration is in /etc/apache2/
 
* htpasswd file in ~freecult/passwords/calendar-htpasswd
 
* calendar files stored in ~freecult/public_html/database/calendars/
 
* to change someone's password, or create a user, do:
 
htpasswd  /home/freecult/passwords/calendar-htpasswd USERNAME
 
= Email =
 
== Forwarding ==
 
We have a secret gmail account, freeculture.org at gmail dot com, that receives copies of the email sent to freedom, newgroup, and media.  This was built to solve [https://bugs.launchpad.net/web/nextmeeting/+bug/83823].
 
  
Because each of those email addresses is a separate account, they have a .procmailrc in their $HOME that reads:
+
== The Front Page ==
:0c
+
How does the actual FreeCulture.org homepage get produced?  What does everyone see when they visit http://freeculture.org ?
! the.gmail.address.i.listed.above@example.com
+
 
 +
Since we have moved the site into Wordpress, most of our code can be found in the Wordpress theme "fco-wordpress-theme" in "~/domains/freeculture.org/wp-content/themes/".  The skeleton for the front page is found in "front_page.php", which gets the content from functions found in "fco-wordpress-theme/front_page/".  For instance, the "blurb" at the top of the front page (currently "Students for Free Culture is an international chapter-based student organization that promotes the public interest in intellectual property and information & communications technology policy.") can be found in "fco-wordpress-theme/front_page/front_page_code.php".
 +
 
 +
The content for the "Current Campaign" box does not come from the theme, it is what you see if you try to open the front page in the Wordpress page editor... it is intended to be easily edited and updated through the GUI just like any other blog page.
 +
 
 +
== Cron ==
  
The "c" stands for copyThat's key - they stay in the IMAP box.
+
We use cron to run tasks every once in a whileTo see the current list of jobs that run, do:
 +
crontab -l
  
Parker note: Use adduser, not useradd.
+
To edit them:
 +
crontab -e
  
== Lists ==
+
To see what the file format is, read [http://www.adminschoice.com/docs/crontab.htm this reference].
=== Creating a new list ===
 
# Go to http://lists.freeculture.org/
 
# Click for "the list admin overview page"
 
# Click to "create a new mailing list"
 
# Like, create one.
 
  
 
= Databases =
 
= Databases =
Line 87: Line 167:
 
== Viewing ==
 
== Viewing ==
 
* You can '''not''' use [http://freeculture.org/phpmyadmin/ PHPMyAdmin] to view our databases.
 
* You can '''not''' use [http://freeculture.org/phpmyadmin/ PHPMyAdmin] to view our databases.
 
= Chapter hosting =
 
note: in the instructions below, '~' will only be the correct path if you're logged in as freecult
 
== Step 1: Creating the chapter's web space ==
 
* mkdir -pv ~/chapter-hosting/$subdomain/files
 
 
== Step 2: Enable the chapter's web space in Apache ==
 
* Become root, then
 
** cd /etc/apache2/conf.d/
 
** export subdomain=SUBDOMAIN_YOU_ARE_CREATING
 
** cp 200-umich.conf 200-$subdomain.conf
 
** sed -i s/umich/$subdomain/g 200-$subdomain.conf
 
** git add 200-$subdomain.conf
 
** git commit 200-$subdomain.conf -m "Created web space for $subdomain"
 
** /etc/init.d/apache2 reload
 
* Go to http://$subdomain.freeculture.org/. It will say "Curious. There seems to be an error" until you set up Lyceum for this subdomain, or configure a redirect in the Semantic MediaWiki entry for this chapter.
 
 
== Adding a wiki ==
 
=== Wiki step 1: Put the files in the right place ===
 
Go to the right directory:
 
* cd /home/freecult/chapter-hosting/$college
 
Now copy our MediaWiki setup in:
 
* sudo git clone /home/freecult/chapter-hosting/wiki-skeleton/mediawiki/ wiki
 
 
=== Wiki step 2: Put content in the database ===
 
Now create the database you will use:
 
* python /home/freecult/software/fco-svn/mediawiki-cloning/clone.py /home/freecult/chapter-hosting/wiki-skeleton/mediawiki/LocalSettings.php
 
Take note of the username and password it prints.  Now, open up LocalSettings.php with an editor:
 
* cd /home/freecult/chapter-hosting/$college/wiki/
 
* sudo nano -w LocalSettings.php
 
** Update LocalSettings.php to have the right DB config info
 
***$WGDBname , $WGDBuser , $WGDBpassword
 
** Update LocalSettings.php to have the right Wiki name at $WgSitename
 
** update: $wgLogo = "<nowiki>http://wiki.freeculture.org/wiki-logo.png</nowiki>";
 
 
Now, run the UPGRADE_ALL_WIKIS.sh script.  (This makes sure that the new wiki, as well as all the old wikis, have all the maintenance scripts run that they need.)
 
* cd /home/freecult/chapter-hosting
 
* ./UPGRADE_ALL_WIKIS.sh
 
**note: this script uses $HOME, so it will only work if you're logged in as freecult.  it might be a good idea to hard-code this to just use /home/freecult .  -Parker
 
 
Ta-da!  http://$college.freeculture.org/wiki/ should work now.
 
 
TODO: info on creating admin user accounts for the chapter rep.  Which user database does the wiki use/copy?  For now, it looks like my account works for some reason, so i'll have the rep make a username, and i'll make them admin. -Parker
 
 
=== Wiki step 3: Customization for the chapter ===
 
# When you go to edit the Main_Page, you will see links to these templates: Chapter_name, Chapter_subdomain, School_name, School_url.  Fill those in properly
 
*use this url syntax: '.../wiki/template:$template_name'
 
# Create a username for the chapter's lead member and promote him to Bureaucrats.
 
# Whew, that's all!
 
 
== Lyceum (WordPress farm) ==
 
 
# Log in as admin at freeculture.org/lyceum
 
# go to [http://freeculture.org/lyceum/register the new user registration page]
 
##IMPORTANT: you will need to be logged OUT of lyceum in order to see the right registration page
 
##otherwise, the blog will be tied to _your_ lyceum account.
 
# enter the desired username for the administrative account on the new blog
 
# enter the new blog's subdomain (under "blog address")
 
then:
 
# from the terminal, ssh to freeculture.org
 
# Become root
 
#* cd /etc/apache2/conf.d/
 
#* Look at 200-$college.conf - make sure the "DocumentRoot /home/freecult/subdomains/" line is commented-out, and make sure "DocumentRoot /home/freecult/chapter-hosting/lyceum_test/src/lyceum/" is enabled.
 
#* run /etc/init.d/apache2 reload
 
 
now the blog is live.  have a representative from the chapter create an account on lyceum, and give them admin powers for their new blog.  do this by going to the $college.freeculture.org/wp-admin .  click on users.  search for the username that they created.  tick it and give them admin permissions.
 
 
== Moving an existing wiki to the farm ==
 
=== Prepare DB ===
 
* First get a SQL dump
 
** As per [http://lists.wikimedia.org/pipermail/wikitech-l/2004-November/014010.html this warning], use --default-character-set=latin1 for really old wikis.
 
* Then create a new DB
 
* Then use the mysql CLI to import the dump
 
* Then delete the SQL dump!
 
 
=== Prepare MW ===
 
* move AdminSettings.sample into AdminSettings.php
 
* Edit LocalSettings.php to be similar to the old one, but with the current DB
 
** NOTE: If you did --default-character-set=latin1 for the mysqldump, you will want to set $wgDBmysql5=false in LocalSettings.php.
 
* Comment-out the define("MW_INSTALL_PATH") at the top
 
* Set IP to ~/chapter-hosting/$chapter/wiki/
 
* cp -a ~/software/mediawiki/maintenance .
 
* php maintenance/update.php maintenance/refreshLinks.php
 
 
Good!  If it said it worked, then:
 
 
* rm -rf maintenance
 
* mv AdminSettings.php AdminSettings.example
 
* edit LocalSettings.php and re-enable the define("MW_INSTALL_PATH")
 
* Copy their old logo into ~/chapter-hosting/$chapter/files/fcWikiLogo.png
 
* Remove the "#" before the $wgLogo setting in LocalSettings.php
 
 
=== Prepare Apache ===
 
* Do the usual Apache preparation as per chapter hosting in general.
 
  
 
= Subversion =
 
= Subversion =
Line 200: Line 186:
  
 
To get a database in on this super fun backup party (everyone's doing it), add it to /home/freecult/passwords/mysql_passwords
 
To get a database in on this super fun backup party (everyone's doing it), add it to /home/freecult/passwords/mysql_passwords
 +
 +
= Monitoring =
 +
We have monitoring by cyberspark.net
 +
Parker and Asheesh get the emails.
  
 
= Wiki =
 
= Wiki =
Line 242: Line 232:
 
  $ php SMW_refreshData.php -pv
 
  $ php SMW_refreshData.php -pv
 
  $ php SMW_refreshData.php -v
 
  $ php SMW_refreshData.php -v
 +
 +
 +
== Domains ==
 +
DEPRECATED: Every domain we own or run is listed at [[Domains]].
 +
 +
 +
== Calendar publishing ==
 +
'''DEPRECATED'''--as far as I know, we don't do this anymore --Parker, oct 16th 2010.
 +
 +
We use phpicalendar.  If everyone working on the national level shares their calendars with each other, it becomes much easier to schedule meetings at mutually convenient times (instead of playing calendar battleship... "are you free at 3pm?" "No." "How about 4pm?" "You sunk my battleship!  You bastard!").
 +
=== As a user ===
 +
# Set your calendar client to synchronize to http://freeculture.org:8080/calendars/YOURNAMEHERE.ics
 +
#* You will need to use a username/password pair '''special to the calendar stuff''' assigned to you by the web team
 +
#* Be SURE you use a file with your name in it.  Otherwise you run the risk of others overwriting your data, and vice-versa!
 +
# Check on http://freeculture.org/cal/ that your calendar appears
 +
 +
=== As a sysadmin ===
 +
* Apache2 runs the WebDAV service; its configuration is in /etc/apache2/
 +
* htpasswd file in ~freecult/passwords/calendar-htpasswd
 +
* calendar files stored in ~freecult/public_html/database/calendars/
 +
* to change someone's password, or create a user, do:
 +
htpasswd  /home/freecult/passwords/calendar-htpasswd USERNAME
 +
 +
[http://www.thesiswritingservice.com/services/ thesis writing service]
 +
 +
= Passwords =
 +
We keep them all in ~freecult/passwords/
 +
 +
 +
= Where the heck are the files for the part of the website that I'm working on? =
 +
The main blog and chapter hosting are served by a wordpress install out of:
 +
/home/chapterhosting/wordpress-mu
 +
But most other things are served out of:
 +
/home/freecult/domains
 +
 +
= here is a step-by-step description of how to make changes to our live Wordpress theme, by Nelson =
 +
 +
# You must be able to SSH into the server as both freecult@freeculture.org and chapterhosting@freeculture.org. To gain this power, someone who already has this power must put your SSH public key into the freecult@ and chapterhosting@ authorized keys files. (We prefer RSA encryption over DSA)
 +
# You must add yourself as an svn user, by SSHing into the server as freecult and executing this command:
 +
#:htpasswd /home/freecult/subversion-repository/conf/htpasswd YOUR_USERNAME
 +
#:It will fail if you are not logged in as freecult b/c freecult owns those files.
 +
# Check out our SVN repository by running this command on your local machine:
 +
#:svn checkout http://freeculture.org:8080/svn/
 +
# Make your changes to "wordpress-theme" in your SVN checkout
 +
# Do an "svn commit" on your machine, such as:
 +
#:svn commit --message "This should fix the admin bar bug" --user myusername --password mypassword
 +
#:If your username on your UNIX system is different from your SVN username, the --user option is necessary, the --password option is not necessary, it will prompt you for your password if you don't put it on the command line.
 +
# SSH into the server as chapterhosting and go to the directory where the live theme lives:
 +
#:cd wordpress-mu/wp-content/themes/fco-wordpress-theme
 +
# Do an "svn up" to pull the changes from your local repository.
 +
 +
Ta da! Your changes should be live on the website now! That wasn't that hard was it? OK, maybe it was.

Latest revision as of 00:31, 12 August 2016

The layout/styling/look of the main website and chapter websites

The main website and chapter websites are served by wordpress, from this directory:

/home/chapterhosting/wordpress-mu

The themes live here:

/home/chapterhosting/wp-content/themes/

The main blog uses:

/home/chapterhosting/wp-content/themes/fco-wordpress-theme

If you make edits on the live site, they won't show up right away!

Why? Because we use a caching plugin for wordpress, which means that your edits to the php files aren't immediately added to the cached html files that the server serves. The best way to refresh the cache is to make an edit to a static page (just add a line break at the bottom or something).

When you edit the main site theme, you really should use version control

See #Subversion. However, don't let this be a total blocker. Just please do let the webteam know when you make live edits that haven't been checked in, so that someone else can check them in.

You can even make live edits right from your web browser

Your account on our wordpress install will need permissions to access the "network" dashboard. Then you just go here. Again, please make sure that your edits are checked in to version control.

Mailing lists

We use Mailman to manage our lists.


I just want to subscribe to mailing list X

(For illustrated instructions, see the page about our Fc-discuss listserv!)

  • Go here
  • Find mailing list X
  • Click on it
  • Enter your email address and name in the "Subscribing to X" section
  • Press "Subscribe"
  • That's it.

I want to do something that's more like list management

General Credentials

The password is usually listed in /home/freecult/passwords/mailman You can access that file by connecting through SSH or SFTP. If that doesn't work or you don't know how to access that, contact User:Gameguy43 to get the right password.

I want to make a new mailing list

  • Do that here
  • Leave the field for the list password blank, selecting the option to have a new list password generated automatically
  • The main mailman password will always work on this list
  • The last field, called "List creator's (authentication) password" is where you enter the password described above

I want to do something else, AKA Generally Useful Links


I want to subscribe someone easily, from the command line

create a script subscribe.sh that looks something like this:

ssh gameguy43@freeculture.org "cd /usr/lib/mailman/bin ; echo $1 | sudo python /usr/lib/mailman/bin/add_members -r - -w y -a y discuss"

Email Forwarding

To set up forwarding from address@freeculture.org to person@example.com:

  • $ adduser address (if the user doesn't already exist)
  • edit ~address/.procmailrc to read something like this:
:0c
! person@example.com

The "c" stands for copy. That's key - they stay in the IMAP box.


We have a secret gmail account, freeculture.org at gmail dot com, that receives copies of the email sent to freedom, newgroup, and media. This was built to solve [1]. The password for this secret account can be found in ~freecult/passwords, like most other passwords.

Because each of those email addresses is a separate account, they have a .procmailrc in their $HOME that reads:

:0c
! the.gmail.address.i.listed.above@example.com

Chapter hosting

Chapter Blogs

Chapter blogs are hosted on our WordpressMU install (which is now just called Wordpress). These files live here:

/home/chapterhosting/wordpress-mu

So that means that the themes live here:

/home/chapterhosting/wordpress-mu/wp-content/themes

Where is the admin interface?

here

Making a new blog

To create a new blog, you need a "site admin" account.

For that to happen, someone who has one needs to add your username to: http://wpmu.freeculture.org/wp-admin/wpmu-options.php In the field "Site Admins" at the very bottom of the page.

How do I know I'm a site admin?

When you log in here, you'll see a widget in your sidebar called "Site Admin."

So how do I do it already?

  • Fill in the form here. Put the chapter leader's contact info (or whoever it is that you're interfacing with to make their website) in the "Admin Email" field.
But the site won't be visible until you do this:
  • Edit /etc/apache2/conf.d/400-wpmu.conf. Probably you'll want to enter a command like this:
sudo nano /etc/apache2/conf.d/400-wpmu.conf

Add a line like this:

ServerAlias chaptername.freeculture.org

Where chaptername is the blog subdomain, as you entered it when you created the blog

  • run this:
sudo /etc/init.d/apache2 reload

Themes

We should document this.

There are a bunch of Deprecated chapter hosting notes, including stuff about chapter wikis

The Chapter Database

It lives in a google spreadsheet. A python script runs nightly (or so) and slurps out the data and drops it in to freeculture.org/chapters.json. to run this script on demand, do this:

python /home/freecult/software/fco-svn/googledoc-chapterdb-scripts/trunk/slurp_chapter_db.py

The Chapter News Feed (and the personal Planet)

The planet program lives in ~/planet-prog/. It outputs to ~/public_html/planet/ via an every-30m cron job.

Configuration

There are two planets. They share the same Python code; they just have different config.ini directories:

  • ~/planet/personal-planet/config.ini
  • ~/planet/chapters-planet/config.ini

Add people's RSS feeds to those config files according to the comments you'll find inside. For the people Planet, add people's mini-photos in ~/domains/planet.freeculture.org/images/ and adjust the config.ini as appropriate. For the chapters Planet, I have no idea.

You might consider backing up all of the files to the .backup directory before making changes.

Upgrading "planet"

You could try upgrading it using "bzr". I wouldn't try it without backing up ~/planet-prog/. I expect it to clobber ~/planet-prog/examples/fancy/config.ini.

Cache

LiveJournal, for example, has broken RSS feeds that sometimes give the wrong Last-Modified-Date. So you might need to ask Planet to redownload the whole feed.

According to ~/planet-prog/examples/fancy/config.ini , Planet stores its cache in ~/planet-prog/cache/ . So to delete the whole cache:

rm ~/planet-prog/cache/*

In that directory, you can choose to remove just a single cached feed. The names make it clear which one is which.


The Front Page

How does the actual FreeCulture.org homepage get produced? What does everyone see when they visit http://freeculture.org ?

Since we have moved the site into Wordpress, most of our code can be found in the Wordpress theme "fco-wordpress-theme" in "~/domains/freeculture.org/wp-content/themes/". The skeleton for the front page is found in "front_page.php", which gets the content from functions found in "fco-wordpress-theme/front_page/". For instance, the "blurb" at the top of the front page (currently "Students for Free Culture is an international chapter-based student organization that promotes the public interest in intellectual property and information & communications technology policy.") can be found in "fco-wordpress-theme/front_page/front_page_code.php".

The content for the "Current Campaign" box does not come from the theme, it is what you see if you try to open the front page in the Wordpress page editor... it is intended to be easily edited and updated through the GUI just like any other blog page.

Cron

We use cron to run tasks every once in a while. To see the current list of jobs that run, do:

crontab -l

To edit them:

crontab -e

To see what the file format is, read this reference.

Databases

Creating

Viewing

  • You can not use PHPMyAdmin to view our databases.

Subversion

Checking out

Committing

  • Just do "svn commit"!
    • But you must be a registered user first, see below!

Adding users

  • Log in to the freeculture.org server, and do:
htpasswd /home/freecult/subversion-repository/conf/htpasswd YOUR_USERNAME
    • Your password will not be encrypted when sent across the Internet, so keep that in mind when picking the password.

Backups

Files

Asheesh set up 'dirvish' and configured his work desktop to pull the backups from the fco vserver.

Databases

Every night, a cron job runs that saves all the databases to separate files in /home/freecult/backups/databases/. These are then copied as regular files during the nightly dirvish backup job.

To get a database in on this super fun backup party (everyone's doing it), add it to /home/freecult/passwords/mysql_passwords

Monitoring

We have monitoring by cyberspark.net Parker and Asheesh get the emails.

Wiki

Data privacy on this wiki

We ask users to store personal information in this wiki. Here are all the ways we restrict access to it:

  • TODO: Non-includable namespaces: NS_USER should be blocked from being transcluded.
  • DONE: Semantic MediaWiki currently does not store properties whose names begin with secret_.
    • FIXME: It should store the data and just not show it unless you're an admin.
  • TODO: Choose some MW extension to prevent people from reading source of NS_USER pages.
    • In practice, the "read" right allows viewing the source. Therefore, we will have to:
      1. Prevent non-owners of an NS_USER page from changing that user's page, and
      2. Around line 1077, change the $source to a message indicating data has been hidden from view for privacy reasons, and
      3. Prevent the DifferenceEngine from showing these pages.
        • Main call is Article.php:661, but just grep for new.*DifferenceEngine

Review of UserCan extensions

Which MW extension can easily prevent people from writing each others' NS_USER pages?

Hmm. From #mediawiki moments ago:

<paulproteus> I want pages that people can read but can't view the source of, to be clear.
<Simetrical> paulproteus, it controls all view permissions, including view source.
<paulproteus> I see.
<Simetrical> You can't have that.

Upgrading Semantic MediaWiki

If you feel motivated to upgrade Semantic MediaWiki or Semantic Forms, you should be sure to update the SMW data set. Here's how:

$ cd domains/wiki.freeculture.org/maintenance/
$ php SMW_refreshData.php -pv
$ php SMW_refreshData.php -v


Domains

DEPRECATED: Every domain we own or run is listed at Domains.


Calendar publishing

DEPRECATED--as far as I know, we don't do this anymore --Parker, oct 16th 2010.

We use phpicalendar. If everyone working on the national level shares their calendars with each other, it becomes much easier to schedule meetings at mutually convenient times (instead of playing calendar battleship... "are you free at 3pm?" "No." "How about 4pm?" "You sunk my battleship! You bastard!").

As a user

  1. Set your calendar client to synchronize to http://freeculture.org:8080/calendars/YOURNAMEHERE.ics
    • You will need to use a username/password pair special to the calendar stuff assigned to you by the web team
    • Be SURE you use a file with your name in it. Otherwise you run the risk of others overwriting your data, and vice-versa!
  2. Check on http://freeculture.org/cal/ that your calendar appears

As a sysadmin

  • Apache2 runs the WebDAV service; its configuration is in /etc/apache2/
  • htpasswd file in ~freecult/passwords/calendar-htpasswd
  • calendar files stored in ~freecult/public_html/database/calendars/
  • to change someone's password, or create a user, do:
htpasswd  /home/freecult/passwords/calendar-htpasswd USERNAME

thesis writing service

Passwords

We keep them all in ~freecult/passwords/


Where the heck are the files for the part of the website that I'm working on?

The main blog and chapter hosting are served by a wordpress install out of:

/home/chapterhosting/wordpress-mu

But most other things are served out of:

/home/freecult/domains

here is a step-by-step description of how to make changes to our live Wordpress theme, by Nelson

  1. You must be able to SSH into the server as both freecult@freeculture.org and chapterhosting@freeculture.org. To gain this power, someone who already has this power must put your SSH public key into the freecult@ and chapterhosting@ authorized keys files. (We prefer RSA encryption over DSA)
  2. You must add yourself as an svn user, by SSHing into the server as freecult and executing this command:
    htpasswd /home/freecult/subversion-repository/conf/htpasswd YOUR_USERNAME
    It will fail if you are not logged in as freecult b/c freecult owns those files.
  3. Check out our SVN repository by running this command on your local machine:
    svn checkout http://freeculture.org:8080/svn/
  4. Make your changes to "wordpress-theme" in your SVN checkout
  5. Do an "svn commit" on your machine, such as:
    svn commit --message "This should fix the admin bar bug" --user myusername --password mypassword
    If your username on your UNIX system is different from your SVN username, the --user option is necessary, the --password option is not necessary, it will prompt you for your password if you don't put it on the command line.
  6. SSH into the server as chapterhosting and go to the directory where the live theme lives:
    cd wordpress-mu/wp-content/themes/fco-wordpress-theme
  7. Do an "svn up" to pull the changes from your local repository.

Ta da! Your changes should be live on the website now! That wasn't that hard was it? OK, maybe it was.