README 2.58 KB
Newer Older
Eric Rasmussen's avatar
test    
Eric Rasmussen committed
1
2
3
********
** How to set up UNL_Elgg:
********
4
5
Run the setup.sh script to symlink all the necessary plugins
	./setup.sh
Brett Bieber's avatar
Brett Bieber committed
6
Create a database named unl_social
7
Import the full_dump.sql file*
8
	mysql -u root unl_social < full_dump.sql
Brett Bieber's avatar
Brett Bieber committed
9
10
11
12
13
Browse to the elgg directory in your web browser.
Create the local elgg/.htaccess file using the sample on the install page
	Be sure to set the correct RewriteBase /~bbieber/UNL_Elgg/elgg/ for example.
Create the local elgg/engine/settings.php file.
	Be sure to specify unl_social as the database name
14
15
16
Create a local directory for elgg data outside of the web root.
	Change the permissions so Apache has write access to it.
	sudo chown _www elgg_data
Brett Bieber's avatar
Brett Bieber committed
17
Install the UNL_Templates pear packages
18
	pear channel-discover pear.unl.edu && pear install unl/UNL_Templates-beta unl/UNL_Services_Peoplefinder-beta DB
Brett Bieber's avatar
Brett Bieber committed
19
Set the correct site url within the database:
20
21
22
	UPDATE elggsites_entity SET url='http://localhost/workspace/UNL_Elgg/elgg/' WHERE guid=1;
	UPDATE elggdatalists SET value = '/Users/smeranda/Documents/workspace/UNL_Elgg/elgg/' WHERE name = 'path';
	UPDATE elggdatalists SET value = '/Users/smeranda/Documents/workspace/elgg_data/' WHERE name = 'dataroot';
23
24
Make sure the local site has an updated copy of the templatedependents

Eric Rasmussen's avatar
test    
Eric Rasmussen committed
25
 
26

Eric Rasmussen's avatar
test    
Eric Rasmussen committed
27
28
29
*******
** Notes on importing data:
*******
Matthew Juhl's avatar
Matthew Juhl committed
30
31
32
33

****From here on out we will be dumping data from the live server to import on testing instances only. Changes on test
instances that modify database fields must be documented and repeated on the live server after testing.

34
35
36
37
38
full_dump.sql is is full copy of the mysql database that must be modified upon import.
safe_dump.sql can be imported without the need for modification

when importing full_dump.sql, you must modify certain rows in the tables elggdatalists and elggsites_entity so
that they pertain to the local elgg site instance. 	(so if you see something like 
Eric Rasmussen's avatar
test    
Eric Rasmussen committed
39
40
41
42
43
http://ucommjuhl.unl.edu/UNL_Elgg/elgg, change it!)



*******
Eric Rasmussen's avatar
Eric Rasmussen committed
44
** Changes made to the Elgg engine for UNL's implementation (changes made inside the elgg directory)
Eric Rasmussen's avatar
test    
Eric Rasmussen committed
45
*******
46
47
-Altered /elgg/engine/lib/users.php to bar registration of accounts starting with "unl_"

48
49
50
51
52
53
54
55
56
57
58
	function register_user($username, $password, $name, $email, $allow_multiple_emails = false, $friend_guid = 0, $invitecode = '', $isfromSSO = false) {
	
		// Check to see if $username begins with "unl_"
			if($isfromSSO==false)
			{
				if ( "unl_" == substr($username,0,4) ) {
					//return false;
					throw new RegistrationException("Username cannot begin with 'unl_'");
				}
			}

59
60
61
*******
** Plugin info
*******
62
Just run the setup.sh script. If any plugins are added, add this to the setup.sh script.