Memory Hole Technical Documentation
About the Memory Hole
The Memory Hole is built upon a hacked-up version of SugarCRM 5.0. Many changes were made to the SugarCRM backend in order to streamline and customize the UI to be specific to the case of tracking arrestees and legal information. For all intents and purposes, it can be regarded as a fork of SugarCRM - and a pretty quick hack. Hopefully someday I'll write something better.
It utilizes PHP for the frontend and logic, and MySQL for the backend database. All data can be accessed directly through MySQL if need be, and is intended to be run on a Linux platform using Apache. Other systems may work, but the install instructions are specific to Ubuntu 8.04.
Administration
Adding User Accounts
- Click on Admin in the upper right
- Click on User Management under Users
- Click 'Create New Users: Home'
- Enter in first/last names, username, and password, then hit 'save' (rest is unneccessary)
- repeat for as many users as you want to set up
Adding Options to Lists
Click on Admin in the upper right
Click on Dropdown Editor under Developer Tools
Click Add Dropdown
Give the dropdown a name
Add items to the dropdown by filling out the name and label, and clicking add. The name is the value stored in the db, and the label is what will appear in the dropdown. In most cases, the value should be the same, except replace spaces with underscores in the name.
Click save
Adding Fields
First, you have to determine what kind of field you want. If you need a dropdown or multi-select, use the Dropdown Editor (described above) to create a new dropdown list first.
Create the Field
- Click on Admin in the upper right
- Click on Studio under Developer Tools
- Select the right module from the list (arrestees, lawyers, etc.)
- Click 'Fields'
- Click 'Add Field'
- On the right side, the field editor will appear. First, pick the data type. Most likely you'll want either Textfield, checkbox, date, dropdown, multiselect, radio, or textarea (for large amounts of text, like notes).
- Each different data type has different options
- Fill in the Field Name, Display Label (the label that is shown on the forms) and system Label. They should all be the same, except Field name and sysytem label can't have spaces.
- For dropdowns and multiselects, choose which dropdown list to use from the list.
- If applicable, choose a default value.
- See http://www.sugarcrm.com/crm/index.php?action=docs&enc=UTF-8&option=com_docs&edition=OS&v=5.0&&doc=/docs/Administration_Guides/CommunityEdition_Admin_Guide_5.0/System_Administration.4.6.html#1113197 for more details.
- Hit Save
Add the Field to the Layout
- Click on Admin in the upper right
- Click on Studio under Developer Tools
- Select the right module from the list (arrestees, lawyers, etc.)
- Click 'Layouts', then 'Edit View'
- Drag new Panels, Rows, and fields from the left side onto the layout on the right side.
- Once everything is arranged right, you have to make sure the tab order is set for all fields and in the right order. Do this by clicking the edit icon on each field, filling in the tab order field with a number, and clicking save. NOTE: If a field has no tab order, or two fields have the same tab order, tabbing will be sscrewed up.
- When that's all set, click save and Deploy, then check out the edit view to see if it worked (preferably in another tab/window)
- Click 'Layouts' on the breadcrumb list, or follow the first few steps above to get back to the layout options
- Choose 'Search', then 'Advanced Search'
- Drag the new field from the list on the right into the list on the left. This will enable you to make searches based on the field
- Click 'Save and Deploy'
Memory Hole Installation
- install all the stuff we need
- run "sudo bash" and enter root password
- apt-get install apache2 php5-mysql php5 mysql-server-5.0 mysql-client-5.0 libapache2-mod-php5 php5-gd pwgen nano
- Just hit 'enter' when it asks to set up a mysql password
- setup the files:
- Download this file: memoryhole.tar.bz2 and save it to the desktop
- "cd /var/www/"
- "tar -xjvf ~/Desktop/memoryhole.tar.bz2"
- cd memoryhole
- create some passwords
- run pwgen to generate a list of mnemonic, but random, passwords
- select and write down three passwords:
- root database password (<DBROOT>)
- database user password (<DBUSER>)
- memory hole admin password (<ADMIN>)
- setup the database
- mysql -u root -e 'create database memoryhole';
- mysql -u root -e "use memoryhole; grant all on memoryhole.* to memoryhole@'localhost' identified by '<DBUSER>'";
- mysql -u memoryhole -p<DBUSER> memoryhole < db.sql (note no space between -p and <DBUSER> password)
- set a password on the mysql root account: mysqladmin -u root password <DBROOT>
- Edit the config file
- nano config.php
- find the line that looks like 'db_password' => 'PASSWORD',
- change 'PASSWORD' to <DBUSER>
- <CTRL>-x, y, <ENTER> to save and exit
- chmod 700 config.php
- chown -R www-data.www-data config.php cache/ data/ modules/ custom/
- Change the admin password
- Hopefully, http://localhost/memoryhole should give you a login screen.
- Login as admin/sugar
- Click on My Account in the upper-right, then "change password". Change the password to <ADMIN>.
- You'll probably not need the DBROOT and DBUSER passwords anymore - store them in a secure place. You'll need the <ADMIN> password to create new accounts and preform other administrative tasks in the database.
- Set up accounts
- Click on Admin in the upper right
- Click on User Management under Users
- Click 'Create New Users: Home'
- Enter in first/last names, username, and password, then hit 'save' (rest is unneccessary)
- repeat for as many users as you want to set up