{"id":13395148,"url":"https://github.com/bborn/communityengine","last_synced_at":"2025-03-13T20:31:56.256Z","repository":{"id":387802,"uuid":"5289","full_name":"bborn/communityengine","owner":"bborn","description":"Adds basic social networking capabilities to your existing application, including users, blogs, photos, clippings, favorites, and more.","archived":true,"fork":false,"pushed_at":"2021-04-05T01:27:31.000Z","size":9412,"stargazers_count":1138,"open_issues_count":0,"forks_count":316,"subscribers_count":54,"default_branch":"master","last_synced_at":"2025-03-06T11:07:17.130Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://www.communityengine.org","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bborn.png","metadata":{"files":{"readme":"README.markdown","changelog":"CHANGELOG.markdown","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2008-03-25T19:55:55.000Z","updated_at":"2024-10-07T18:13:59.000Z","dependencies_parsed_at":"2022-08-16T10:20:13.694Z","dependency_job_id":null,"html_url":"https://github.com/bborn/communityengine","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bborn%2Fcommunityengine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bborn%2Fcommunityengine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bborn%2Fcommunityengine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bborn%2Fcommunityengine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bborn","download_url":"https://codeload.github.com/bborn/communityengine/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243478311,"owners_count":20297234,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-30T17:01:44.107Z","updated_at":"2025-03-13T20:31:55.095Z","avatar_url":"https://github.com/bborn.png","language":"Ruby","readme":"CommunityEngine\n===============\n\n[![Build Status](https://travis-ci.org/bborn/communityengine.svg?branch=master)](https://travis-ci.org/bborn/communityengine)\n[![Dependency Status](https://img.shields.io/gemnasium/bborn/communityengine.svg?style=flat)](https://gemnasium.com/bborn/communityengine)\n[![Code Climate](https://img.shields.io/codeclimate/github/bborn/communityengine.svg?style=flat)](https://codeclimate.com/github/bborn/communityengine)\n[![Gem Version](https://img.shields.io/gem/v/community_engine.svg?style=flat)](https://rubygems.org/gems/community_engine)\n\n\nInformation at: [http://www.communityengine.org](http://www.communityengine.org)\n\n**Requirements:**\n\n\t- RAILS VERSION 4.1.x\n\t- RUBY  2.0.x\n\nFor Rails 3.x use the [rails3.x branch](https://github.com/bborn/communityengine/tree/rails3.x)\n\nFor Rails 4.0 use the [rails4.0 branch](https://github.com/bborn/communityengine/tree/rails4.0)\n\nFor Rails 4.2 (experimental) use the [edge branch](https://github.com/bborn/communityengine/tree/edge)\n\n\nGetting CommunityEngine Running\n--------------------------------\n\n1. Copy the following into your `Gemfile`:\n\n  ```ruby\n  gem 'community_engine', '~\u003e 3.2.0'\n  ```\n\n2. Add a file called `application_config.rb` to your `config` directory. In it put (at least):\n\n  ```ruby\n  configatron.community_name = \"Your Application Name\"\n  # See CE's application_config.rb to see all the other configuration options available\n  ```\n\n3. From your app's root directory run:\n\n  ```\n  $ bundle install --binstubs\n  $ bin/rake community_engine:install:migrations\n  $ bin/rake db:migrate\n  ```\n\n4. Mount CommunityEngine in your `config/routes.rb` file:\n\n  ```ruby\n  mount CommunityEngine::Engine =\u003e \"/\"\n  ```\n\n5. Delete the default `views/layouts/application.html.erb` that Rails created for you. Delete `public/index.html` if you haven't already.\n\n6. Start your server!\n\n  ```\n  $ bin/rails server\n  ```\n\nOptional Configuration\n----------------------\n\nTo override the default configuration, create an `application_config.rb` file in `Rails.root/config`.\n\nThe application configuration defined in this file overrides the one defined in the [CommunityEngine gem](https://github.com/bborn/communityengine/blob/master/config/application_config.rb).\n\nThis is where you can change commonly used configuration variables, like `configatron.community_name`, etc.\n\n\nOmniAuth Configuration\n----------------------\n\nYou can allow users to sign up and log in using their accounts from other social networks (like Facbeook, Twitter, LinkedIn, etc.). To do so, just add an initializer in your app's `config/initializers` directory called `omniauth.rb` and add the following lines:\n\n```ruby\nRails.application.config.middleware.use OmniAuth::Builder do\n  provider :twitter, configatron.auth_providers.twitter.key, configatron.auth_providers.twitter.secret\n  provider :facebook, configatron.auth_providers.facebook.key, configatron.auth_providers.facebook.secret, {:provider_ignores_state =\u003e true}\nend\n```\n\nYou must also add the corresponding provider gem, for example to use facebook login you will need to add the following to your gemfile:\n\n```ruby\ngem 'omniauth-facebook'\n```\n\nSee the [OmniAuth Github repository](https://github.com/intridea/omniauth) for more information and configuration options.\n\n\nPhoto Uploading\n---------------\n\nBy default CommunityEngine uses the filesystem to store photos.\n\nTo use Amazon S3 as the backend for your file uploads, you'll need to add a file called `s3.yml` to the application's root config directory (examples are in `/community_engine/sample_files`).\n\nYou'll need to change your configuration in your `application_config.rb` to tell CommunityEngine to use s3 as the photo backend. For more, see the Paperclip documentation on S3 storage for uploads: https://github.com/thoughtbot/paperclip/blob/master/lib/paperclip/storage/s3.rb.\n\nFinally, you'll need an S3 account for S3 photo uploading.\n\n\nRoles\n------\n\nCommunityEngine Users have a Role (by default, it's admin, moderator, or member).\n\nOnce logged in as an admin, you'll be able to toggle other users between moderator and member (just go to their profile page and look on the sidebar).\n\nAdmins and moderators can edit and delete other users posts.\n\nThere is a rake task to make an existing user into an admin:\n\n```\n$ rake community_engine:make_admin email=user@foo.com\n```\n\n(Pass in the e-mail of the user you'd like to make an admin)\n\n\n\nLocalization\n------------\n\nLocalization is done via Rails native I18n API. We've added some extensions to String and Symbol to let them respond to the `.l` method. That allows for a look up of the symbol (or a symbolized version of the string).\n\nFor complex strings with substitutions, Symbols respond to the `.l` method with a hash passed as an argument, for example:\n\n```ruby\n:welcome.l :name =\u003e current_user.name\n```\n\nAnd in your language file you'd have:\n\n```yaml\nwelcome: \"Welcome %{name}\"\n```\n\nTo customize the language, or add a new language create a new yaml file in `Rails.root/config/locales`. The name of the file should be `LANG-LOCALE.yml` (`e.g. en-US.yml` or `es-PR`). The language only file (`es.yml`) will support all locales.\n\n\nSpam Control\n------------\n\nSpam sucks. Most likely, you'll need to implement some custom solution to control spam on your site, but CE offers a few tools to help with the basics.\n\nReCaptcha: to allow non-logged-in commenting and use [ReCaptcha](http://recaptcha.net/) to ensure robots aren't submitting comments to your site, just add the following lines to your `application_config.rb`:\n\n```ruby\n:allow_anonymous_commenting =\u003e true,\n:recaptcha_pub_key =\u003e YOUR_PUBLIC_KEY,\n:recaptcha_priv_key =\u003e YOUR_PRIVATE_KEY\n```\n\nYou can also require ReCaptcha on signup (to prevent automated signups) by adding this in your `application_config.rb` (you'll still need to add your ReCaptcha keys):\n\n```ruby\n:require_captcha_on_signup =\u003e true\n```\n\nAkismet: Unfortunately, bots aren't the only ones submitting spam; humans do it too. [Akismet](http://akismet.com/) is a great collaborative spam filter from the makers of Wordpress, and you can use it to check for spam comments by adding one line to your `application_config.rb`:\n\n```ruby\n:akismet_key =\u003e YOUR_KEY\n```\n\n\nAds\n------------\n\nAds are snippets of HTML that will be inserted into your templates. You have to declare where they show up in your view. For example, if you wanted a sidebar ad slot, add ```Ad.display()``` in your application template (or wherever your sidebar is):\n\n```ruby\n#sidebar\n  %h1 This is the sidebar\n\n  =Ad.display(:sidebar, logged_in?)\n```\n\nThen on the admin dashboard, create an ad and use \"sidebar\" as the location to target it to the :sidebar slot. You can create multiple ads for the same slot and they'll rotate according to their weight.\n\n\nIntegrating with Your Application \u0026 Overriding CE\n-------------------------------------------------\n\nTo make a controller from your application use CE's layout and inherit CE's helper methods, make it inherit from `BaseController`. For example:\n\n```ruby\nclass RecipesController \u003c BaseController\n\n\tbefore_action :login_required\n\nend\n```\n\nTo override or modify a controller, helper, or model from CE, you can use the `require_from_ce` helper method. For example, to override a method in CE's `User` model, create `app/models/user.rb`:\n\n```ruby\nclass User \u003c ActiveRecord::Base\n\trequire_from_ce('models/user')\n\n\t#add a new association\n\thas_many :recipes\n\n\t#override an existing method\n\tdef\tdisplay_name\n\t\tlogin.capitalize\n\tend\n\nend\n```\n\n\n\nOther Notes\n-----------\n\nAny views you create in your app directory will override those in CommunityEngine. For example, you could create `Rails.root/app/views/layouts/application.html.haml` and have that include your own stylesheets, etc.\n\n\nContributors - Thanks! :)\n-------------------------\n\n- [Trevor Bullock](http://github.com/t-bullock) - maintenance, Rails 4 compatibility and more\n- Bryan Kearney - localization\n- Alex Nesbitt - forgot password bugs\n- Alejandro Raiczyk - Spanish localization\n- [Fritz Thielemann](http://github.com/fritzek) - German localization, il8n\n- [Oleg Ivanov](http://github.com/morhekil) - `acts_as_taggable_on_steroids`\n- David Fugere - French localization\n- Barry Paul - routes refactoring\n- [Andrei Erdoss](http://github.com/cauta) localization\n- [Errol Siegel](http://github.com/eksatx) simple private messages integration, documentation help\n- Carl Fyffe - documentation, misc.\n- [Juan de Frías](http://github.com/juafrlo) static pages, photo albums, message_controller tests\n- [Joel Nimety](http://github.com/jnimety) authlogic authentication\n- [Stephane Decleire](http://github.com/sdecleire) i18n, fr-FR locale\n- [Polar Humenn](http://github.com/polar) Rails 4 port, and other slight improvements\n\n\n\nBug tracking is via [GitHub Issues](https://github.com/bborn/communityengine/issues)\n","funding_links":[],"categories":["Web Apps, Services \u0026 Interaction","Ruby"],"sub_categories":["Social Network Builders"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbborn%2Fcommunityengine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbborn%2Fcommunityengine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbborn%2Fcommunityengine/lists"}