Shell access
Signing into VPS host for arf.berkeley.edu
From Mac Terminal:
Nicos-MacBook-2:~ nico$ ssh arf_labs@arf.berkeley.edu
The authenticity of host 'arf.berkeley.edu (69.163.220.119)' can't be established.
RSA key fingerprint is xxxxxxxx
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'arf.berkeley.edu' (RSA) to the list of known hosts.
arf_labs@arf.berkeley.edu's password:
Last login: Thu Jun 16 10:37:34 2011 from dhcp-169-229-201-181.lips.berkeley.edu
[arf_labs:~]$ cd arf.berkeley.edu/
ARF WEBSITE Drupal 6
update site and modules :
drush –u 1 up
Edit theme .tpl.php files
Determine the tpl.php file to edit using Firebug or Chrome inspector. For views go to Theme: Information for that view. Copy the template view tpl.php file to the custom theme directory and modify as needed.
The file goes in
[arf_labs:~/arf.berkeley.edu/sites/all/themes/arfland]$
However, to edit CSS file go to style.css file located in
[arf_labs:~/arf.berkeley.edu/files/color/arfland-87f93aca]$
You can use a client like Filezilla to access the file and edit it locally, or edit it directly on the server using an editor like VI or PICO
The pico command
Pico style.css
Use CTRL-X to save out and exit, CTRL-O to save without exiting.

 
Administration Notes

ARF Website Design Notes

The main ARF Logo on the top left of the site consists of two fonts, Martel a free truetype font and Book Antigua (a Palatino alternate) that comes with MS Office. The small blue dancing icon comes from Bolivian iconography supplied by Prof Hastorf.

The Garland color scheme values are as follows: #efe406, #2555528, #2555528, #9fdba3, #696969


About Upgrading a Drupal site

Upgrading the site and contributed modules at the ARF site is not difficult, but it should be done in the proper sequence. If you are unfamiliar with the process, consult the Installation and Upgrading Handbook at the Drupal.org.

Two important steps to keep in mind are shown below in Steps 1 and 6: Backup your database before upgrades, and run "/update.php" on your site after any module update. More details follow.


Module Upgrades

The upgrade status of the ARF drupal website can be checked here

http://arf-demo.berkeley.edu/admin/reports/updates

Upgrading individual contrib modules is simpler with shell access.

1. Always put the site offline in Maintenance Mode and back up the arfdb database before doing upgrades

https://dba-services.berkeley.edu/basicmysql/overview

We are on Port 054, user: arfdb, passwd: <our database passwd>

2. Check the Available Updates page and right-click on the "Download" link for modules that are out of date (shown in Red). Choose "Copy Link Location" (Firefox) on the menu that pops up to put the download URL in the clipboard.

3. Sign into Calweb Pro Shell access using a telnet client. User: arf, passwd: <our admin passwd> and navigate to the modules directory. From the login home directory the command would be

cd ~/htdocs/drupal/sites/all/modules

4. Download the upgraded module as a .tar.gz file with this command

wget <full path to update file>

For example, to download the current version of CCK module issue this command at the shell

wget http://ftp.drupal.org/files/projects/cck-6.x-2.0-rc5.tar.gz

5. Expand the tar.gz file using

gunzip <filename.tar.gz>

tar -xf <filename.tar>

6. Whenever modules are updated the MySQL database also needs to be updated by signing in as "admin" and going to

/update.php

7. You're done! Test it and make sure it works as expected.


