My favorites | Sign in
Project Home Downloads Wiki Issues Source
Project Information
Members
Featured
Downloads
Links

This project allows a fluxbb/punbb and django applications working together. Features are provided in 3 applications:

  • punbb.authent
  • punbb.forum
  • punbb.avatar

The punbb.authent application is a dependencie for the 2 others applications.

Features

punbb.authent

It provides

  • the punbb's user and group models
  • a backend for authentication based on punbb users
  • a middleware providing a kind of sso with a punbb application
  • a command to import punbb users and groups into django.auth models

punbb.forum

It provides

  • the others punbb's models
  • a command to import punbb forums into tribes (pinax) models

punbb.avatar

It is based on the gravatar (pinax) application

  • both punbb and gravatar avatars management

Usage

  • Add the PunBBSessionMiddleware middleware after session and authentication middlewares:
  • MIDDLEWARE_CLASSES = (
        ...,
        'django.contrib.sessions.middleware.SessionMiddleware',
        'django.contrib.auth.middleware.AuthenticationMiddleware',
        'punbb.authent.middleware.PunBBSessionMiddleware',
        ...,
    )
  • Add this in the settings.py file:
  • AUTHENTICATION_BACKENDS = (
     'punbb.authent.authentication.PunBBShaBackend',
    )
    COOKIE_SEED = 'SAME VALUE AS $COOKIE_SEED IN CONFIG.PHP'
    PUNBB_COOKIE_NAME = 'punbb_cookie'
    EXTERN_USER_IS_STAFF = False         # if True, PunBB users are django staff users
    PUNBB_TABLES_PREFIX = 'punbb_'       # you should edit this

Commands

usage: python manage.py [command]

import_punbb_users

imports punbb users/groups into django authentication tables.

import_punbb2tribes

This command should work in the context of django project that support forums features, like pinax.

It imports forums, categories, posts into django (pinax tribes) tables. The mapping is as follows:

punbb pinax tribes
category tribe
forum tag
topics topic
posts threadedcomment

Attention: the import_punbb_users command should be runned before.

SSO use case

  • the user loggs in with a username/password from punBB database
  • the user opens a session from django: a punBB session is also opened.
  • the user opens a session from punBB: a django session is also opened.

example of a sso integration with 2 php applications:

  • dokuwiki (support authentication based on a punBB db)
  • punBB forum (user/group data)
  • django site (with django-punbb inside)
Powered by Google Project Hosting