[3.3][RC] Filter by country - version 1.0.16

A place for Extension Authors to post and receive feedback on Extensions still in development. No Extensions within this forum should be used within a live environment!
Ideas Centre
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: Extensions Development rules

IMPORTANT FOR NEEDED EVENTS!!!
If you need an event for your extension please read this for the steps to follow to request the event(s)
User avatar
MarkDHamill
Registered User
Posts: 4211
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: [3.3][RC] Filter by country - version 1.0.10

Post by MarkDHamill »

The directory should need 777 permissions for it to be updated through the cron. It may not be necessary in your case. phpBB's /cache folder is supposed to have it too, but on some clients it doesn't have it and it works fine.
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. Kindle and paper versions available.
User avatar
MarkDHamill
Registered User
Posts: 4211
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

[3.3][RC] Filter by country - version 1.0.11

Post by MarkDHamill »

A new version 1.0.11 is released and ready for download. See first post for links.

There is no new functionality in this release. Summary of changes:
  • Works on phpBB 3.3.
  • I am treating this as a release candidate, but it's not marked as a release candidate. Rather I will let you try it out for a few weeks and if no issues I'll submit it for its first formal review.
  • Directory and file access is done using the filesystem service where possible. I know I'll get dinged by the extension review team if I don't do it, so I took the time to puzzle through it. In some ways it simplifies things, such as it can delete a folder recursively using the service.
  • Similarly, I am using the config service to set and retrieve configuration variables. Before I set and retrieve these explicitly as elements of an array. I have a feeling I'll get dinged on this too if I don't do it. One thing I've noticed is that the review team gets pickier with time.
  • If an IP was not formatted correctly, these were captured in the log if logging is enabled. These are no longer being captured in the log. Some of these semi-proprietary HTTP headers like HTTP_CF_CONNECTING_IP throw all sorts of non-standard stuff in there, so they are best ignored. Most of the time, only the REMOTE_ADDR is relevant and a valid IP can be expected there.
Full list of changes can be seen here.
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. Kindle and paper versions available.
User avatar
kasimi
Extension Customisations
Extension Customisations
Posts: 4318
Joined: Sat Sep 10, 2011 7:12 pm
Location: Germany
Contact:

Re: [3.3][RC] Filter by country - version 1.0.11

Post by kasimi »

MarkDHamill wrote:
Thu May 21, 2020 8:10 pm
  • Before I set and retrieve these explicitly as elements of an array.
This is how you're supposed to work with the config service. It implements the ArrayAccess interface for a reason. Don't call offsetGet(), offsetSet() etc. explicitly.
User avatar
MarkDHamill
Registered User
Posts: 4211
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: [3.3][RC] Filter by country - version 1.0.11

Post by MarkDHamill »

Should I go back to my old method then?
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. Kindle and paper versions available.
User avatar
kasimi
Extension Customisations
Extension Customisations
Posts: 4318
Joined: Sat Sep 10, 2011 7:12 pm
Location: Germany
Contact:

Re: [3.3][RC] Filter by country - version 1.0.11

Post by kasimi »

I'm not sure what your old method is, but $value = $this->config['key']; and $this->config->set('key', 'value'); is how the config service is supposed to be used.
User avatar
MarkDHamill
Registered User
Posts: 4211
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: [3.3][RC] Filter by country - version 1.0.11

Post by MarkDHamill »

Thanks. I see I should have read the documentation more clearly because the offset functions are temporary.
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. Kindle and paper versions available.
User avatar
MarkDHamill
Registered User
Posts: 4211
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

[3.3][RC] Filter by country - version 1.0.12

Post by MarkDHamill »

This version fixes the issue noted by kasimi. See first post for download links.
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. Kindle and paper versions available.
User avatar
MarkDHamill
Registered User
Posts: 4211
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: [3.3][RC] Filter by country - version 1.0.12

Post by MarkDHamill »

This extension has been submitted for review to the extensions review team. My thanks to the many of you who helped test and improve the usability of the extension.
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. Kindle and paper versions available.
User avatar
MarkDHamill
Registered User
Posts: 4211
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

[3.3][RC] Filter by country - version 1.0.12 - German language files

Post by MarkDHamill »

