IP-based Country Flag in postbit for mybb 1.4, 1.6, 1.8
#1
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.
Reply
#2
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
[MyBB 1.8 Czech translation] [MyBB 1.8 plugins]: Prune old PMs + optimize DB plugin --- Thank you/like system
Reply
#3
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.
Reply
#4
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?
[MyBB 1.8 Czech translation] [MyBB 1.8 plugins]: Prune old PMs + optimize DB plugin --- Thank you/like system
Reply
#5
(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


Attached Files
.zip   ipcountry.zip (Size: 1.61 KB / Downloads: 108)
Reply
#6
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
Reply
#7
(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


Attached Files
.zip   ipcountry.zip (Size: 1.41 KB / Downloads: 103)
Reply
#8
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
[MyBB 1.8 Czech translation] [MyBB 1.8 plugins]: Prune old PMs + optimize DB plugin --- Thank you/like system
Reply
#9
Tried it but it said everyone was from the US and St Petersburg which I know is not correct. Am I doing something wrong?
Reply
#10
City is based on your internet provider, not accurate at all... thats why you should use only country flag
[MyBB 1.8 Czech translation] [MyBB 1.8 plugins]: Prune old PMs + optimize DB plugin --- Thank you/like system
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)