MyBB Community Forums

Full Version: IP-based Country Flag in postbit for mybb 1.4, 1.6, 1.8
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Another update of one of my 1.4 plugins.
Add user country flag in PostBit based on user IP.
How to install:

Copy the file ipcountry.php in: /inc/plugins folder
Copy the folder flags and all the files in it in the /images folder
Install and activate from AdminCP
The test site: http://www.ignea.ro
The download or from this site: https://community.mybb.com/mods.php?acti...w&pid=1167 or from the test site
The license: http://www.ignea.ro/license.php
The plugin is free.
Thank you, another cool and useful plugin!

I sent you a PM with my feature request, I will add there a copy of it Smile

- add a custom variable in template to load it
- add a custom template to modify it via ACP
- add a template for every theme to use different style
- Czech republic is not working - we are now Czechia (and Czech Republic) - I dont know why they changed it, it is stupid but both names are correct so it must be solved by adding antoehr flag and name it Czechia.
- can you use png images for flags?
- add a support to show flag in member profile page
- caching of data
A new version is uploaded.
What is changed: the country flags to reflect the new names of countries and the new countries.
The script had to change too because I am using now .png image files.
Please, upload all the files to their respective folders. Ideal will be before uploading the flags folder to delete the old one, if you don't do it will still work.
Thank you - Czechia and Czech Republic - both are offcial names and are correct, bt Geo library displays our country as Czechia so the flag was missing.

Can you add a support for member profile page too? For template variable which I wrote you about in my last PM - I mean something like adding {ipflag} into postbit classic template without a need to edit plugin file.

What about caching? Is it efficient?
(2018-09-30, 03:22 PM)Eldenroot Wrote: [ -> ]Thank you - Czechia and Czech Republic - both are offcial names and are correct, bt Geo library displays our country as Czechia so the flag was missing.

Can you add a support for member profile page too? For template variable which I wrote you about in my last PM - I mean something like adding {ipflag} into postbit classic template without a need to edit plugin file.

What about caching? Is it efficient?

I am working on the member profile, I will update the plugin when I am done with it. I will also add the city of the user (neath eh?)
OK I will add a variable so any template can be modified, I will see if I can make it selectable from AdminCP so who want to use it can use it. I wanted to use a general template, this will help when you upgrade your myBB without having any leftovers from different plugins. I saw a lot of issues upgrading myBB and having templates with changes embedded by different plugins (one of them is one of the multiple "Thanks" plugins).

Again, I update the plugin to show also de user city. to update you only need to copy the ipcountry.php file over the existing one. The file is attached to this message
good job i think you should create a thread in Plugin Releases
and your extend page with support pointing to the thread that you have created in Plugin Releases
btw what is the purpose of Add Bot
(2018-10-01, 07:13 AM)8guawong Wrote: [ -> ]good job i think you should create a thread in Plugin Releases
and your extend page with support pointing to the thread that you have created in Plugin Releases
btw what is the purpose of Add Bot

The threads where created days ago. 

Add npt? easy... if you will ever have a hide from... (guests/users) plugin you will want bots to still see your forum so it will be indexed.

I have added the flag and the city in the member profile.
you can see it here:
http://www.ignea.ro/member.php?action=profile&uid=2
I attached the updated file. 
to make it work:
Deactivate the plugin from AdminCP
overwrite the file
Activate the plugin
Enjoy
Nice good job, anyway I am still missing template variable for postbit... you inject it directly via php, but it is difficult to customize Sad
Tried it but it said everyone was from the US and St Petersburg which I know is not correct. Am I doing something wrong?
City is based on your internet provider, not accurate at all... thats why you should use only country flag
Pages: 1 2