Community Engine plugin

Plugin details

Adds basic social networking capabilities to your existing application, including users, blogs, photos, clippings, favorites, and more.

Websitehttp://www.missingmethod.com/projects/community_engine/ Repositoryhttp://github.com/bborn/communityengine/tree/master Tags Social, networking, Friends, photos, Upload LicenseUnknown

Documentation

Install the plugin:
ruby script/plugin install http://github.com/bborn/communityengine/tree/master

GETTING COMMUNITY ENGINE RUNNING
========
1. From the command line:

   $ rails site_name (create a rails app if you don't have one already) 


2. Install the engines plugin svn export http://svn.rails-engines.org/engines/branches/rb_2.0/ vendor/plugins/engines
3. Put community engine plugin into plugins directory (use one of the following methods):

# If you're not using git, and just want to add the source files: Download a tarball from https://github.com/bborn/communityengine/tarball/master and unpack it into /vendor/plugins/community_engine

# Using git, make a shallow clone of the community_engine repository:

   $ git clone --depth 1 git@github.com:bborn/communityengine.git vendor/plugins/community_engine 



# If you want to keep your community_engine plugin up to date using git, you'll have to add it as a submodule: http://www.kernel.org/pub/software/scm/git/docs/user-manual.html#submodules

4. Create your MySQL database (SQLite isn't supported) and modify your config/database.yml appropriately.
5. Delete public/index.html (if you haven't already)
6. Modify your environment.rb as indicated below:

## environment.rb should look something like this:
===============================================================

     RAILS_GEM_VERSION = '2.0.2' unless defined? RAILS_GEM_VERSION
      require File.join(File.dirname(__FILE__), 'boot')
      require File.join(File.dirname(__FILE__), '../vendor/plugins/engines/boot')

      Rails::Initializer.run do |config|
        #resource_hacks required here to ensure routes like /:login_slug work
        config.plugins = [:engines, :community_engine, :white_list, :all]
        config.plugin_paths += ["#{RAILS_ROOT}/vendor/plugins/community_engine/engine_plugins"]
  
        ... Your stuff here ...
      end


# Include your application configuration below

      require "#{RAILS_ROOT}/vendor/plugins/community_engine/engine_config/boot.rb"



7. Modify each environment file (development.rb, test.rb, and production.rb) as indicated below:

# development.rb, production.rb, and test.rb should include something like:
===============================================================

      APP_URL = "http://localhost:3000" (or whatever your URL will be in production)



8. Modify your routes.rb as indicated below:

# Add this after any of your own existing routes:
===============================================================

      map.from_plugin :community_engine



9. Generate the community engine migrations:

   $ script/generate plugin_migration 



10. From the command line:

 $ rake db:migrate


# NOTE: you must use a MySQL db, not compatible with Rail's default SQLite
11. You may need to change these lines in application.rb (uncomment the :secret part, because you're not using cookie sessions): See ActionController::RequestForgeryProtection for details Uncomment the :secret if you're not using the cookie session store

    protect_from_forgery # :secret => 'c1fdccfc9ebef1965bcf4e15aa5e6a34'



12. Run tests (remember, you must run "rake test" before you can run the community_engine tests):

   $ rake test
    $ rake community_engine:test


13. Start your server and check out your site!

    $ mongrel_rails start


or

    $ ./script/server





## OPTIONAL CONFIGURATION ##
To override the default configuration, create an application.yml file in RAILS_ROOT/config
===============================================================
The application configuration defined in this file overrides the one defined in /community_engine/engine_config/application.yml
This is where you can change commonly used configuration variables, like AppConfig.community_name, etc.
This YAML file will get converted into an OpenStruct, giving you things like AppConfig.community_name, AppConfig.support_email, etc.



## PHOTO UPLOADING ##
By default CommunityEngine uses the filesystem to store photos.
To use Amazon S3 as the backend for your file uploads, you'll need the aws-s3 gem installed, and you'll need to add a file called amazon_s3.yml to the application's root config directory (examples are in /community_engine/sample_files). You'll need to change your configuration in you application.yml to tell CommunityEngine to use s3 as the photo backend. You'll need an S3 account for S3 photo uploading.


## Create an s3.yml file in RAILS_ROOT/config (OPTIONAL) ##
===============================================================
CommunityEngine includes the s3.rake tasks for backing up your site to S3. If you plan on using these, you'll need to add a file in RAILS_ROOT/config/s3.yml. (Sample in engine_config/s3.yml)

Further Documentation

There is currently no advanced documentation for this plugin.

New documentation

Edit plugin | Back in time (1 older version) | Last edited by: scott, 4 days ago