from askbot.conf.settings_wrapper import settings from askbot.conf.super_groups import CONTENT_AND_UI from livesettings import ConfigurationGroup from livesettings import values SIDEBAR_QUESTION = ConfigurationGroup( # shitty name - why sidebar? 'SIDEBAR_QUESTION', _('Question page banners and sidebar'), super_group=CONTENT_AND_UI) settings.register( values.LongStringValue( SIDEBAR_QUESTION, 'QUESTION_PAGE_TOP_BANNER', description=_('Top banner'), default='', localized=True, help_text=_('When using this option, please ' 'use the HTML validation service to make sure that ' 'your input is valid and works well in all browsers.'))) settings.register( values.BooleanValue( SIDEBAR_QUESTION, 'QUESTION_PAGE_TOP_BANNER_ANON_ONLY', default=False, description=_('Show above only to anonymous users'), )) settings.register( values.LongStringValue(
from askbot.conf.settings_wrapper import settings from askbot.conf.super_groups import LOGIN_USERS_COMMUNICATION from livesettings import values as livesettings from django.conf import settings as django_settings from askbot.skins import utils as skin_utils from django.utils.translation import ugettext_lazy as _ from askbot import const import re USER_SETTINGS = livesettings.ConfigurationGroup( 'USER_SETTINGS', _('User settings'), super_group=LOGIN_USERS_COMMUNICATION) settings.register( livesettings.LongStringValue( USER_SETTINGS, 'NEW_USER_GREETING', default=_('Welcome to our community!'), description=_('On-screen greeting shown to the new users'))) settings.register( livesettings.BooleanValue(USER_SETTINGS, 'EDITABLE_SCREEN_NAME', default=True, description=_('Allow editing user screen name'))) settings.register( livesettings.BooleanValue( USER_SETTINGS, 'SHOW_ADMINS_PRIVATE_USER_DATA', default=False, description=_('Show email addresses to moderators')))
""" from django.utils.translation import ugettext_lazy as _ from askbot.conf.settings_wrapper import settings from livesettings.values import ConfigurationGroup from livesettings import values from askbot.conf.super_groups import CONTENT_AND_UI SIDEBAR_PROFILE = ConfigurationGroup('SIDEBAR_PROFILE', _('User profile sidebar'), super_group=CONTENT_AND_UI) settings.register( values.LongStringValue( SIDEBAR_PROFILE, 'SIDEBAR_PROFILE', description=_('Custom sidebar'), default='', localized=True, help_text=_( 'Use this area to enter content at the TOP of the sidebar in HTML ' 'format. When using this option (as well as the sidebar footer), ' 'please use the HTML validation service to make sure that your ' 'input is valid and works well in all browsers.'))) settings.register( values.BooleanValue( SIDEBAR_PROFILE, 'SIDEBAR_PROFILE_ANON_ONLY', description=_('Show the text entered above only to anonymous users'), default=False))
LEADING_SIDEBAR = ConfigurationGroup( 'LEADING_SIDEBAR', _('Common left sidebar'), super_group=CONTENT_AND_UI ) settings.register( values.BooleanValue( LEADING_SIDEBAR, 'ENABLE_LEADING_SIDEBAR', description=_('Enable left sidebar'), default=False, ) ) settings.register( values.LongStringValue( LEADING_SIDEBAR, 'LEADING_SIDEBAR', description=_('HTML for the left sidebar'), default='', help_text=_( 'Use this area to enter content at the LEFT sidebar ' 'in HTML format. When using this option, please ' 'use the HTML validation service to make sure that ' 'your input is valid and works well in all browsers.' ) ) )
)) settings.register( livesettings.BooleanValue( ACCESS_CONTROL, 'NEW_REGISTRATIONS_DISABLED', default=False, description=_('Disable registration of new users'), )) settings.register( livesettings.LongStringValue( ACCESS_CONTROL, 'NEW_REGISTRATIONS_DISABLED_MESSAGE', default=_( '<p>New users cannot be registered at this time. Please sign ' 'in if you already have an account.</p>'), description=_( 'Message explaining that user registrations are disabled'), help_text=_('HTML is allowed'))) EMAIL_VALIDATION_CASE_CHOICES = ( ('nothing', _('nothing - not required')), ('see-content', _('account registration')), # ('post-content', _('posting content')), ) settings.register( livesettings.StringValue(ACCESS_CONTROL, 'REQUIRE_VALID_EMAIL_FOR', default='nothing',
FEEDBACK_MODE_CHOICES = (('open', _('Anyone')), ('auth-only', _('Only authenticated users')), ('disabled', _('Nobody, disable feedback form'))) settings.register( livesettings.StringValue(FEEDBACK, 'FEEDBACK_MODE', default='open', choices=FEEDBACK_MODE_CHOICES, description=_('Who can send feedback'))) settings.register( livesettings.StringValue( FEEDBACK, 'FEEDBACK_SITE_URL', description=_('Feedback site URL'), help_text=_('If left empty, a simple internal feedback form ' 'will be used instead'))) settings.register( livesettings.LongStringValue( FEEDBACK, 'FEEDBACK_PAGE_MESSAGE', localized=True, description=_('Message on the feedback page'), default=_('**Dear {{ USER_NAME }}**, we look forward to hearing your ' 'feedback. Please type and send us your message below.'), help_text=_( 'Save, then <a href="http://validator.w3.org/">use HTML validator</a> ' 'on the "terms" page to check your input.')))
from askbot.conf.settings_wrapper import settings from livesettings.values import ConfigurationGroup from livesettings import values from askbot.conf.super_groups import CONTENT_AND_UI SIDEBAR_MAIN = ConfigurationGroup('SIDEBAR_MAIN', _('Main page sidebar'), super_group=CONTENT_AND_UI) settings.register( values.LongStringValue( SIDEBAR_MAIN, 'SIDEBAR_MAIN_HEADER', description=_('Custom sidebar header'), default='', localized=True, help_text=_( 'Use this area to enter content at the TOP of the sidebar in HTML ' 'format. When using this option (as well as the sidebar footer), ' 'please use the HTML validation service to make sure that your ' 'input is valid and works well in all browsers.'))) settings.register( values.BooleanValue( SIDEBAR_MAIN, 'SIDEBAR_MAIN_HEADER_ANON_ONLY', description=_('Show the text entered above only to anonymous users'), default=False, )) settings.register(
settings.register( livesettings.StringValue( EMAIL_TEXT, 'EMAIL_TEXT_SHORT_WELCOME', description=_('Short welcome message, for subject line'), default=_('Welcome to {{ SITE_NAME }}!'), help_text=_('<b>NOTE: All email text settings allow placeholders: ' '{{ USER_NAME }}, {{ SITE_NAME }} and {{ SITE_LINK }}.</b>') ) ) settings.register( livesettings.LongStringValue( EMAIL_TEXT, 'EMAIL_TEXT_LONG_WELCOME', description=_('Longer welcome message, for email body'), default=_('<p>Please visit {{ SITE_NAME }} at {{ SITE_LINK }}, we ' 'look forward to your posts.</p>'), ) ) settings.register( livesettings.LongStringValue( EMAIL_TEXT, 'EMAIL_TEXT_FOOTER', description=_('Email footer'), default=_('<p>Sincerely,<br>{{ SITE_NAME }} Administrator</p>') ) ) settings.register(
WORDS, 'WORDS_ANSWER_YOUR_OWN_QUESTION', default=_('Answer Your Own Question'), description=_('Answer Your Own Question'), help_text=_('Used on a button'), localized=True ) ) settings.register( values.LongStringValue( WORDS, 'WORDS_INSTRUCTION_TO_ANSWER_OWN_QUESTION', default=_( '<span class="big strong">You are welcome to answer your own question</span>, ' 'but please make sure to give an <strong>answer</strong>. ' 'Remember that you can always <strong>revise your original question</strong>.' ), description=_('Instruction to answer own questions'), help_text=_('HTML is allowed'), localized=True ) ) settings.register( values.LongStringValue( WORDS, 'WORDS_INSTRUCTION_TO_POST_ANONYMOUSLY', default=_( '<span class="strong big">Please start posting anonymously</span> - ' 'your entry will be published after you log in or create a new account.' ),