Sphene Community Tools

Community

Copyright © 2007-2018 by Herbert Poul

You are not logged in.
Login
Register

Change Language:



AddThis Social Bookmark Button

A Django site.

Powered by Sphene Community Tools

Forum Category Types

Board / CategoryTypes

Forum category types can be used to extend the functionality of the Forum.

Example usages would be the LinkList and Blog. Category Types are defined when creating a new 'Category' through django administration - choosing one specific Category Type will change the behavior of this one category.

1. Still "Beta" ;)

Please note, that this API is still in progress and i am not sure how useful it is for anyone.

If you are not sure if (or how) your requirements can be fulfilled by this API, please don't hesitate to head over to the forum and ask.

2. Creating a new Category Type

To create a new category type is very straight forward. In your own django application create a new file called 'categorytypes.py' (in the same directory as models.py, views.py, etc.)

This module will be loaded automatically (If your application is mentioned in INSTALLED_APPS) and all contained category types will be ready to be used.

An example would look like:

from sphene.sphboard.categorytyperegistry import CategoryType

class ExampleCategoryType(CategoryType):
    name = "myapp_example"
    label = "Example"


    def get_threadlist_template(self):
        return 'myapplication/custom_thread_list.html'

Please look into the inline documentation of the class CategoryType to get all method-hooks: http://yourhell.com/wsvn/root/django/communitytools/trunk/sphenecoll/sphene/sphboard/categorytyperegistry.py

If you only want to customize labels you might want to use or extend the class ExtendedCategoryType - see http://yourhell.com/wsvn/root/django/communitytools/trunk/sphenecoll/sphene/sphboard/categorytypes.py.

Last Modified: 2008-04-21 09:04:42 by Herbert Poul - [ Snip Changes ] [ Wiki History ]

1 Comments

Customize List
Anonymous
1530
1
2008-06-12 10:11:27
Anonymous
1 Threads

Please login to create a new thread.



Powered by Sphene Community Tools