芝麻web文件管理V1.00
编辑当前文件:/home/mgatv524/pmj.mgaplay.com.br/modules/twitter-form-edit.twig
{# /** * Copyright (C) 2020 Xibo Signage Ltd * * Xibo - Digital Signage - http://www.xibo.org.uk * * This file is part of Xibo. * * Xibo is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * any later version. * * Xibo is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with Xibo. If not, see
. */ #} {% extends "form-base.twig" %} {% import "forms.twig" as forms %} {% block formTitle %} {% trans "Edit Twitter" %} {% endblock %} {% block extra %}{{ module.templatesAvailable()|json_encode|raw }}{% endblock %} {% block formHtml %}
{% trans "General" %}
{% trans "Configuration" %}
{% trans "Appearance" %}
{% trans "Templates" %}
{% trans "Preset" %}
{% trans "Main" %}
{% trans "Optional Stylesheet" %}
{% trans "No Tweets Message" %}
{% trans "Optional JavaScript" %}
{% trans "Caching" %}
{% set title %}{% trans "Name" %}{% endset %} {% set helpText %}{% trans "An optional name for this widget" %}{% endset %} {{ forms.input("name", title, module.getOption("name"), helpText) }} {% set title %}{% trans "Set a duration?" %}{% endset %} {% set helpText %}{% trans "Select to provide a specific duration for this Widget" %}{% endset %} {{ forms.checkbox("useDuration", title, module.getUseDuration(), helpText) }} {% set title %}{% trans "Duration" %}{% endset %} {% set helpText %}{% trans "The duration in seconds this should be displayed" %}{% endset %} {{ forms.number("duration", title, module.getDuration(), helpText, "duration-fields", "required") }} {% set title %}{% trans "Duration is per item" %}{% endset %} {% set helpText %}{% trans "The duration specified is per item otherwise it is per feed." %}{% endset %} {{ forms.checkbox("durationIsPerItem", title, module.getOption("durationIsPerItem"), helpText) }} {% set title %}{% trans "Enable Stats Collection?" %}{% endset %} {% set helpText %}{% trans "Enable the collection of Proof of Play statistics for this Widget. Ensure that ‘Enable Stats Collection’ is set to ‘On’ in the Display Settings." %}{% endset %} {% set offOption %}{% trans "Off" %}{% endset %} {% set onOption %}{% trans "On" %}{% endset %} {% set inheritOption %}{% trans "Inherit" %}{% endset %} {% set options = [ { id: "Off", value: offOption }, { id: "On", value: onOption }, { id: "Inherit", value: inheritOption } ] %} {{ forms.dropdown("enableStat", "single", title, module.getOption("enableStat", theme.getSetting("WIDGET_STATS_ENABLED_DEFAULT")), options, "id", "value", helpText) }}
{% set title %}{% trans "Search Term" %}{% endset %} {% set helpText %}{% trans "Search term. You can test your search term in the twitter.com search box first." %}{% endset %} {{ forms.input("searchTerm", title, module.getOption("searchTerm"), helpText, "", "required") }} {% set title %}{% trans "Language" %}{% endset %} {% set helpText %}{% trans "Language in which tweets should be returned" %}{% endset %} {{ forms.input("language", title, module.getOption("language"), helpText) }} {% set title %}{% trans "Type" %}{% endset %} {% set helpText %}{% trans "Recent shows only the most recent tweets, Popular the most popular and Mixed includes both popular and recent results." %}{% endset %} {% set mixed %}{% trans "Mixed" %}{% endset %} {% set recent %}{% trans "Recent" %}{% endset %} {% set popular %}{% trans "Popular" %}{% endset %} {% set options = [ { typeid: 1, type: mixed }, { typeid: 2, type: recent }, { typeid: 3, type: popular } ] %} {{ forms.dropdown("resultType", "single", title, module.getOption("resultType"), options, "typeid", "type", helpText,"", "required") }} {% set title %}{% trans "Distance" %}{% endset %} {% set helpText %}{% trans "Distance in miles that the tweets should be returned from. Set to 0 for no restrictions." %}{% endset %} {{ forms.number("tweetDistance", title, module.getOption("tweetDistance"), helpText) }} {% set title %}{% trans "Remove Mentions?" %}{% endset %} {% set helpText %}{% trans "Should mentions (@someone) be removed from the Tweet Text?" %}{% endset %} {{ forms.checkbox("removeMentions", title, module.GetOption("removeMentions", 0), helpText) }} {% set title %}{% trans "Remove Hashtags?" %}{% endset %} {% set helpText %}{% trans "Should Hashtags (#something) be removed from the Tweet Text?" %}{% endset %} {{ forms.checkbox("removeHashtags", title, module.GetOption("removeHashtags", 0), helpText) }} {% set title %}{% trans "Remove URLs?" %}{% endset %} {% set helpText %}{% trans "Should URLs be removed from the Tweet Text? Most URLs do not compliment digital signage." %}{% endset %} {{ forms.checkbox("removeUrls", title, module.GetOption("removeUrls", 1), helpText) }}
{% set title %}{% trans "Background Colour" %}{% endset %} {% set helpText %}{% trans "The selected effect works best with a background colour. Optionally add one here." %}{% endset %} {{ forms.colorPicker("backgroundColor", title, module.getOption("backgroundColor"), helpText, "background-color-group") }} {% set title %}{% trans "Count" %}{% endset %} {% set helpText %}{% trans "The number of Tweets to return (default = 15)." %}{% endset %} {{ forms.number("tweetCount", title, module.getOption("tweetCount"), helpText) }} {% set title %}{% trans "Tweets Per Page" %}{% endset %} {% set helpText %}{% trans "The number of Tweets to show per page (default = 5)." %}{% endset %} {{ forms.number("itemsPerPage", title, module.getOption("itemsPerPage"), helpText) }} {% set title %}{% trans "Date Format" %}
{% endset %} {% set helpText %}{% trans "The format to apply to all dates returned by the Widget." %}{% endset %} {{ forms.input("dateFormat", title, module.getOption("dateFormat"), helpText) }} {% set title %}{% trans "Effect" %}{% endset %} {% set helpText %}{% trans "Please select the effect that will be used to transition between items." %}{% endset %} {% set noneOption %}{% trans "None" %}{% endset %} {% set fade %}{% trans "Fade" %}{% endset %} {% set fadeout %}{% trans "Fade Out" %}{% endset %} {% set scrollHorz %}{% trans "Scroll Horizontal" %}{% endset %} {% set scrollVert %}{% trans "Scroll Vertical" %}{% endset %} {% set flipHorz %}{% trans "Flip Horizontal" %}{% endset %} {% set flipVert %}{% trans "Flip Vertical" %}{% endset %} {% set shuffle %}{% trans "Shuffle" %}{% endset %} {% set tileSlide %}{% trans "Tile Slide" %}{% endset %} {% set tileBlind %}{% trans "Tile Blind" %}{% endset %} {% set options = [ { effectid: "noAnim", effect: noneOption }, { effectid: "fade", effect: fade }, { effectid: "fadeout", effect: fadeout}, { effectid: "scrollHorz", effect: scrollHorz}, { effectid: "scrollVert", effect: scrollVert}, { effectid: "flipHorz", effect: flipHorz}, { effectid: "flipVert", effect: flipVert}, { effectid: "shuffle", effect: shuffle}, { effectid: "tileSlide", effect: tileSlide}, { effectid: "tileBlind", effect: tileBlind} ] %} {{ forms.dropdown("effect", "single", title, module.getOption("effect"), options, "effectid", "effect", helpText) }} {% set title %}{% trans "Speed" %}{% endset %} {% set helpText %}{% trans "The transition speed of the selected effect in milliseconds (normal = 1000)." %}{% endset %} {{ forms.number("speed", title, module.getOption("speed"), helpText, "effect-controls") }} {% set title %}{% trans "Horizontal Align" %}{% endset %} {% set helpText %}{% trans "How should this widget be aligned?" %}{% endset %} {% set left %}{% trans "Left" %}{% endset %} {% set center %}{% trans "Centre" %}{% endset %} {% set right %}{% trans "Right" %}{% endset %} {% set options = [ { alignH: "left", align: left }, { alignH: "center", align: center }, { alignH: "right", align: right } ] %} {{ forms.dropdown("alignH", "single", title, module.getOption("alignH","center"), options, "alignH", "align", helpText, "align-fields") }} {% set title %}{% trans "Vertical Align" %}{% endset %} {% set helpText %}{% trans "How should this widget be vertically aligned?" %}{% endset %} {% set top %}{% trans "Top" %}{% endset %} {% set middle %}{% trans "Middle" %}{% endset %} {% set bottom %}{% trans "Bottom" %}{% endset %} {% set options = [ { alignV: "top", valign: top }, { alignV: "middle", valign: middle }, { alignV: "bottom", valign: bottom } ] %} {{ forms.dropdown("alignV", "single", title, module.getoption("alignV", "middle"), options, "alignV", "valign", helpText, "align-fields") }}
{% trans "Preset" %}
{% set title %}{% trans "Template" %}{% endset %} {% set helpText %}{% trans "Select the template you would like to apply. This can be overridden using the check box below." %}{% endset %} {{ forms.dropdown("templateId", "single", title, module.getOption("templateId"), templatesAvailable, "id", "value", helptext, "template-selector-control selectPicker selectPickerWithImage", null, null, null, [{ name: "data-minimum-results-for-search", value: "Infinity" },{ name: "data-width", value: "100%" }], null, "image") }} {% set title %}{% trans "Override the template?" %}{% endset %} {% set helpText %}{% trans "Tick if you would like to override the template." %}{% endset %} {{ forms.checkbox("overrideTemplate", title, module.getOption("overrideTemplate", 0), helpText) }} {% set useTemplatesMessage %} {% trans "With Override the Template selected enter your own text, html and css by using the Templates drop down menu in the tab header above." %} {% endset %} {{ forms.message(useTemplatesMessage, 'template-override-controls') }} {% set title %}{% trans "Original Width" %}{% endset %} {% set helpText %}{% trans "This is the intended width of the template and is used to scale the Widget within its region when the template is applied." %}{% endset %} {{ forms.number("widgetOriginalWidth", title, module.getOption("widgetOriginalWidth", undefined), helpText, "template-override-controls", "", "number") }} {% set title %}{% trans "Original Height" %}{% endset %} {% set helpText %}{% trans "This is the intended height of the template and is used to scale the Widget within its region when the template is applied." %}{% endset %} {{ forms.number("widgetOriginalHeight", title, module.getOption("widgetOriginalHeight", undefined), helpText, "template-override-controls", "", "number") }} {% set title %}{% trans "Original Padding" %}{% endset %} {% set helpText %}{% trans "This is the intended padding of the template and is used to position the Widget within its region when the template is applied." %}{% endset %} {{ forms.number("widgetOriginalPadding", title, module.getOption("widgetOriginalPadding", undefined), helpText, "template-override-controls", "", "number") }} {% set title %}{% trans "Content Type" %}{% endset %} {% set helpText %}{% trans "This is the intended tweet content type." %}{% endset %} {% set allTweets %}{% trans "All Tweets" %}{% endset %} {% set justText %}{% trans "Tweets with text only content" %}{% endset %} {% set withImages %}{% trans "Tweets with text and image content" %}{% endset %} {% set options = [ { contenttypeid: 0, type: allTweets }, { contenttypeid: 1, type: justText }, { contenttypeid: 2, type: withImages } ] %} {{ forms.dropdown("resultContent", "single", title, module.getOption("resultContent", 0), options, "contenttypeid", "type", helpText,"template-override-controls", "required") }}
{% trans "Main Template" %}
{% set simpleTextEditorMessage %} {% trans "Enter text or HTML in the box below." %}
{% endset %} {{ forms.message(simpleTextEditorMessage) }}
{% trans "Snippets" %}
Tweet
User
Date
ProfileImage
Location
ScreenName
Photo
{{ forms.textarea("ta_text", "", module.getRawNode("template"), "", "inline-editor-hide", "", 10) }}
{% trans "No Tweets Message" %}
{% set title %}{% trans "No tweets" %}{% endset %} {% set helpText %}{% trans "A message to display when there are no tweets returned by the search query" %}{% endset %} {{ forms.input("noTweetsMessage", title, module.getOption("noTweetsMessage"), helpText) }}
{% trans "Optional Stylesheet Template" %}
{{ forms.textarea("ta_css", "", module.getRawNode("styleSheet"), "", "", "", 10) }}
{% trans "Optional JavaScript" %}
{{ forms.textarea("javaScript", "", module.getRawNode("javaScript"), "", "", "", 10) }}
{% set title %}{% trans "Update Interval (mins)" %}{% endset %} {% set helpText %}{% trans "Please enter the update interval in minutes. This should be kept as high as possible. For example, if the data will only change once per hour this could be set to 60." %}{% endset %} {{ forms.number("updateInterval", title, module.getOption("updateInterval", 60), helpText, "", "required") }}
{% endblock %}