from askbot.conf.settings_wrapper import settings from askbot.deps.livesettings import ConfigurationGroup from askbot.deps.livesettings import values from askbot.conf.super_groups import CONTENT_AND_UI SIDEBAR_QUESTION = ConfigurationGroup( # TODO: 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(
Sidebar settings """ from askbot.conf.settings_wrapper import settings from askbot.deps.livesettings import ConfigurationGroup from askbot.deps.livesettings import values from django.utils.translation import ugettext_lazy as _ 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 above only to anonymous users'), default=False))
description = _('Customize HTML <HEAD>') ) ) settings.register( values.LongStringValue( GENERAL_SKIN_SETTINGS, 'CUSTOM_HTML_HEAD', default = '', description = _('Custom portion of the HTML <HEAD>'), help_text = _( '<strong>To use this option</strong>, ' 'check "Customize HTML <HEAD>" ' 'above. Contents of this box will be inserted ' 'into the <HEAD> portion of the HTML ' 'output, where elements such as <script>, ' '<link>, <meta> may be added. ' 'Please, keep in mind that adding external ' 'javascript to the <HEAD> is not recommended ' 'because it slows loading of the pages. ' 'Instead, it will be more efficient to place ' 'links to the javascript files into the footer. ' '<strong>Note:</strong> if you do use this setting, ' 'please test the site with the W3C HTML validator service.' ) ) ) settings.register( values.LongStringValue( GENERAL_SKIN_SETTINGS,
description=_('Post Your Answer'), help_text=_('Used on a button'))) settings.register( values.StringValue(WORDS, 'WORDS_ANSWER_YOUR_OWN_QUESTION', default=_('Answer Your Own Question'), description=_('Answer Your Own Question'), help_text=_('Used on a button'))) 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'))) 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.' ), description=_('Instruction to post anonymously'), help_text=_('HTML is allowed')))
from askbot.deps.livesettings import values from django.utils.translation import ugettext as _ SIDEBAR_MAIN = ConfigurationGroup( 'SIDEBAR_MAIN', _('Sidebar widget settings - main page'), ) settings.register( values.LongStringValue( SIDEBAR_MAIN, 'SIDEBAR_MAIN_HEADER', description = _('Custom sidebar header'), default = '', 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_SHOW_AVATARS', description = _('Show avatar block in sidebar'), help_text = _( 'Uncheck this if you want to hide the avatar '
Sidebar settings """ from askbot.conf.settings_wrapper import settings from askbot.deps.livesettings import ConfigurationGroup from askbot.deps.livesettings import values from django.utils.translation import ugettext_lazy as _ from askbot.conf.super_groups import CONTENT_AND_UI 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.')))
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.' ),
values.LongStringValue(EMBEDDABLE_WIDGETS, 'QUESTIONS_WIDGET_CSS', default=""" body { overflow: hidden; } #container { width: 200px; height: 350px; } ul { list-style: none; padding: 5px; margin: 5px; } li { border-bottom: #CCC 1px solid; padding-bottom: 5px; padding-top: 5px; } li:last-child { border: none; } a { text-decoration: none; color: #464646; font-family: 'Yanone Kaffeesatz', sans-serif; font-size: 15px; } """, descripton=_('CSS for the questions widget')))