/opencfp

Repo for OpenCFP project, a PHP-based conference talk submission system

Primary LanguagePuppetMIT LicenseMIT

Build Status Code Climate Test Coverage opencfp

Repo for OpenCFP project, a PHP-based conference talk submission system

Contributing

We welcome and love contributions! To facilitate this we encourage you to create a new personal branch after you fork this repo, for content and changes specific to your event. However, anything you are willing to push back should be updated in the master branch. This will help keep the master branch generic for future event organizers. You would then be able to merge master to your private branch and get updates when desired.

Requirements

Please see the composer.json file. You may need to install php5-intl extension for PHP. (on Ubuntu, not sure what it is called for other OS) Also, must have PHP 5.4+. Requires apache 2+ with mod_rewrite enabled and "AllowOverride all" directive in your block.

Installation

Main Setup

Clone project

  1. Clone this project into your working directory.

Use Composer to get dependencies

  1. Now tell composer to download dependencies by running the command: NOTE: May need to download composer.phar first from http://getcomposer.org

    $ php composer.phar install
  2. Set up your desired webserver to point to the '/web' directory.

  3. Create database along with user/password in MySQL for application to use.

  4. Rename the /config/config.development.ini.dist file to /config/config.development.ini.

    $ mv /config/config.development.ini.dist /config/config.development.ini
    $ mv /config/config.production.ini.dist /config/config.production.ini

NOTE: Use development or production naming as appropriate.

  1. Customize /config/config.development.ini as needed for your environment and site settings.

    NOTE: The enddate will be observed. The app now locks at 11:59pm on the given enddate.

  2. Alter the /classes/OpenCFP/Bootstrap.php file with the desired $environment. Lines 11 and 12.

  3. Populate MySQL database by using the schema.sql script available in '/migrations' folder.

    $ mysql -h HOST -u USER_NAME -p DATABASE_NAME < /migrations/schema.sql
  4. May need to edit directory permissions for some of the vendor packages. (your mileage may vary)

    NOTE: If you are enabling template / htmlpurifier caching, you should create a directory with appropriate file permissions and configure accordingly in your config.*.ini.

  5. Update directory permissions to allow for headshot upload.

    /web/uploads - needs to be writable by the web server

  6. May need to alter the memory limit of your web server to allow image manipulation of headshots.

    NOTE: This is largely dictated by the size of the images people upload. Typically 512M works. If you find that 'speakers' table is not being populated, this may be why.

  7. Customize templates and /web/assets/css/site.css to your hearts content.

  8. Enjoy!!!

Additional Admin Setup

  1. There is also a script available in /tools directory (to be called via command line) To enable a user to become an Admin. So via CLI from within the /tools directory.

    $ php create_admin_user.php --update {email-address}

This will enable specified user to navigate to /admin through a link now visible on the Dashboard.

Migrations

This project uses Phinx to handle migrations. Be sure to edit the phinx.yml file that is in the root directory for the project to match your own database settings.

To run migrations, make sure you are in the root directory for the project and then execute the following:

```bash
$ ./vendor/bin/phinx migrate
```

This will run through existing migrations in the /migrations directory, applying any that have not yet been done.

Testing

There is a test suite that uses PHPUnit in the /tests directory. The recommended way to run the tests is:

$ ./vendor/bin/phpunit -c tests/phpunit.xml