sfPhpBbConnectPlugin - 1.0.1

View from your main site made with symfony, the latest news from phpBB 3.x forum

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

sfPhpBbConnectPlugin

The sfFormExtraPlugin connects your main site made with symfony, to phpBB 3.x, for to show the latest news from forum

Installation

  • Install the plugin

    $ symfony plugin:install sfPhpBbConnectPlugin
    
  • Open the file /plugins/sfPhpBbConnectPlugin/config/databases.yml and setup your dbname, username and password

  • Enable plugin in your ProjectConfiguration class

    // config/ProjectConfiguration.class.php
    public function setup()
    {
      // possibly add other plugins here...
      $this->enablePlugins(array('sfDoctrinePlugin', 'sfPhpBbConnectPlugin'));
    }
  • Generate the models

     $ symfony doctrine:generate-models
    
  • Make accessible the style sheet

    $ symfony plugin:publish-assets
    
  • Clear the cache

    $ symfony cache:clear
    

How to use the plugin

In the page template where you want to use the helpers, add at the beginning [php] use_helper('PhpBb')

You are ready for use the plugin!

Helper available

  • lastTopics($maxTopics)
    View last topics from the phpBB forum
    $maxTopics is the number of topics to display

  • lastPosts($maxPosts)
    View last posts from the phpBB forum
    $maxPosts is the number of posts to display

  • onlineGuests
    View the number of online guest users right now

Example of the plugin in action

An example of the plugin in action can be viewed at Estatica in the right column of all pages