Build an Elgg social network
With its swift installation and simple set-up, Elgg provides you with all the tools you need to become the next MySpace. Karl Hodge shows you how to create your very own Elgg social network
Elgg is a PHP-powered script that helps you set up a fully featured social network in your own web space. You’ll need PHP support, and a spare MySQL database. Make sure you have a username and password for it before you begin your installation. The software’s still in beta, but the version I used (on the tutorial files) is a robust and stable release.
Why set up a social network on your own site rather than on MySpace or LiveJournal? The answer is control. You maintain absolute control over the look and feel of the whole site, decide which modules to add and which to leave out. You can even change the entire layout of the page template with just a little HTML savvy. In short, why join MySpace when you can be MySpace?
1. Install Elgg
Elgg’s installation is relatively straightforward, but there are a couple of issues you’ll need to look out for to ensure it runs smoothly. Extract the contents of the archived file (from our tutorial files) locally, then navigate to the resulting directory. It should be named ‘elgg0.8rc2’.
2. Upload ‘elgg’
There’s a second folder within, also called ‘elgg0.8rc2’. Rename it ‘elgg’ and upload it to the root of your web space. You’ll need to create and set permissions on a new directory, /elgg/data/, to be world-writable – the same goes for /elgg/mod/template/templates/Default_Template/.
3. More renaming
You’ll also need to rename the file ‘htaccess-dist’ in Elgg’s root folder to ‘.htaccess’. This file checks that mod_rewrite is enabled. mod_rewrite is an Apache module that makes long URLs more user-friendly, and is essential to Elgg’s successful operation.
4. Enter your details
You’re now ready to configure Elgg and install database tables. Go to yourwebspacename/elgg to access the software’s Administration panel. You’re prompted to fill in a long, detailed form. Most of this is self-explanatory, but I’ll highlight a couple of points.
5 .Create an account
You’re asked to create an Admin password. This account is for accessing the software’s Configuration acreate a second account for logging into Elgg for the first time.
Get the Creative Bloq Newsletter
Daily design news, reviews, how-tos and more, as picked by the editors.
6. Make an upload folder
Elgg should automatically detect paths and URLs, but in one section you’re asked to create an upload folder for Elgg. This goes in the root of your web space, not your Elgg installation folder. The form requires a path to the folder – this is the physical path, not the URL.
7. Save this configuration
After filling in the form, making sure you’ve correctly entered your database name, password and database username, click Save. When prompted, log in to the Elgg Administration panel. Again, this is the software settings panel, not your site administration tools.
8. Installation complete!
I’ll return to the Administration panel later, but for now, navigate back to your installation’s front page. Go to yourwebspacename/elgg – this time, your site should complete its installation and enable you to continue to the working application.
9. Log in to the site
Log in with the username News, using the password you entered in the Administration panel. This is a special user account with user management powers. Your first move in creating your Elgg social network should be to familiarise yourself with the user management tools and change this account for security.
10. Add a user
Click the Administration link in the grey navigation bar at the top of the screen, then go to Add Users. Fill in the top row with a new username, real name and a legitimate email address. Click Add Users and check your emailinbox to make sure you’ve received a password.
11. Set an Admin user
Make this user into an Administrator by going to Manage Users > User Flags. Click Yes under Site Administrator, then Save. Choose to log off via the grey navigation strip, log in as the new Admin user and, after verifying it works, delete the user News.
12 Edit your profile
Users get started with Elgg by creating their own profile. You can edit yours by clicking on the default user icon in the You sidebar, then choosing “Edit this profile”. The tabbed form sections explain themselves, but you may be interested in the Add Widgets bit.
13. Elgg widgets
In Elgg, widgets are code blocks that add bits of functionality to your profile. You can add videos, a blog box, RSS headlines and more. It’s a better approach than the MySpace model where everything is on by default. Speaking of blogs, you can use Elgg to start your own.
14. Create a blog
Click the Your Blog link up in the left-hand corner. The system is straightforward and intuitive – post entries, add tags or video, or edit existing entries in a rich editing window. Elgg enables you to also add files to your account that can be shared with other users.
15. Features galore
Click Your Files to manage and share storage. Your Network is where you add and manage friends, create communities and join existing groups. All these sections are simple to use and cleanly set out. To access Elgg’s hidden functions, return to the Administration panel.
16. Edit settings
Go to yourwebspaceurl/elgg/_eadmin when prompted, log in with the username “admin” and the password you set during installation. This takes you back to an extended version of the panel you used to set up and install your Elgg social network in the first place. You can edit your initial settings here.
17. Edit the theme
You can edit your site’s default theme, providing you set the directory to be world-writable earlier. You have access to your templates with a plain text editor, and a guide on the right displays placeholder keywords for inserting dynamic content. Back up before making changes.
18. New themes
To add further themes to your site, go to elgg.org/themes/files/4 and download some. To install a new theme, unzip the file and transfer the contents to /elgg/mod/template/templates. This will now be available to users as a theme choice in Account Settings > Change Theme.
19. Set your default theme
Make a new theme the default by changing the name of the default theme folder and renaming your new theme folder ‘Default_Theme’. To lock it, go to the Administration panel and disable template changing.
Thank you for reading 5 articles this month* Join now for unlimited access
Enjoy your first month for just £1 / $1 / €1
*Read 5 free articles per month without a subscription
Join now for unlimited access
Try first month for just £1 / $1 / €1
The Creative Bloq team is made up of a group of design fans, and has changed and evolved since Creative Bloq began back in 2012. The current website team consists of eight full-time members of staff: Editor Georgia Coggan, Deputy Editor Rosie Hilder, Ecommerce Editor Beren Neale, Senior News Editor Daniel Piper, Editor, Digital Art and 3D Ian Dean, Tech Reviews Editor Erlingur Einarsson and Ecommerce Writer Beth Nicholls and Staff Writer Natalie Fear, as well as a roster of freelancers from around the world. The 3D World and ImagineFX magazine teams also pitch in, ensuring that content from 3D World and ImagineFX is represented on Creative Bloq.