Ejemplo n.º 1
0
class IHotThreads(IPortletDataProvider):
    """A portlet that lists hot threads."""

    header = schema.TextLine(
        title=_(u'Header'),
        description=_(u'The header for the portlet. Leave empty for none.'),
        required=False,
    )

    forum = schema.TextLine(
        title=_(u'Forum'),
        description=_(
            u'Specify the forum you wish to obtain the hot threads from.'),
        required=True,
    )

    max_results = schema.Int(
        title=_(u'Maximum results'),
        description=_(u'The maximum results number.'),
        required=True,
        default=5,
    )

    pretty_date = schema.Bool(
        title=_(u'Pretty dates'),
        description=_(u'Show dates in a pretty format (ie. "4 hours ago").'),
        default=True,
        required=False,
    )
Ejemplo n.º 2
0
class IDisqusSettings(Interface):
    """ Disqus service need settings. """

    activated = schema.Bool(
        title=i18n.activated,
        description=_(u''),
    )

    developer_mode = schema.Bool(
        title=i18n.developer_mode,
        description=_(u'Mark this box to use Disqus in developer mode'),
    )

    forum_short_name = schema.ASCIILine(
        title=i18n.forum_short_name,
        description=_(u''),
    )

    access_token = schema.TextLine(
        title=_(u'Access Token'),
        description=_(
            u'Access token to retrieve information from the Disqus forum.'),
        required=False,
    )

    app_public_key = schema.TextLine(
        title=_(u'Application public key'),
        description=_(u'public key'),
        required=False,
    )

    app_secret_key = schema.TextLine(
        title=_(u'Application secret key'),
        description=_(u'secret key'),
        required=False,
    )
Ejemplo n.º 3
0
 def title(self):
     """Return title of the portlet in the "manage portlets" screen."""
     return _(u'Hot Threads')
Ejemplo n.º 4
0
 def title(self):
     """ This property is used to give the title of the portlet in the
     "manage portlets" screen.
     """
     return _(u"Hot Threads")
Ejemplo n.º 5
0
 def title(self):
     """Return title of the portlet in the "manage portlets" screen."""
     return _(u'Popular Threads')