Commit 1baaf853 authored by Patrick Schmalstig's avatar Patrick Schmalstig
Browse files

Implemented MANTIS-5521 (Option to hide the hero slider when site is closed)

parent d97bfb32
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1025,7 +1025,7 @@ class Module_admin_setupwizard
        $hidden = static_evaluate_tempcode(build_keep_post_fields(['csrf_token_preserve']));

        $fields = new Tempcode();
        $fields->attach(form_input_tick(do_lang_tempcode('CLOSED_SITE'), do_lang_tempcode('CONFIG_OPTION_site_closed'), 'site_closed', true));
        $fields->attach(form_input_tick(do_lang_tempcode('CLOSED_SITE'), do_lang_tempcode('_CONFIG_OPTION_site_closed'), 'site_closed', true));
        $fields->attach(form_input_text(do_lang_tempcode('MESSAGE'), do_lang_tempcode('CONFIG_OPTION_closed'), 'closed', get_option('closed'), false, false));

        $js_function_calls = ['adminSetupWizardStep9'];
+2 −1
Original line number Diff line number Diff line
@@ -49,7 +49,8 @@ CMD_CLEAR_HELP=Clears the Commandr command-line area of commands and output.
CMD_CLEAR_CACHES_HELP=Clear and rebuild the specified caches. If none are specified, all caches are cleared.
CMD_CLEAR_CACHES_HELP_PARAM_0=A comma-separated list of the caches to clear, using names of the hooks in sources/hooks/systems/cleanup/. (Optional)
CMD_CLOSED_HELP=Closes or opens the site, and changes the closed message.
CMD_CLOSED_HELP_C=Close the site.
CMD_CLOSED_HELP_C=Close the site, but keep the hero slider visible.
CMD_CLOSED_HELP_CH=Close the site and hide the hero slider.
CMD_CLOSED_HELP_O=Open the site.
CMD_CLOSED_HELP_PARAM_0=The new closed site message. (Optional if you're opening the site)
CMD_COMMANDS_HELP=Show a list of all the available commands.
+3 −0
Original line number Diff line number Diff line
@@ -130,6 +130,7 @@ CONFIG_OPTION_comments_forum_name=The forum in which all comment topics are crea
CONFIG_OPTION_copyright=The copyright notice. &lsquo;&amp;copy;&rsquo; represents the copyright symbol. If you wish to automate an end date you can use <kbd>$CURRENT_YEAR</kbd> like <kbd>Copyright &copy; 2012-$CURRENT_YEAR=2016 ACME Corps</kbd> or <kbd>Copyright &copy; 2012-$CURRENT_YEAR ACME Corps</kbd>. The former will be automatically updated to the current year when posting new content (i.e. bumped forward only when posting new content within a new year), the latter will always be up-to-date (which is legally dubious if changes haven't actually been made, but some may be happy with that).
CONFIG_OPTION_closed=The text to display when your site is closed.
CONFIG_OPTION_site_closed=Should the website be open or closed to the public?
_CONFIG_OPTION_site_closed=Should the website be open or closed to the public? The hero slider will still be visible if you close the site. However, you can also hide the hero slider by later editing this option in the Admin Zone > Setup > Configuration > Site options > Closed site
CONFIG_OPTION_welcome_message=The text displayed in the welcome block (which is on the front page by default), to welcome people to your site.
CONFIG_OPTION_site_scope=The scope (topic) of your site. This should be a very short phrase that may be embedded within a sentence. For example, a site involving chocolate might choose &lsquo;chocolate&rsquo; as the scope. The software may then use the scope in a larger sentence, for example &ldquo;We hope that this is the best site for <em>chocolate</em> on the Internet.&rdquo;.
CONFIG_OPTION_description=This appears beside your site name in search engine results for any content pages that don't have their own descriptions/summaries.
@@ -252,6 +253,7 @@ MAIL_QUEUE_DEBUG=E-mail debug mode
CONFIG_OPTION_mail_queue=Whether e-mails should be sent sequentially from a queue (by the system scheduler). Queue-based processing of e-mails will help smooth out system load, especially when a page request needs to send out many e-mails. A page request can trigger many e-mails if many members are listening on the same notifications.
CONFIG_OPTION_mail_queue_debug=Whether all e-mail will be held in the queue rather than sent, and you need to edit/force-send/delete items manually. This is very useful when first debugging a sophisticated website, if you are concerned e-mails might not be going out in adequate condition, or spurious e-mails might be sent. If you have this option enabled and then disable it, the e-mail queue will be processed quickly afterwards (so make sure you have deleted any inappropriate e-mails from the queue first).
STATS_WHEN_CLOSED=Collect stats when closed
CLOSED_HIDE_HERO=Closed, and hide the hero slider
CONFIG_OPTION_stats_when_closed=Whether to collect statistics/log data when the site is closed.
IP_STRICT_FOR_SESSIONS=Enforce IP addresses for sessions
CONFIG_OPTION_enable_previews=Whether to provide a preview feature for actions.
@@ -481,6 +483,7 @@ CONFIG_OPTION_vote_member_ip_restrict=Whether members should be limited by IP ad
VOTE_MEMBER_IP_RESTRICT=Limit by IP address
FOOTER_LINKS=Footer links
CLOSED_SITE_OPTION=Open/Closed site
CLOSED_SITE_HIDE_HERO_OPTION=Hide hero slider when closed
OEMBED_MANUAL_PATTERNS=oEmbed end-points
CONFIG_OPTION_oembed_manual_patterns=Advanced feature. A list of oEmbed end-point patterns, for websites that don't support auto-discovery, or websites we want to speed up oEmbed display for (by avoiding a discovery search).
OEMBED_HTML_SAFELIST=oEmbed safelist
+1 −1
Original line number Diff line number Diff line
@@ -385,7 +385,7 @@ function ajax_tree_script()
{
    // Closed site
    $site_closed = get_option('site_closed');
    if (($site_closed == '1') && (!has_privilege(get_member(), 'access_closed_site')) && (!$GLOBALS['IS_ACTUALLY_ADMIN'])) {
    if (($site_closed != '0') && (!has_privilege(get_member(), 'access_closed_site')) && (!$GLOBALS['IS_ACTUALLY_ADMIN'])) {
        http_response_code(503);
        prepare_backend_response('text/plain');
        @exit(get_option('closed'));
+1 −1
Original line number Diff line number Diff line
@@ -164,7 +164,7 @@ function attachments_script()
{
    // Closed site
    $site_closed = get_option('site_closed');
    if (($site_closed == '1') && (!has_privilege(get_member(), 'access_closed_site')) && (!$GLOBALS['IS_ACTUALLY_ADMIN'])) {
    if (($site_closed != '0') && (!has_privilege(get_member(), 'access_closed_site')) && (!$GLOBALS['IS_ACTUALLY_ADMIN'])) {
        http_response_code(503);
        header('Content-Type: text/plain; charset=' . get_charset());
        @exit(get_option('closed'));
Loading