I received a German translation from Pfiffy. Thanks so much for the contribution! I don't normally include language translations in the archive because getting updated translations can take a lot of time when making new releases. I am happy to link to translations in the README file if they are accessible online.

Here are the files to create for the German translation:

/language/de/common.php:

Code: Select all

<?php
/**
 *
 * Filter by country. An extension for the phpBB Forum Software package.
 *
 * @copyright (c) 2020, Mark D. Hamill, https://www.phpbbservices.com
 * @license GNU General Public License, version 2 (GPL-2.0)
 *
 */

if (!defined('IN_PHPBB'))
{
	exit;
}

if (empty($lang) || !is_array($lang))
{
	$lang = array();
}

// DEVELOPERS PLEASE NOTE
//
// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
//
// Placeholders can now contain order information, e.g. instead of
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
// translators to re-order the output of data while ensuring it remains correct
//
// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
// equally where a string contains only two placeholders which are used to wrap text
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
//
// Some characters you may want to copy&paste:
// ’ » “ ” …
//

$lang = array_merge($lang, array(
	'PLURAL_RULE'						=> 1,
	'ACP_FBC_ALLOW'						=> 'Erlauben',
	'ACP_FBC_ALLOWED'					=> 'Erlaubte Seitenaufrufe',
	'ACP_FBC_ALLOW_OUT_OF_COUNTRY_LOGINS'	=> 'Erlaube den Login von registrierten Benutzern aus ausgeschlossenen Ländern',
	'ACP_FBC_ALLOW_OUT_OF_COUNTRY_LOGINS_EXPLAIN'	=> 'Dies erlaubt es Benutzern, die auf Reisen sind, sich anzumelden. Anderer Zugang zum Board ist verboten.',
	'ACP_FBC_ALLOW_RESTRICT'			=> 'Erlaube oder verbiete die ausgewählten Länder',
	'ACP_FBC_ALLOW_RESTRICT_EXPLAIN'	=> 'Wenn "Erlauben" eingestellt ist, werden die Seitenaufrufe aus den ausgewählten Ländern erlaubt. Wenn "Verbieten" eingestellt ist, werden die Seitenaufrufe aus den ausgewählten Ländern verboten.',
	'ACP_FBC_CHANGE_REPORT_RANGE'		=> 'Ändere den Berichtsbereich',
	'ACP_FBC_COUNTRIES'					=> 'Wähle ein oder mehrere Länder aus',
	'ACP_FBC_COUNTRIES_EXPLAIN'			=> 'Verwende die STRG-Taste zur Mehrfachauswahl (Command am Mac). Du kannst eine Reihe von Ländern auswählen, indem du die UMSCHALTtaste gedrückt hältst, während du das erste und das letzte Länd auswählst.',
	'ACP_FBC_COUNTRY_A_Z'				=> 'Land, A-Z',
	'ACP_FBC_COUNTRY_Z_A'				=> 'Land, Z-A',
	'ACP_FBC_COUNTRY_ALLOWED_ASC'		=> 'Erlaubte Seitenaufrufe, aufsteigend',
	'ACP_FBC_COUNTRY_ALLOWED_DESC'		=> 'Erlaubte Seitenaufrufe, absteigend',
	'ACP_FBC_COUNTRY_NAME'				=> 'Ländername',
	'ACP_FBC_COUNTRY_RESTRICTED_ASC'	=> 'Verbotene Seitenaufrufe, aufsteigend',
	'ACP_FBC_COUNTRY_RESTRICTED_DESC'	=> 'Verbotene Seitenaufrufe, absteigend',
	'ACP_FBC_CREATE_DATABASE_ERROR'		=> 'Nicht möglich, die MaxMind Länderdatenbank zu erstellen. This may be due to insufficient permissions or an invalid license key. The file permissions for the forum’s /store/phpbbservices folder should be set to publicly writeable (777 on Unix-based systems).',
	'ACP_FBC_CURRENT_RANGE'				=> 'Bereich der angezeigten Statistik',
	'ACP_FBC_DATES_BEGINNING'			=> 'Oder wähle einen absoluten Bereich für das Startdatum',
	'ACP_FBC_DATES_ENDING'				=> 'und das Enddatum',
	'ACP_FBC_DENY_ACCESS'				=> 'Your access is denied due to the country code(s) assigned to your IP address(es): %1$s.',
	'ACP_FBC_DENY_ACCESS_LOGIN'			=> 'Your access is denied due to the country code(s) assigned to your IP address(es): %1$s. However, actively registered users may <a href="%2$s">login</a>.',
	'ACP_FBC_DOWNLOAD_ERROR'			=> 'Konnte %1$s nicht herunterladen',
	'ACP_FBC_EFFECTIVELY_DISABLED'		=> 'Um eine Boardsperre zu vermeiden ist derzeit jeglicher Zugriff erlaubt. Das kann passieren, wenn kein Land ausgewählt wurde. Bitte ändere deine Einstellungen. Deaktiviere die Erweiterung, um das dauerhaft einzustellen.',
	'ACP_FBC_FROM'						=> 'Von ',
	'ACP_FBC_IGNORE'					=> 'Ignorieren',
	'ACP_FBC_IGNORE_BOTS'				=> 'Ignoriere bekannte Bots',
	'ACP_FBC_IGNORE_BOTS_EXPLAIN'		=> '"Ja" führt die bekannten Bots wie z.B. bekannte Suchmaschinen, nicht in der Statistik auf. Bots haben weiterhin Zugriff auf die Seite, abhängig von den Bot-Einstellungen. Die Bots findest du im ACP in der Gruppenverwaltung.',
	'ACP_FBC_INVALID_LICENSE_KEY'		=> 'Dein Lizenzschlüssel ist ungültig. Verwende einen gültigen MaxMind Lizenzschlüssel.',
	'ACP_FBC_KEEP_STATISTICS'			=> 'Statistiken aufbewahren',
	'ACP_FBC_KEEP_STATISTICS_EXPLAIN'	=> '"Ja" speichert die Statistiken für die erlaubten und verbotenen Seitenaufrufe nach Land. <em>Warnung</em>: Diese Statistiken können viel Datenbankplatz beanspruchen. <em>"Nein" löscht alle Statistiken.</em>',
	'ACP_FBC_LAST_1_HOURS'				=> 'In der letzten Stunde',
	'ACP_FBC_LAST_12_HOURS'				=> 'In den letzten 12 Stunden',
	'ACP_FBC_LAST_15_MINUTES'			=> 'In den letzten 15 Minuten',
	'ACP_FBC_LAST_3_HOURS'				=> 'In den letzten 3 Stunden',
	'ACP_FBC_LAST_30_MINUTES'			=> 'In den letzten 30 Minuten',
	'ACP_FBC_LAST_6_HOURS'				=> 'In den letzten 6 Stunden',
	'ACP_FBC_LAST_DAY'					=> 'In den letzten 24 Stunden',
	'ACP_FBC_LAST_MONTH'				=> 'In den letzten 30 Tagen',
	'ACP_FBC_LAST_QUARTER'				=> 'In den letzten 90 Tagen',
	'ACP_FBC_LAST_TWO_WEEKS'			=> 'In den letzten 14 Tagen',
	'ACP_FBC_LAST_WEEK'					=> 'In den letzten 7 Tagen',
	'ACP_FBC_LICENSE_KEY'				=> 'MaxMind Lizenzschlüssel',
	'ACP_FBC_LICENSE_KEY_EXPLAIN'		=> 'Um die MaxMind’s GeoLite2 Länderdatenbank verwenden zu können, musst du einen Lizenzschlüssel bei <a href="https://dev.maxmind.com/geoip/geoip2/geolite2/" target="_blank">MaxMind</a> anfordern. Du musst die Lizenz <em>nicht</em> kaufen. Du musst dich auf der Website registrieren, um einen Lizenzschlüssel zu erhalten. Gib hier den 16 stelligen Lizenzschlüssel ein.',
	'ACP_FBC_LOG_ACCESS_ERRORS'			=> 'Protokolliere Zugriffsfehler',
	'ACP_FBC_LOG_ACCESS_ERRORS_EXPLAIN'	=> '"Ja" protokolliert alle verbotenen IP-Adressen im Administrations-Protokoll. Das Protokoll kann dadurch sehr lang werden.',
	'ACP_FBC_MAXMIND_ERROR'				=> 'Ein Aufruf der MaxMind-Länderdatenbank löste einen Fehler aus. Die Datenbank könnte korrupt sein. Informiere ggfs. den Webmaster.',
	'ACP_FBC_NO_LIMIT'					=> 'Verwende alle Statistiken',
	'ACP_FBC_NO_STATISTICS'				=> 'Die Statistik ist nicht aktiviert. Die Statistik kann auf der Einstellungsseite der Erweiterung aktiviert werden.',
	'ACP_FBC_NO_STATISTICS_FOR_RANGE'	=> 'Es gibt keine Statistiken für den ausgewählten Bereich.',
	'ACP_FBC_NO_STATISTICS_YET'			=> 'Es ist noch keine Statistik verfügbar. Vermutlich wurde die Statistik soeben erst aktiviert.',
	'ACP_FBC_OPTIONS'					=> '<option value="AF">Afghanistan</option>
<option value="AX">Åland Islands</option>
<option value="AL">Albania</option>
<option value="DZ">Algeria</option>
<option value="AS">American Samoa</option>
<option value="AD">Andorra</option>
<option value="AO">Angola</option>
<option value="AI">Anguilla</option>
<option value="AQ">Antarctica</option>
<option value="AG">Antigua and Barbuda</option>
<option value="AR">Argentina</option>
<option value="AM">Armenia</option>
<option value="AW">Aruba</option>
<option value="AU">Australia</option>
<option value="AT">Austria</option>
<option value="AZ">Azerbaijan</option>
<option value="BS">Bahamas</option>
<option value="BH">Bahrain</option>
<option value="BD">Bangladesh</option>
<option value="BB">Barbados</option>
<option value="BY">Belarus</option>
<option value="BE">Belgium</option>
<option value="BZ">Belize</option>
<option value="BJ">Benin</option>
<option value="BM">Bermuda</option>
<option value="BT">Bhutan</option>
<option value="BO">Bolivia, Plurinational State of</option>
<option value="BQ">Bonaire, Sint Eustatius and Saba</option>
<option value="BA">Bosnia and Herzegovina</option>
<option value="BW">Botswana</option>
<option value="BV">Bouvet Island</option>
<option value="BR">Brazil</option>
<option value="IO">British Indian Ocean Territory</option>
<option value="BN">Brunei Darussalam</option>
<option value="BG">Bulgaria</option>
<option value="BF">Burkina Faso</option>
<option value="BI">Burundi</option>
<option value="KH">Cambodia</option>
<option value="CM">Cameroon</option>
<option value="CA">Canada</option>
<option value="CV">Cape Verde</option>
<option value="KY">Cayman Islands</option>
<option value="CF">Central African Republic</option>
<option value="TD">Chad</option>
<option value="CL">Chile</option>
<option value="CN">China</option>
<option value="CX">Christmas Island</option>
<option value="CC">Cocos (Keeling) Islands</option>
<option value="CO">Colombia</option>
<option value="KM">Comoros</option>
<option value="CG">Congo</option>
<option value="CD">Congo, the Democratic Republic of the</option>
<option value="CK">Cook Islands</option>
<option value="CR">Costa Rica</option>
<option value="CI">Côte d’Ivoire</option>
<option value="HR">Croatia</option>
<option value="CU">Cuba</option>
<option value="CW">Curaçao</option>
<option value="CY">Cyprus</option>
<option value="CZ">Czech Republic</option>
<option value="DK">Denmark</option>
<option value="DJ">Djibouti</option>
<option value="DM">Dominica</option>
<option value="DO">Dominican Republic</option>
<option value="EC">Ecuador</option>
<option value="EG">Egypt</option>
<option value="SV">El Salvador</option>
<option value="GQ">Equatorial Guinea</option>
<option value="ER">Eritrea</option>
<option value="EE">Estonia</option>
<option value="ET">Ethiopia</option>
<option value="FK">Falkland Islands (Malvinas)</option>
<option value="FO">Faroe Islands</option>
<option value="FJ">Fiji</option>
<option value="FI">Finland</option>
<option value="FR">France</option>
<option value="GF">French Guiana</option>
<option value="PF">French Polynesia</option>
<option value="TF">French Southern Territories</option>
<option value="GA">Gabon</option>
<option value="GM">Gambia</option>
<option value="GE">Georgia</option>
<option value="DE">Germany</option>
<option value="GH">Ghana</option>
<option value="GI">Gibraltar</option>
<option value="GR">Greece</option>
<option value="GL">Greenland</option>
<option value="GD">Grenada</option>
<option value="GP">Guadeloupe</option>
<option value="GU">Guam</option>
<option value="GT">Guatemala</option>
<option value="GG">Guernsey</option>
<option value="GN">Guinea</option>
<option value="GW">Guinea-Bissau</option>
<option value="GY">Guyana</option>
<option value="HT">Haiti</option>
<option value="HM">Heard Island and McDonald Islands</option>
<option value="VA">Holy See (Vatican City State)</option>
<option value="HN">Honduras</option>
<option value="HK">Hong Kong</option>
<option value="HU">Hungary</option>
<option value="IS">Iceland</option>
<option value="IN">India</option>
<option value="ID">Indonesia</option>
<option value="IR">Iran, Islamic Republic of</option>
<option value="IQ">Iraq</option>
<option value="IE">Ireland</option>
<option value="IM">Isle of Man</option>
<option value="IL">Israel</option>
<option value="IT">Italy</option>
<option value="JM">Jamaica</option>
<option value="JP">Japan</option>
<option value="JE">Jersey</option>
<option value="JO">Jordan</option>
<option value="KZ">Kazakhstan</option>
<option value="KE">Kenya</option>
<option value="KI">Kiribati</option>
<option value="KP">Korea, Democratic People’s Republic of</option>
<option value="KR">Korea, Republic of</option>
<option value="KW">Kuwait</option>
<option value="KG">Kyrgyzstan</option>
<option value="LA">Lao People’s Democratic Republic</option>
<option value="LV">Latvia</option>
<option value="LB">Lebanon</option>
<option value="LS">Lesotho</option>
<option value="LR">Liberia</option>
<option value="LY">Libya</option>
<option value="LI">Liechtenstein</option>
<option value="LT">Lithuania</option>
<option value="LU">Luxembourg</option>
<option value="MO">Macao</option>
<option value="MK">Macedonia, the former Yugoslav Republic of</option>
<option value="MG">Madagascar</option>
<option value="MW">Malawi</option>
<option value="MY">Malaysia</option>
<option value="MV">Maldives</option>
<option value="ML">Mali</option>
<option value="MT">Malta</option>
<option value="MH">Marshall Islands</option>
<option value="MQ">Martinique</option>
<option value="MR">Mauritania</option>
<option value="MU">Mauritius</option>
<option value="YT">Mayotte</option>
<option value="MX">Mexico</option>
<option value="FM">Micronesia, Federated States of</option>
<option value="MD">Moldova, Republic of</option>
<option value="MC">Monaco</option>
<option value="MN">Mongolia</option>
<option value="ME">Montenegro</option>
<option value="MS">Montserrat</option>
<option value="MA">Morocco</option>
<option value="MZ">Mozambique</option>
<option value="MM">Myanmar</option>
<option value="NA">Namibia</option>
<option value="NR">Nauru</option>
<option value="NP">Nepal</option>
<option value="NL">Netherlands</option>
<option value="NC">New Caledonia</option>
<option value="NZ">New Zealand</option>
<option value="NI">Nicaragua</option>
<option value="NE">Niger</option>
<option value="NG">Nigeria</option>
<option value="NU">Niue</option>
<option value="NF">Norfolk Island</option>
<option value="MP">Northern Mariana Islands</option>
<option value="NO">Norway</option>
<option value="OM">Oman</option>
<option value="PK">Pakistan</option>
<option value="PW">Palau</option>
<option value="PS">Palestinian Territory, Occupied</option>
<option value="PA">Panama</option>
<option value="PG">Papua New Guinea</option>
<option value="PY">Paraguay</option>
<option value="PE">Peru</option>
<option value="PH">Philippines</option>
<option value="PN">Pitcairn</option>
<option value="PL">Poland</option>
<option value="PT">Portugal</option>
<option value="PR">Puerto Rico</option>
<option value="QA">Qatar</option>
<option value="RE">Réunion</option>
<option value="RO">Romania</option>
<option value="RU">Russian Federation</option>
<option value="RW">Rwanda</option>
<option value="BL">Saint Barthélemy</option>
<option value="SH">Saint Helena, Ascension and Tristan da Cunha</option>
<option value="KN">Saint Kitts and Nevis</option>
<option value="LC">Saint Lucia</option>
<option value="MF">Saint Martin (French part)</option>
<option value="PM">Saint Pierre and Miquelon</option>
<option value="VC">Saint Vincent and the Grenadines</option>
<option value="WS">Samoa</option>
<option value="SM">San Marino</option>
<option value="ST">Sao Tome and Principe</option>
<option value="SA">Saudi Arabia</option>
<option value="SN">Senegal</option>
<option value="RS">Serbia</option>
<option value="SC">Seychelles</option>
<option value="SL">Sierra Leone</option>
<option value="SG">Singapore</option>
<option value="SX">Sint Maarten (Dutch part)</option>
<option value="SK">Slovakia</option>
<option value="SI">Slovenia</option>
<option value="SB">Solomon Islands</option>
<option value="SO">Somalia</option>
<option value="ZA">South Africa</option>
<option value="GS">South Georgia and the South Sandwich Islands</option>
<option value="SS">South Sudan</option>
<option value="ES">Spain</option>
<option value="LK">Sri Lanka</option>
<option value="SD">Sudan</option>
<option value="SR">Suriname</option>
<option value="SJ">Svalbard and Jan Mayen</option>
<option value="SZ">Swaziland</option>
<option value="SE">Sweden</option>
<option value="CH">Switzerland</option>
<option value="SY">Syrian Arab Republic</option>
<option value="TW">Taiwan, Province of China</option>
<option value="TJ">Tajikistan</option>
<option value="TZ">Tanzania, United Republic of</option>
<option value="TH">Thailand</option>
<option value="TL">Timor-Leste</option>
<option value="TG">Togo</option>
<option value="TK">Tokelau</option>
<option value="TO">Tonga</option>
<option value="TT">Trinidad and Tobago</option>
<option value="TN">Tunisia</option>
<option value="TR">Turkey</option>
<option value="TM">Turkmenistan</option>
<option value="TC">Turks and Caicos Islands</option>
<option value="TV">Tuvalu</option>
<option value="UG">Uganda</option>
<option value="UA">Ukraine</option>
<option value="AE">United Arab Emirates</option>
<option value="GB">United Kingdom</option>
<option value="US">United States</option>
<option value="UM">United States Minor Outlying Islands</option>
<option value="UY">Uruguay</option>
<option value="UZ">Uzbekistan</option>
<option value="VU">Vanuatu</option>
<option value="VE">Venezuela, Bolivarian Republic of</option>
<option value="VN">Viet Nam</option>
<option value="VG">Virgin Islands, British</option>
<option value="VI">Virgin Islands, U.S.</option>
<option value="WF">Wallis and Futuna</option>
<option value="EH">Western Sahara</option>
<option value="YE">Yemen</option>
<option value="ZM">Zambia</option>
<option value="ZW">Zimbabwe</option>',
	'ACP_FBC_OVERRIDE'					=> '(<em>Hinweis</em>: Die Verwendung von absoluten Datumsangaben überschreibt alle ausgewählten relativen Daten. Gib beide Datumsangaben für die Verwendung absoluter Datumsangaben an.)',
	'ACP_FBC_RANGE_EXPLAIN'				=> 'Dies ist ein relativer Bereich von jetzt an.',
	'ACP_FBC_REQUIREMENTS'				=> 'Um diese Erweiterung zu installieren, muss das store-Verzeichnis beschreibbar sein (0777 Unix Datei Berechtigung). allow_url_fopen muss am Webserver aktiviert sein. Die folgenden PHP Erweiterungen werden benötigt: curl, dom and Phar. Diese Erweiterung arbeitet mit phpBB 3.2 und 3.3.',
	'ACP_FBC_RESTRICT'					=> 'Verbieten',
	'ACP_FBC_RESTRICTED'				=> 'Verbotene Seitenaufrufe',
	'ACP_FBC_SETTING_SAVED'				=> 'Die Einstellungen wurden erfolgreich gespeichert!',
	'ACP_FBC_TO'						=> ' bis ',
	'ACP_FBC_UNKNOWN'					=> 'Unbekannt',
	'ACP_FBC_UNSELECT_ALL'				=> 'Alle Länder deaktivieren',
));
language/de/info_acp_filterbycountry.php:

