sfGuestBookPlugin - 0.2.0

Simple Symfony GuestBook plugin

You are currently browsing
the website for symfony 1

Visit the Symfony2 website


« Back to the Plugins Home

Signin


Forgot your password?
Create an account

Tools

Stats

advanced search
Information Readme Releases Changelog Contribute
Show source

sfGuestBookPlugin

The sfGuestBookPlugin is simple GuestBook plugin for symfony.

This plugin uses jQuery & jQueryUI with Theme roller. Min jQuery version is 1.4.3 jQuery UI lib & theme (css with images) must be included into main layout

Installation

  • Install the plugin

    symfony plugin:install --stability="alpha" sfGuestBookPlugin
    
  • Clear the cache

    symfony cache:clear
    
  • Publish the plugin's assets

    symfony plugin:publish-assets
    
  • Build DB

    symfony doctrine:build
    
  • Activate the sfGuestBook module in the application's settings.yml

    enabled_modules:        [default, sfGuestBook]
    

Configuration

  • The plugin's app.yml file looks like the following:

    all:
      sf_guest_book_plugin:
        #if will be set to false messages will be shown after post
        #if true admin have to approve posts before show them
        need_approve_before_show: false
    
        #creadentials to approve messages
        approve_credentials: admin
    
        #creadentials to remove messages
        remove_credentials: admin
    
        # max posts on page
        max_on_page: 20
    
        # ui-state-{value} this state class will be added to unapproved messages
        unapproved_state_class: default
    
  • To give ability to remove posts from guest book you should setup credentials into app.yml and give same creadentials for user

    all:
      sf_guest_book_plugin:
        #creadentials to remove messages
        remove_credentials: admin
    
  • To give ability to approve posts (messages wouldn't be visible untill they will be approved). You should setup credentials into app.yml and give same creadentials for user

    all:
      sf_guest_book_plugin:
        #if will be set to false messages will be shown after post
        #if true admin have to approve posts before people will see them
        need_approve_before_show: true
    
        #creadentials to approve messages
        approve_credentials: admin
    

Note that need_approve_before_show must be set to true, otherwise all posts will be visible to all by default

  • To setup amount of posts per page use this var:

    all:
      sf_guest_book_plugin:
    
      # max posts on page
      max_on_page: 20
    
  • To change class name of unapproved posts (only admin will see them), try this:

    all:
      sf_guest_book_plugin:
    
      # ui-state-{value} this state class will be added to unapproved messages
      unapproved_state_class: default
    

Forms

  • sfGuestBookPostForm.class: A form to create new message into sfGuestBook

Please mail me all bugs and improvements for this plugin.