MARKUP, 'ENABLE_MATHJAX', description=_('Mathjax support (rendering of LaTeX)'), help_text=_('If you enable this feature, ' '<a href="%(url)s">mathjax</a> must be ' 'installed on your server in its own directory.') % { 'url': const.DEPENDENCY_URLS['mathjax'], }, default=False)) settings.register( StringValue(MARKUP, 'MATHJAX_BASE_URL', description=_('Base url of MathJax deployment'), help_text=_('Note - <strong>MathJax is not included with ' 'askbot</strong> - you should deploy it yourself, ' 'preferably at a separate domain and enter url ' 'pointing to the "mathjax" directory ' '(for example: http://mysite.com/mathjax)'), default='')) settings.register( BooleanValue(MARKUP, 'ENABLE_AUTO_LINKING', description=_('Enable autolinking with specific patterns'), help_text=_('If you enable this feature, ' 'the application will be able to ' 'detect patterns and auto link to URLs'), default=False)) settings.register(
from askbot.deps.livesettings import ConfigurationGroup, BooleanValue, \ StringValue SOCIAL_SHARING = ConfigurationGroup('SOCIAL_SHARING', _('Content sharing'), super_group=EXTERNAL_SERVICES) settings.register( BooleanValue(SOCIAL_SHARING, 'RSS_ENABLED', default=False, description=_('Check to enable RSS feeds'))) settings.register( StringValue(SOCIAL_SHARING, 'SHARING_SUFFIX_TEXT', default='', description=_('Hashtag or suffix to sharing messages'))) settings.register( BooleanValue( SOCIAL_SHARING, 'ENABLE_SHARING_TWITTER', default=False, description=_('Check to enable sharing of questions on Twitter'), help_text=_('Important - to actually start sharing on twitter, ' 'it is required to set up Twitter consumer key and secret ' 'in the "keys to external services" section.'))) settings.register( BooleanValue( SOCIAL_SHARING,
'ACCESS_CONTROL', _('Access control settings'), super_group=LOGIN_USERS_COMMUNICATION) settings.register( BooleanValue( ACCESS_CONTROL, 'READ_ONLY_MODE_ENABLED', default=False, description=_('Make site read-only'), )) settings.register( StringValue(ACCESS_CONTROL, 'READ_ONLY_MESSAGE', default=_( 'The site is temporarily read-only. ' 'Only viewing of the content is possible at the moment.'))) settings.register( livesettings.BooleanValue( ACCESS_CONTROL, 'ASKBOT_CLOSED_FORUM_MODE', default=False, description=_('Allow only registered user to access the forum'), )) EMAIL_VALIDATION_CASE_CHOICES = ( ('nothing', _('nothing - not required')), ('see-content', _('access to content')), #'post-content', _('posting content'),
MODERATION = ConfigurationGroup('MODERATION', _('Content moderation'), super_group=DATA_AND_FORMATTING) CONTENT_MODERATION_MODE_CHOICES = ( ('flags', _('audit flagged posts')), ('audit', _('audit flagged posts and watched users')), ('premoderation', _('pre-moderate watched users and audit flagged posts')), ) settings.register( StringValue( MODERATION, 'CONTENT_MODERATION_MODE', choices=CONTENT_MODERATION_MODE_CHOICES, default='flags', description=_('Content moderation method'), help_text=_( "Audit is made after the posts are published, pre-moderation " "prevents publishing before moderator's decision."))) settings.register( LongStringValue(MODERATION, 'FORBIDDEN_PHRASES', default='', description=_('Reject all posts with these phrases'), help_text=_( 'Enter one phrase per line (case-insensitive). ' 'Posts with these phrases will be rejected ' 'without moderation.')))
'SKIN_COUNTER_SETTINGS', _('Skin: view, vote and answer counters')) settings.register( IntegerValue( SKIN_COUNTER_SETTINGS, 'VOTE_COUNTER_EXPECTED_MAXIMUM', default=3, description=_('Vote counter value to give "full color"'), hidden=True, )) settings.register( StringValue( SKIN_COUNTER_SETTINGS, 'COLORS_VOTE_COUNTER_EMPTY_BG', default='white', description=_('Background color for votes = 0'), help_text=_('HTML color name or hex value'), hidden=True, )) settings.register( StringValue( SKIN_COUNTER_SETTINGS, 'COLORS_VOTE_COUNTER_EMPTY_FG', default='gray', description=_('Foreground color for votes = 0'), help_text=_('HTML color name or hex value'), hidden=True, )) settings.register(