README 2.36 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:
*******
30
31
32
33
34
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
35
36
37
38
39
http://ucommjuhl.unl.edu/UNL_Elgg/elgg, change it!)



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

44
45
46
47
48
49
50
51
52
53
54
	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_'");
				}
			}

55
56
57
*******
** Plugin info
*******
58
Just run the setup.sh script. If any plugins are added, add this to the setup.sh script.