&amp;amp;amp;amp;amp;amp;lt;!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;
mso-font-charset:0;
mso-generic-font-family:roman;
mso-font-pitch:variable;
mso-font-signature:-1610611985 1107304683 0 0 159 0;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;
mso-font-charset:0;
mso-generic-font-family:swiss;
mso-font-pitch:variable;
mso-font-signature:-1610611985 1073750139 0 0 159 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-unhide:no;
mso-style-qformat:yes;
mso-style-parent:"";
margin-top:0in;
margin-right:0in;
margin-bottom:10.0pt;
margin-left:0in;
line-height:115%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:Calibri;
mso-fareast-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;
text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-noshow:yes;
mso-style-priority:99;
color:purple;
mso-themecolor:followedhyperlink;
text-decoration:underline;
text-underline:single;}
.MsoChpDefault
{mso-style-type:export-only;
mso-default-props:yes;
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:Calibri;
mso-fareast-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
.MsoPapDefault
{mso-style-type:export-only;
margin-bottom:10.0pt;
line-height:115%;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;
mso-header-margin:.5in;
mso-footer-margin:.5in;
mso-paper-source:0;}
div.Section1
{page:Section1;}
--&amp;amp;amp;amp;amp;amp;gt;

/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-qformat:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin-top:0in;
mso-para-margin-right:0in;
mso-para-margin-bottom:10.0pt;
mso-para-margin-left:0in;
line-height:115%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;}

<![endif]-->

 

Drupal .X.X Version Upgrade

Upgrading your Drupal install is more complex than just a module update because the modified directories must remain unchanged. In most circumstances these include the contents of the /sites/ directory and .htaccess file in the Drupal root. Please see this documentation at Drupal.org for more details.
1. As in Step 1 of the section above, put the site offline in Maintenance Mode and back up the arfdb database before doing the upgrade.
2. Login from the Calweb Pro Shell account, described above in Step 3 above, using a telnet client. The existing site can be moved to a different directory name to make copying easier using this command from the ~/htdocs/ directorymv drupal drupalxx_bk
this renames the “drupal” directory “drupalxx_bk”. Consider putting the older version number in the place off “xx”. For example, upgrading from Drupal 6.3 to 6.4 you can use “mv drupal drupal63_bk”
3. Now that there is no longer a directory named “~/htdocs/drupal” we can download and expand the new version into that location from Drupal.org using these commandscd ~/htdocs
wget <filename.tar.gz>
gunzip <filename.tar.gz>
tar –xf <filename.tar> drupal
In the case of the Drupal 6.4 upgrade the wget command readswget http://ftp.drupal.org/files/projects/drupal-6.4.tar.gz
The resulting directory is called “drupal-6.4” so we want to rename it “drupal” usingmv drupal-6.4 drupal
Finally, clean up the .tar file withrm dru*.tar
4. Now you have the upgraded Drupal install in your webhost and you can copy the contributed modules and other site files into the new sites directory structure. It may be easier to do these steps using an FTP client like Fetch (Mac) or Filezilla (Windows).
Delete the existing /sites/ folder recursively
cd ~/htdocs/drupal/sites
rm –r *
Copy the contents of the old “sites” folder into the new one (substituting the directory name for “drupal63_bk”).cp –r ~/htdocs/drupal63_bk/sites/*
5. Return to the ARF website and bring it out of Maintenance mode. If you have trouble signing in (because it’s in maintenance mode) go tohttp://arf-demo.berkeley.edu/user
and log in again. Login as “admin” because you need to update the arfdb MySQL database
6. Update the database at/update.php
7. You’re Done! Browse around the site a bit and make sure things are functioning. Visit the Available Updates page to ensure everything is up-to-date.


Placing Images in Content

Using FCKEditor and Web File Manager images are uploaded and placed, and then the larger version of an image can be referenced for display by Thickbox.

  1. Edit content using FCKEditor
  2. Click "Insert/Edit Image" icon in FCK editor to place an image
  3. Click "Browse Server" button to view server in WebFM.
  4. Browse to directory and click "Upload File..." to upload image
  5. Right click the image and choose "Send to rich text editor"
  6. Copy the path to the image into the clipboard (for use later) and resize the image to an appropriate, smaller size. Choose Align:Left to have text flow around graphic.
  7. In FCKEditor select the image just added and then click "Insert/Edit Link" and paste path to graphic in URL <other>. Click Advanced tab and under Stylesheet Classes type "colorbox".
  8. You're done. The graphic should appear in the size specified, then when it is clicked a larger version should appear in a special ThickBox window.