Website Development

From Open Clip Art Library Wiki

Revision as of 19:45, 3 March 2009; view current revision
←Older revision | Newer revision→
Jump to: navigation, search


Contents

General

The website is hosted by http://osuosl.org and, Ted Gould, Andy Fitzsimon and Jon Phillips have admin level access to the virtual machine. openclipfont, running this site, Create, and Open Font Library.

After following the Developer Management procedure, plesae take note that there is only one supported path for website development, which is to recreate the live setup on one's local computer. The admins have access to push changes to the live server, but this is after testing. Developing for websites is different from developing desktop software.

Developers

Software and Repositories

This project is powered by ccHost. We use the latest stable SVN tagged version of the site from SVN, so that if there is a new tagged version, then svn switch may be used to update the site to the latest stable version. Granted, if there is a new version, this svn switch command should be tested on the test site first, and then if all works fine, then run the command on the live site.

There are only a couple of tweaks to the main installation which should be noted:

/var/www/openclipart.org/htdocs

.htaccess is at the root level of the site, with many tweaks needed for redirects, rewrites and other php settings.

   /.htaccess

robots.txt is to block a few things which were getting massive traffic on overlap.org and bringing the site to its knees.

   /robots.txt


The configuration for the site db:

   /cc-config-db.php

Some misc. files which were added at request of devs:

   /crossdomain.xml

The wiki is here:

   /wiki


The customizations to ccHost go here:

   /ocal

The plugins file has mostly third-party plugins.

   /ocal/plugins

Here is the plugins folder for some custom code:

   /ocal/plugins/ocal

Back up a directory and one will find the skins (themes) directory:

   /ocal/skins

Here is the theme directory:

   /ocal/skins/overlap

The following folders are where user custom data and uploads are installed:

   /downloads
   /people
   /contest
   /planet

And here are legacy folders which need to be integrated:

   /cgi-bin
   /hierarchies
   /incoming
   /logo
   /stats
   /test
   /test.php
   /testfiles
   /tools
   /tutorials

99.999% of Customizations

So, 99.999% of any and all changes can be done through the skins and then more specifically through the plugins. Of the changes to be made, 99.999% should be made to the skin.

If you make ANY changes to the skins or plugins files in the directories, then you MUST commit them so that others can use them and so that the history of those files is saved in case the older version is needed, someone sets up a test install on their own computer, or for others to use.

Also, if you commit changes to the SVN repositories, please notify the admins by filing a bug about this once you have features ready to merge to the live site.

Skins

The skin is at:

/var/www/openclipart.org/htdocs/ocal/skins

Above is the site theme which controls the entire look and feel of the project as well as provides several functions and bits of code to give the entire project life. It should be noted that the SVN repo for this theme is under:

https://svn.openclipart.org/public/openclipart/www/ocal-files/skins

Plugins

As a last resort, please create and/or edit the current plugins to get whatever functionality you need.

Inside of the plugins folder is a folder under SVN. The repo for these plugins is:

https://svn.openclipart.org/public/openclipart/www/ocal-files/lib

Templates

Templates are some of the pages that are displayed on the site. Hack on these, send patches to them, or commit if you have the privileges to do so.

https://svn.openclipart.org/public/openclipart/www/ocal-files/viewfile

Local Development

Checkout a copy of the latest ccHost software by following [ccHost instructions http://wiki.creativecommons.org/Cchost/Developers#New_Checkout], or:

svn co svn+ssh://svn@code.creativecommons.org/svnroot/cchost/trunk openclipart

Install ccHost to your local system. RECOMMENDED: Linux-bases system, MYSQL, and PHP.

Navigate through your web browser to the path to your ccHost install. You will have to set it up properly as described here [ ccHost installation instructions http://wiki.creativecommons.org/Cchost/guide/Installing]. NOTE: We recommend to checkout from the Subversion repository as listed above, rather than install from the package, which makes it easier to update.

On installation, name the folder for customization: ocal

Checkout from our public SVN repository:

svn co https://svn.openclipart.org/public/openclipart/www/ocal-files openclipart/ocal-new


Move the old ocal-files out of the way:

mv openclipart/ocal-files ../ocal

Move the new one into place:

mv openclipart/ocal-files-new openclipart/ocal

Test out the installation, and make sure the files work, and the site has the new skin working.

NOTE: These setup instructions need testing. And, eat present, this doesn't get you config files to get the exact current settings of OCAL. This gets you a basic installation that looks like OCAL for creating a theme, testing new plugins, etc.


After running the local setup, if you make changes to the ocal-files checked out code, you can then make patches and file as a bug or commit directly if you've already submitted a patch, and have been given developer level access.

Admins

For ADMINS ONLY', after:

ssh USERNAME@openclipfont.osuosl.org

Then one may find the main site at:

/var/www/openclipart.org/htdocs

And, the test site (for development and staging) sits behind a username/password barrier:

/var/www/test.openclipart.org/htdocs

The concept is that NO DEVELOPMENT IS DONE ON THE LIVE WEBSITE. All changes, and generally if you are not sure about changes, please do them on your local setup, and commit them to our project SVN or if changes to our engine, ccHost, commit to that codebase please.


Live to Development

There is a script we have to do this, but it is not documented here currently and is only for Admins to run anyway.

This section is incomplete. You can help by expanding it.

Development to Live

There is no script for this, because it is too dangerous to do this automatically. Rather, one should make sure that any changesthat should be made live, are thoroughly tested on the test/development site at test.openclipart.org before moving over to the live website.

Personal tools