Code: Select all

<?php
/**
 *
 * Filter by country. An extension for the phpBB Forum Software package.
 *
 * @copyright (c) 2020, Mark D. Hamill, https://www.phpbbservices.com
 * @license GNU General Public License, version 2 (GPL-2.0)
 *
 */

if (!defined('IN_PHPBB'))
{
	exit;
}

if (empty($lang) || !is_array($lang))
{
	$lang = array();
}

// DEVELOPERS PLEASE NOTE
//
// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
//
// Placeholders can now contain order information, e.g. instead of
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
// translators to re-order the output of data while ensuring it remains correct
//
// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
// equally where a string contains only two placeholders which are used to wrap text
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
//
// Some characters you may want to copy&paste:
// » “ “ …
//

$lang = array_merge($lang, array(
	'ACP_FBC'					=> 'Filter by country',
	'ACP_FBC_STATS'				=> 'Statistik',
	'ACP_FBC_STATS_TITLE'		=> 'Filter by country Statistik',
	'ACP_FBC_STATS_TITLE_EXPLAIN'	=> 'Diese Seite enthält einen Bericht über die erlaubten oder geblockten Seitenaufrufe nach Land seitdem die Statistik für diese Erweiterung aktiviert wurde. Benutze die Pfeile, um die Spalten zu sortieren. <strong>Wenn es für ein Land keinen Seitenaufruf gab, wird nichts angezeigt. Die Statistik ist ab %s verfügbar.</strong>',
	'ACP_FBC_TITLE'				=> 'Filter by country Einstellungen',
	'ACP_FBC_TITLE_EXPLAIN'		=> 'Diese Erweiterung erlaubt dir, Seitenaufrufe deines Boards länderspezifisch zu filtern. Die Erweiterung verwendet GeoLite2 Daten von MaxMind, erhältlich bei <a href="https://www.maxmind.com" target="_blank">https://www.maxmind.com</a>. Die GeoLite2 Länderdatenbank wird automatisch wöchentlich aktualisiert.',
	'ACP_FBC_TITLE_SHORT'		=> 'Einstellungen',

	'LOG_ACP_FBC_BAD_ACCESS'				=> '<strong>Filter by country: %1s wurde der Boardzugriff von der/den IP-Adresse(n) %2s verweigert, weil der Zugriff des Landes/der Länder “%3s“ nicht erlaubt ist.',
	'LOG_ACP_FBC_CREATE_DIRECTORY_ERROR'	=> '<strong>Ordner %1$s kann nicht erstellt werden. Möglicherweise reichen die Berechtigungen nicht aus. Die Dateiberechtigungen des Ordners sollten auf öffentlich beschreibbar gesetzt werden (777 bei Unix Systemen).</strong>',
	'LOG_ACP_FBC_DEBUG'						=> '<strong>%1s</strong>',
	'LOG_ACP_FBC_DELETE_ERROR'				=> '<strong>Unmöglich %1$s zu löschen. Möglicherweise reichen die Berechtigungen nicht aus. Volle öffentliche Schreibberechtigung ist erforderlich.</strong>',
	'LOG_ACP_FBC_EXTRACT_ERROR'				=> '<strong>Unmöglich %1$s nach %2$s zu entpacken. Ein “%3$s” Ausnahmefeher wurde ausgegeben.</strong>',
	'LOG_ACP_FBC_FILTERBYCOUNTRY_SETTINGS'	=> '<strong>Filter by country Einstellungen aktualisiert</strong>',
	'LOG_ACP_FBC_FOPEN_ERROR'				=> '<strong>Konnte die Datei %1$s nicht herunterladen. Der MaxMind Service könnte temporär offline sein.</strong>',
	'LOG_ACP_FBC_GZIP_OPEN_ERROR'			=> '<strong>Konnte die gepackte Datei %1$s nicht öffnen</strong>',
	'LOG_ACP_FBC_HTTP_ERROR'				=> '<strong>Konnte die Datei %1$s nicht herunterladen. Der unerwarteter HTTP Fehler %1$s ist aufgetreten.</strong>',
	'LOG_ACP_FBC_MAXMIND_ERROR'				=> '<strong>Ein Aufruf der MaxMind Ländercode Datenbank verursachte einen Fehler. Eventuell ist die Datenbank korrupt.</strong>',
	'LOG_ACP_FBC_READ_FILE_ERROR'			=> '<strong>Keine Leseberechtigung für die Datei %1$s</strong>',
	'LOG_ACP_FBC_TARBALL_MOVE_ERROR'		=> '<strong>Konnte die Datei %1$s nicht verschieben</strong>',
	'LOG_ACP_FBC_WRITE_FILE_ERROR'			=> '<strong>Keine Schreibberechtigung für die Datei %1$s</strong>',
));
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. Kindle and paper versions available.
User avatar
MarkDHamill
Registered User
Posts: 4211
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

