Skip to main content

django database models of phpBB3

Project description

Django-phpBB3

Django-phpBB3 provides the database models of a existing phpBB3 installation for easy migration into a other forum software. It’s not a phpBB clone or a forum!

Warning: In the current state, it’s not guaranteed that changes trough the django admin will work with phpBB3! So in the current state, access ‘read-only’ to the data ;)

Patches are welcome! Please send pull requests.

example projects

We add two example projects:

`django_phpBB3_project`_

minimal project without extra depencies

`phpBB2DjangoBB_project`_

DjangoBB example project which include the phpBB2DjangoBB migration command

test django-phpBB3

We added a test project for easy start in: /django_phpBB3_project/

Create a local_settings.py in /django_phpBB3_project/ At least you must setup DATABASES, e.g:

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
        'NAME': 'phpbb3', # Or path to database file if using sqlite3.
        'USER': 'phpbb3', # Not used with sqlite3.
        'PASSWORD': 'foo bar', # Not used with sqlite3.
        'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
        'PORT': '', # Set to empty string for default. Not used with sqlite3.
    }
}

optional settings, that you can change in your local_settings.py are:

# The prefix of the phpBB3 installation - default: u"phpbb3_"
PHPBB_TABLE_PREFIX = u"phpbb3_"

You must create the django tables with: ./manage.py syncdb and create a superuser.

You can startup a test server with, e.g:

./manage.py runserver --traceback --insecure

migrate a phpBB3 installation to DjangoBB

not complete implemented, yet!

The migration from phpBB3 to DjangoBB is implement as a migration command here: /django_phpBB3/management/commands/phpbb2djangobb.py

To run the migration you can use the minimal phpBB2DjangoBB example project example. This project includes the DjangoBB forum app and django-phpBB3 app. Before start, you must install the dependencies!

You must add to a local_settings.py into /phpBB2DjangoBB_project/ this settings:

# filesystem path to the /files/ sub directory of the phpBB installation:
PHPBB_ATTACHMENT_PATH = "/path/to/phpBB/files/"

(You must also point the attachment directory from DjangoBB to a existing filesystem path.)

Run the migration with:

cd phpBB2DjangoBB_project
phpBB2DjangoBB_project$ ./manage.py phpbb2djangobb

options

cleanup_users

Add --cleanup_users=x to setup which users are migrate, where x is a number:

0

all users

1

users with email addresses (skip bots)

2

users with email and has a ‘lastvisit’ date (default)

3

email + lastvisit and has created at least one post

migration notes

limitations

Things that would not be transfered, yet:

  • Forum moderators

  • Category groups

  • sort of in Category / Forum would not be converted to position number

  • ForumWatch / TopicWatch can’t be converted because the models are unsupported

Handling missing features in DjangoBB:

  • We transfer phpBB Users who are in the user group ADMINISTRATORS or GLOBAL_MODERATORS to all forum moderators.

  • global posts and announcement converted to normal sticky posts

  • sub forums would be flatten

  • ghost moved posts are ignored (only the moved post would be created)

TODOs:

  • convert subscriptions

open questions

  • Are the phpBB times in phpbb_posts in UTC oder in local time from user?

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-phpBB3-0.0.1.0723.tar.gz (32.3 kB view details)

Uploaded Source

File details

Details for the file django-phpBB3-0.0.1.0723.tar.gz.

File metadata

File hashes

Hashes for django-phpBB3-0.0.1.0723.tar.gz
Algorithm Hash digest
SHA256 c1b431a0814c966e0515c35aa5c6631086bad2ae67fcd12b6f552567a323771c
MD5 54fc937db31d12f7136f97079c571df9
BLAKE2b-256 940121b7ff1944265a294b043985578a0b0e9ba06fe727dc3dbc1136c5c3e2b0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page