From 14c499f9d114d924ffa5564f732db66516480f1e Mon Sep 17 00:00:00 2001 From: czaks Date: Mon, 24 Feb 2014 00:06:01 +0100 Subject: Condense flags into one file. Heads-up for people having custom flags, disable $config['country_flags_condensed'] !!! --- inc/config.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'inc/config.php') diff --git a/inc/config.php b/inc/config.php index 1bf55fb7..2af0f391 100644 --- a/inc/config.php +++ b/inc/config.php @@ -523,11 +523,13 @@ // When true, users are instead presented a selectbox for email. Contains, blank, noko and sage. $config['field_email_selectbox'] = false; - // Attach country flags to posts. Requires the PHP "geoip" extension to be installed: - // http://www.php.net/manual/en/intro.geoip.php. In the future, maybe I will find and include a proper - // pure-PHP geolocation library. + // Attach country flags to posts. $config['country_flags'] = false; + // Load all country flags from one file + $config['country_flags_condensed'] = true; + $config['country_flags_condensed_css'] = 'static/flags/flags.css'; + /* * ==================== * Ban settings @@ -1071,6 +1073,9 @@ // Home directory. Used by themes. $config['dir']['home'] = ''; + // Location of a blank 1x1 gif file. Only used when country_flags_condensed is enabled + $config['uri_blank'] = $config['root'] . 'static/blank.gif'; + // Static images. These can be URLs OR base64 (data URI scheme). These are only used if // $config['font_awesome'] is false (default). // $config['image_sticky'] = 'static/sticky.gif'; -- cgit v1.3 From 75cca1ffb2a41a2381f5287fd9bb8ea292a9c281 Mon Sep 17 00:00:00 2001 From: czaks Date: Mon, 24 Feb 2014 15:29:26 +0100 Subject: fix previous commit --- inc/config.php | 2 +- inc/functions.php | 3 +++ templates/post_reply.html | 10 +++++----- templates/post_thread.html | 16 +++++++++++++--- 4 files changed, 22 insertions(+), 9 deletions(-) (limited to 'inc/config.php') diff --git a/inc/config.php b/inc/config.php index 2af0f391..6c7247b4 100644 --- a/inc/config.php +++ b/inc/config.php @@ -1074,7 +1074,7 @@ $config['dir']['home'] = ''; // Location of a blank 1x1 gif file. Only used when country_flags_condensed is enabled - $config['uri_blank'] = $config['root'] . 'static/blank.gif'; + // $config['image_blank'] = 'static/blank.gif'; // Static images. These can be URLs OR base64 (data URI scheme). These are only used if // $config['font_awesome'] is false (default). diff --git a/inc/functions.php b/inc/functions.php index 5b5f5bdd..a65bf720 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -168,6 +168,9 @@ function loadConfig() { if (!isset($config['dir']['static'])) $config['dir']['static'] = $config['root'] . 'static/'; + if (!isset($config['image_blank'])) + $config['image_blank'] = $config['dir']['static'] . 'blank.gif'; + if (!isset($config['image_sticky'])) $config['image_sticky'] = $config['dir']['static'] . 'sticky.gif'; if (!isset($config['image_locked'])) diff --git a/templates/post_reply.html b/templates/post_reply.html index fb240511..713ddac9 100644 --- a/templates/post_reply.html +++ b/templates/post_reply.html @@ -31,17 +31,17 @@ {% if config.display_flags and post.modifiers.flag %} + {% if post.modifiers['flag alt'] %} alt="{{ post.modifiers['flag alt'] | e('html_attr') }}" + title="{{ post.modifiers['flag alt'] | e('html_attr') }}"{% endif %}> {% endif %} diff --git a/templates/post_thread.html b/templates/post_thread.html index d922dabd..113444be 100644 --- a/templates/post_thread.html +++ b/templates/post_thread.html @@ -83,9 +83,19 @@ [{{ post.ip }}] {% endif %} {% if config.display_flags and post.modifiers.flag %} - + {{ post.modifiers['flag alt'] | e('html_attr') }} {% endif %} -- cgit v1.3 From b585fe912ec036bbbe7980f0e20ac349878104bc Mon Sep 17 00:00:00 2001 From: czaks Date: Sun, 9 Mar 2014 01:51:39 +0100 Subject: enable 4chan api by default. it bears some extra CPU time with it, but giving API to the users by default is the way to go. --- inc/config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc/config.php') diff --git a/inc/config.php b/inc/config.php index 6c7247b4..46ff8e8b 100644 --- a/inc/config.php +++ b/inc/config.php @@ -1464,7 +1464,7 @@ // Whether or not to enable the 4chan-compatible API, disabled by default. See // https://github.com/4chan/4chan-API for API specification. - $config['api']['enabled'] = false; + $config['api']['enabled'] = true; // Extra fields in to be shown in the array that are not in the 4chan-API. You can get these by taking a // look at the schema for posts_ tables. The array should be formatted as $db_column => $translated_name. -- cgit v1.3