Country Flags by IP Address [Deleted]

XF 1.4

After the update from 1.0.9 to 1.1.0 I get this error on the forum en can't login in admin.php.

Server ERROR

  1. Countryflags\Db\Reader->__construct() in Snog/CountryFlags/Listener/Visitor.php at line 69
  2. Snog_CountryFlags_Listener_Visitor::visitor()
  3. call_user_func_array() in XenForo/CodeEvent.php at line 90
  4. XenForo_CodeEvent::fire() in XenForo/Visitor.php at line 469
  5. XenForo_Visitor::setup() in XenForo/Session.php at line 274
  6. XenForo_Session::startPublicSession() in XenForo/Controller.php at line 291
  7. XenForo_Controller->_setupSession() in XenForo/Controller.php at line 304
  8. XenForo_Controller->preDispatch() in XenForo/FrontController.php at line 346
  9. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
  10. XenForo_FrontController->run() in /var/www/html/index.php at line 13
That part of the code hasn't changed and shouldn't be throwing an error.

Be sure that you uploaded all of the files to the proper area on your server. And be sure the GeoLite2-Country.mmdb file exists in data/countryflags.

If you did, edit your library/config.php file and add this:

Code:
$config['enableListeners'] = false;

You should then be able to log in and disable the add-on. And you can then comment out or remove that line from your config file.

If there's an error shown in the admin area, I would need to see the entire error as it's listed there.
 
Thank you very much for your info and help !!!

I did what you said, and the forum now works perfectly again!
Thank you so much for the quick service :)
 
@Snog, how do I add a class to the <img> in the messageUserBlock please?
Can't find a template modification or a template.
I want to add a class and then add css to move the flag to a relative position so it overlays the avatar.
Thanks
 
@Snog, how do I add a class to the <img> in the messageUserBlock please?
Can't find a template modification or a template.
I want to add a class and then add css to move the flag to a relative position so it overlays the avatar.
Thanks
The template name is snog_countryflag and the css is snog_flags.css

There are also 3 template modifications to the message_user_info template..
tempmods.webp
 
Last edited:
The template name is snog_countryflag and the css is snog_flags.css

There are also 3 template modifications to the message_user_info template..
View attachment 89911
Thank you. Can I request that another class is added to the image in message_user_info for the flag below user name in posts so that I can add css to move it up to overlay their avatar a bit?
Or maybe also have an option to display it over the avatar?
 
Thank you. Can I request that another class is added to the image in message_user_info for the flag below user name in posts so that I can add css to move it up to overlay their avatar a bit?
Or maybe also have an option to display it over the avatar?
I thought that's what you needed the info for so you could do it yourself.

I'll add this to the wish list for this add-on, but there's no guarantee when it will be done.
 
Hi Snog
I'd like to say, nice add-on.
Just a quick question though... is this flag meant to be visible only for my account?

what I mean is, I can see my country flag in my postbit, but I cannot see other members' flag.

I tried to setup a new user account to test, and I can see this new user account flag but cannot see others' flag.

Is that how this work? or do I miss something?
 
Hi Snog
I'd like to say, nice add-on.
Just a quick question though... is this flag meant to be visible only for my account?

what I mean is, I can see my country flag in my postbit, but I cannot see other members' flag.

I tried to setup a new user account to test, and I can see this new user account flag but cannot see others' flag.

Is that how this work? or do I miss something?
Flags do not show up until the user logs into the site. So everyone's flag won't exist until the next time they log in.
 
just curious, could you put in an option to turn off the display of a flag per user? 90% of my users love it, but 10% like to gripe about it a lot so it would save me some headache if that was an option. otherwise, awesome plugin, thank you so much for your work!
 
@Snog would it be difficult to show flags in the thread list?
Also might it be better for the database if the country of each member were saved in the database against their account? Would that help with caching?
I ask because I would like to use members' country information to filter threads by country.
 
Top Bottom