[XB] Country Flags by IP Address

[XB] Country Flags by IP Address 2.2.1 Patch Level 6

No permission to download
@Ozzy47 Server error log:

Code:
ErrorException: Fatal Error: Declaration of GeoIp2\Model\City::__isset($attr) must be compatible with GeoIp2\Model\AbstractModel::__isset(string $attr): bool src/addons/Siropu/AdsManager/Vendor/MaxMind/geoip2/geoip2/src/Model/City.php:116

Generated by: Tanzu Nov 2, 2022 at 4:12 PM

Stack trace

#0 [internal function]: XF::handleFatalError()
#1 {main}

Request state

array(4) {
  ["url"] => string(11) "/whats-new/"
  ["referrer"] => bool(false)
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}

It seems that Ads Manager Lite add-on using a very old geoip2 library version to support XF < 2.1 and PHP < 7.2.

Contact Siropu and have him update to a newer version.
 
It seems that Ads Manager Lite add-on using a very old geoip2 library version to support XF < 2.1 and PHP < 7.2.

Contact Siropu and have him update to a newer version.
FYI, I contacted Siropu and the reply was it will be updated to the latest version hopefully by the end of the week.

so1.JPG
 
Can you tell me please if you I can display country flags in the admin panel for the list of users?

Thx!
 
Ozzy47, thank you for the fast reply!

Maybe you can advise with the error:

Introductions:
  • Xenforo v2.2.11
  • LiteSpeedCache WebServer is installed on the server
What I did:
  1. Created and received a new license in MaxMind
  2. Waited 3 hours according to the instruction
  3. When I trying to save the License code in the settings, I've get error: GeoLite2 Error 401: Unauthorized
Also:
  • XenForo error logs is empty
  • Apache error logs - no error's
Would appreciate any advice, thanks!
 
Last edited:
Ozzy47, thank you for the fast reply!

Maybe you can advise with the error:

Introductions:
  • Xenforo v2.2.11
  • LiteSpeedCache WebServer is installed on the server
What I did:
  1. Created and received a new license in MaxMind
  2. Waited 3 hours according to the instruction
  3. When I trying to save the License code in the settings, I've get error: GeoLite2 Error 401: Unauthorized
Also:
  • XenForo error logs is empty
  • Apache error logs - no error's
Would appreciate any advice, thanks!

@Painbaker
 
This is such a great addon! I did however experience an issue that puzzles me.

On installation, the new credentials from MaxMind were inserted, and the config was saved. I then manually ran the cron, and in dev mode, it showed the new GeoLite2 Country database date. Yea! :D It would have been even better if the flags actually appeared...

My first thought was that the addon was not working correctly, or that my theme was blocking it. I then noted the extra empty spacing where the flag sprite should appear, and wonder of wonders--showed the country name on hover. Taking a look at the thing in the inspection console, I noted that the CSS called this URL for the spritesheet:

CSS:
.flags {
    width: 25px;
    height: 15px;
    z-index: 2;
    background-image: url(]data/countryflags/flags/flag sprite.png);
    background-color: transparent;
    background-repeat: no-repeat;
}

That canonical address does not exist! Rather on my install, the PNG file is placed in the /src/addons/Snog/Flags/defaultdata/flags/ directory. That's the way it was installed. Long story short, I added this to my extra.less file:

CSS:
/* Redirect Flags spritesheet URL */

.flags {
    background-image: url(/src/addons/Snog/Flags/defaultdata/flags/flagsprite.png);
}
/****####****/

It all works like a champ now--but having to do a workaround is not a normal thing... Did I miss something on the configuration, or is there a new bug of some sort? Thoughts appreciated!

@Painbaker, it would be a very nice thing to add that MaxMind screen cap to the addon installation description here. I puzzled over that for a few minutes before finally selecting the right one. The decision was not informed--just a hunch. Thanks!
 
Last edited:
Back
Top Bottom