[3.3][RC] Filter by country - version 1.0.13 released

Post by MarkDHamill »

A new version 1.0.13 is available for download. It can be downloaded from my web page or from the GitHub branch page. If you download it from GitHub, make sure you place it in the /ext/phpbbservices/filterbycountry directory.

This is the first version to get a review by the extension review team. Kasimi drew the short straw and I must say he was thorough and had lots of great ideas, just ones that required a lot of rework. It took four days to work through the issues he found and the bugs I encountered. And I thought it was pretty good to go!

So please take it for a spin and if I hear no issues I'll submit it for a second review in a week or so.

Aside from issues fixed by the review, there are some minor new features and bug fixes. Of note:
  • There is a test IP feature on the settings page. Use with caution as it will make all traffic use the IP, so legitimate traffic may get blocked. But of course since this is not yet approved, you're not using it on a real board, right?
  • The date ranges on the statistics page are now flexible. You don't have to provide both a start and an end date, but just one of the two. Otherwise relative date ranges are used.
  • This works on phpBB 3.3 only.
  • Fixed a bug in the statistics program. I left out a SQL HAVING clause which does the filtering on the database side, which is more efficient.
Some language changes were made, particularly to the list of countries. I was asked not to embed <option> tags in these files, which meant a lot of rework. You can see a list of these and many other changes since 1.0.12 here.
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. Kindle and paper versions available.
User avatar
bubbathegimp
Registered User
Posts: 159
Joined: Tue Sep 25, 2018 8:02 pm
Location: Off Plumb
Name: Bubba
Contact:

