Number of posts in topic page (default 10)
Number of topics in forum page (default 10)
Freeze first post in topics (show on every page)
Default title for forum index page
Users will be automatically subscribed to topic when create post in it.
Prefix for emoticons images set, related to STATIC_URL (default ‘pybb/emoticons’)
Dict for emoticon replacement. Key - text to be replaced, value - image name.
default:
{
'>_<': 'angry.png',
':.(': 'cry.png',
'o_O': 'eyes.png',
'[]_[]': 'geek.png',
'8)': 'glasses.png',
':D': 'lol.png',
':(': 'sad.png',
':O': 'shok.png',
'-_-': 'shy.png',
':)': 'smile.png',
':P': 'tongue.png',
';)': 'wink.png'
}
e.g. text ”;)” in post will be replaced to:
<img src="{{ STATIC_URL }}{{ PYBB_SMILES_PREFIX }}wink.png">
with default setting.
Next settings used only if you don’t customize user profile model, user profile creation form or templates.
Avatar width and height respectively to use in templates (avatars scaled using sorl.thumbnail) (default 80 and 80)
Maximum avatar size, in bytes (default is 1024*50 wich is 50KB)
Default time zone for forum as integer. E.g. setting to 1 means GMT+1 zone. (default +3 Moscow)
Limit of sybmols in user signature
Limit of lines in user signature
Will be used if user doesn’t upload avatar
You can use buildin templates with custom basic template and custom images for save, new topic and submit buttons.
Buildin templates will inherit this template (default “base.html”)
Dict with images for save, new topic and submit buttons. Empty by default.
Example of usage:
PYBB_BUTTONS = {
'new_topic': 'images/new_topic.png',
'submit': 'images/submit.png',
'save': 'images/save.png'
}
Markup engine used in forum (default ‘bbcode’) See PYBB_MARKUP_ENGINES below
Dict with avaiable markup engines. One of them should be selected with PYBB_DEFAULT_MARKUP
Markup engine it’s a function, that accept post.body as first argument, and return output as rendered html. Markup engine should take care of replacing smiles in body with related emoticons.
by default PyBBM support bbcode and markdown markup:
{
'bbcode': lambda str: urlize(smile_it(render_bbcode(str, exclude_tags=['size', 'center']))),
'markdown': lambda str: urlize(smile_it(Markdown(safe_mode='escape').convert(str)))
})
Please note, that size and center tags are disabled by default, enable them if you have right markup for them.
Dict with quoting function for every markup engines in PYBB_MARKUP_ENGINES
default is:
{
'bbcode': lambda text, username="": '[quote="%s"]%s[/quote]\n' % (username, text),
'markdown': lambda text, username="": '>'+text.replace('\n','\n>').replace('\r','\n>') + '\n'
}
Extra form validation for body of post.
Called as:
BODY_CLEANER(user, body)
at clean_body method of PostForm Here you can do various checks based on user stats. E.g. allow moderators to post links and don’t allow others. By raising:
forms.ValidationError('Here Error Message')
You can show user what is going wrong during validation.
Allow post for not-authenticated users. False by default. See anonymous posting for details.
Username for anonymous posts. If no user with this username exists it will be created on first anonymous post.
Filter for messages that require pre-moderation. See Pre-moderation for details.
Enable attahcments for all users. False by default.
Maximum attachment limit (in bytes), 1024*1024 (1MB) by default.
Directory in your media path for uploaded attacments. pybb_upload/attachments by default.
Include {{ STATIC_URL }}pybb.css file for every pybbm page, this is useful when you have special css only for forum pages (and which should not be included in other pages).
Be aware than this file in current project tree are legacy and can provide strange markup with current templates.