Elgg 1.5
Installation
To install elgg1.5 postgres version, you will need to follow these steps:
- Checkout tag from svn:
svn co https://code.oregonstate.edu/svn/admin/elgg/branches/elgg1.5
- Go ahead and use the web installer
- Before you register your first user account, add the line below to engine/settings.php (to use file based session):
$CONFIG->use_file_sessions = true;
- Don't forget to go to: elgg/pg/admin/plugins/ to enable any necessary plugins
Branches
The work that we are doing in elgg 1.5, can be divided into three areas:
- fixing sql queries - making them more sql generic so they work in both mysql and postres
- php errors fixes - some of the existing php errors in elgg 1.5 can get in our way while writing code
- adodb support - replacing the various mysql_* functions with ADOdb functions
In order to keep the patches and our work as separate as possible, we have 4 branches to keep everything clean. This should make submitin patches back to the elgg community and getting them tested a lot easier. The branches we have are:
- elgg1.5 - this branch contains the work of the three branches below merged into it. This branch should also contained bsc specific work (themes, modules, and other things)
- elgg1.5-adodb
- elgg1.5-sql-fixes
- elgg1.5-php-fixes
External Documentation
Elgg
- clearing cache
- Elgg Development Tools - do not deploy in live site only in dev instances
- ADOdb docs
- Elgg's Trac site
- Understanding Elgg views
- Elgg Schema
- Elgg Directory Structure
ADOdb
Modules
It looks like most modules do not write any sql statements directly. Instead they use ElggObject? which takes care of writing to the database and any other sql statements.
Core
Unfortunately the core code of Elgg does have quite a bit of sql statements, spread out through various files.
Debugging
One of the things that I hated the most about elgg 0.9.x was that they supressed errors. The practice still continues in elgg 1.5. To display php errors normally follow the steps below:
- .htaccess => make sure that display_errors is set to 1
- engine/start.php => make sure that you comment out the error handler functions.
Bugs
Search is only over tagsUser search was broken- Doesn't have a tag cloud (but there is a plugin)
Tags search are case sensitiveI've got a fixed copy of this --bettse
Theming
- Themes are done as plugins
- They can extend of override default view components
- Since images like the logo and OSU wordmark will be used in both Elgg and Trac theme, they should be centralized on the webserver (perhaps /var/www/social/images/)
Database Backup
To get a backup of live db:
pg_dump -h dogwood.osuosl.org -U username bsc_elgg15 > bsc-live-db-YYYYMMDD.sql
Note: For security reasons the command above can only be run from the live box
Database Import
psql -d elgg elgg < bsc-live-db-YYYYMMDD.sql
Import Db Dump
Based on http://docs.elgg.org/wiki/DuplicateInstallation you need to run the commands below
update elgg_sites_entity set url = 'http://munin-vm3.eecs.oregonstate.edu/social/' where guid = 1; update elgg_datalists set value = '/var/www/social/' where name = 'dataroot'; update elgg_datalists set value = '/var/www/social/' where name = 'path';