Re: [3.3][RC] Filter by country - version 1.0.13

Post by bubbathegimp »

The link on your page wants to download 1.0.12. The Github link is working :D
Beans: Because just saying we need to socially distance doesn't always work....
User avatar
MarkDHamill
Registered User
Posts: 4211
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: [3.3][RC] Filter by country - version 1.0.13

Post by MarkDHamill »

Thanks. Thought I had done that. Fixed now.
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. Kindle and paper versions available.
User avatar
stone23
Registered User
Posts: 24
Joined: Sat Nov 02, 2019 4:44 pm
Location: France
Contact:

Re: [3.3][RC] Filter by country - version 1.0.13

Post by stone23 »

Hello,
I have this message that appears:
[phpBB Debug] PHP Warning: in file [ROOT]/ext/phpbbservices/filterbycountry/event/main_listener.php on line 359: count(): Parameter must be an array or an object that implements Countable
Could you have a regard, please ?
User avatar
MarkDHamill
Registered User
Posts: 4211
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: [3.3][RC] Filter by country - version 1.0.13

Post by MarkDHamill »

Thanks for reporting this. Try changing the line to:

Code: Select all

		if (isset($insert_sql_ary) && count($insert_sql_ary) > 0)
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. Kindle and paper versions available.
User avatar
stone23
Registered User
Posts: 24
Joined: Sat Nov 02, 2019 4:44 pm
Location: France
Contact:

Re: [3.3][RC] Filter by country - version 1.0.13

Post by stone23 »

It's OK.
Thanks.
Post Reply

Return to “Extensions in Development”