GithubHelp home page GithubHelp logo

romainlegouverneur / templateviergesymfony2 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from djepo/templateviergesymfony2

1.0 2.0 0.0 315 KB

Blank symfony 2 template including FOSUser and FOSFaceBook Bundles

Home Page: http://djepo.craym.eu/article/33

templateviergesymfony2's Introduction

Empty Symfony 2 project including FOSUserBundle and FOSFaceBookBundle

Introduction

This project is a good start to create a website, because it contains FOSUser and FOSFacebook Bundles. Those Bundles are working together to manage users on a website.

Users can register and login traditionnaly with FOSUserBundle, and also Registering and login with Facebook. If a Facebook User doesn't exists in database, it is added. If a Facebook user's email exists in database (case of an manually previous regitered user), facebook informations are added.

This projects includes CSS and javascripts from HTMLKickStart to have a nice render at start. You are free to drop it if you don't use it. You'll have to remove css and javascript links in app/Resources/views/base.html.twig if you remove it.

Prerequisites

A Facebook Application properly configured.

How to Create A facebook application (Quick mode !)

  1. Navigate to: https://developers.facebook.com/apps.
  2. Click on "Create an application" on the top right side.
  3. Enter a name for your application.
  4. Navigate to Application parameters, go in "essentials" (the first entry).
  5. Click on "Website with Facebook Login".
  6. Enter your Website's URL.
  7. Save Modifications.

Installation

Download and install the package

  • Download zip file from gitHub here
  • Unzip it where you want
  • Install Vendors:
php bin/vendors install

update your configuration files:

  • app/config/parameters.ini to match your own database (or eventually you can run the symfony's config.php script)
  • app/config/facebookParameters.ini to match with your facebook application
; Facebook parameters for FOSFacebookBundle
[parameters]
    ;Enter your facebook App Id here
    facebookAppID =     "263778820386586"

    ;Enter your facebook App secret here
    facebookAppSecret=  "2f1efc68065669b14fedd5676d9e1672"

    ;Enter your facebook App url here
    facebookAppUrl=     "http://apps.facebook.com/263778820386586/"

    ;Enter your facebook server url here, as configured in your facebook app    
    facebookServerUrl=  "http://localhost/TemplateViergeSymfony2/"

    ;Enter locale here (for language on the login button). Enter for exemple en_US for english, fr_FR for french etc...
    ;See https://www.facebook.com/translations/FacebookLocales.xml for the whole list of locales
    facebookLocale=    "en_US"

Create and/or update your database

  • create your database (if not created yet):
php app/console doctrine:database:create
  • Update database:
php app/console doctrine:schema:update --force

Modify your website's parameters

Modify app/config/websiteParameters.ini and update parameters to match with your website

; Website parameters
[parameters]

    websiteName =       "Your Title Here"

    websiteSlogan =     "Your Slogan Here"

    websiteBirthYear=   "2012"

    websiteUseFacebookLogin=    true

Ready !

You can now use this project as a normal symfony 2 project.

templateviergesymfony2's People

Contributors

djepo avatar

Stargazers

Romain Legouverneur avatar

Watchers

Romain Legouverneur avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.