[ABD] TULIP: Tiny User Locator by IP

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
Locked
User avatar
katib
Registered User
Posts: 562
Joined: Thu Jun 26, 2008 12:27 pm

Re: [DEV] TULIP: Tiny User Locator by IP

Post by katib »

Ok
I will try use the fuction_tulip.php file again, purging the cache,etc...
maybe you remember, that I am using the geoip function in functions.php file for Online user function
Probablly, this explain why ACP pages are checking for geoip files, thought it didnot display any flag
User avatar
dpaanlka
Registered User
Posts: 286
Joined: Wed May 10, 2006 6:48 pm
Location: Chicago, USA
Contact:

Re: [DEV] TULIP: Tiny User Locator by IP

Post by dpaanlka »

katib wrote:Ok
I will try use the fuction_tulip.php file again, purging the cache,etc...
maybe you remember, that I am using the geoip function in functions.php file for Online user function
Probablly, this explain why ACP pages are checking for geoip files, thought it didnot display any flag
Remove the TULIP functions from functions.php, but keep the modifications to online user list function... then above the line edited for displaying flags in the online user list in functions.php, add this line:

Code: Select all

include_once($phpbb_root_path . 'includes/functions_tulip.php');
So the whole online user block should look like this:

Code: Select all

					include_once($phpbb_root_path . 'includes/functions_tulip.php');
					$user_online_link = '<img src="./flags/' . iptocountry($row['user_id']) . '.gif"> ' . get_username_string(($row['user_type'] <> USER_IGNORE) ? 'full' : 'no_profile', $row['user_id'], $row['username'], $row['user_colour']);
					$online_userlist .= ($online_userlist != '') ? ', ' . $user_online_link : $user_online_link;
Works on my demo board.
I am a Chicago trance DJ and in my humble opinion I play the best trance music in Chicago :D
User avatar
katib
Registered User
Posts: 562
Joined: Thu Jun 26, 2008 12:27 pm

Re: [DEV] TULIP: Tiny User Locator by IP

Post by katib »

Thanks
It is working proprely now with functions_tulip.php
But I had to include it earlier in fubnctions.php, just before:

Code: Select all

/**
* Check for read forums and update topic tracking info accordingly
User avatar
Marcus Wendel
Registered User
Posts: 534
Joined: Sun Mar 10, 2002 5:58 pm
Location: Sweden
Contact:

Re: [DEV] TULIP: Tiny User Locator by IP

Post by Marcus Wendel »

This nice mod appears to run fine and it was very easy to install but the problem is that it shows up with the UN flag (or a transparent image in my case) for all the members who signed up before we moved to phpBB3 and since two of my forums have been running phpBB since 2002 and one since 2004 that is a lot of users without flags.
Perhaps it would be possible to create a script to populate the registration ip-address with the one from the first post to correct this issue?

/Marcus
mtrs
Registered User
Posts: 2049
Joined: Sat Sep 22, 2007 2:39 pm

Re: [DEV] TULIP: Tiny User Locator by IP

Post by mtrs »

Marcus Wendel wrote:Perhaps it would be possible to create a script to populate the registration ip-address with the one from the first post to correct this issue?
This post http://www.phpbb.com/community/viewtopi ... 5#p9474635 have a script to populate user_ip value with IPs from users' first post IP.
I abandoned all of my mods.
User avatar
Marcus Wendel
Registered User
Posts: 534
Joined: Sun Mar 10, 2002 5:58 pm
Location: Sweden
Contact:

Re: [DEV] TULIP: Tiny User Locator by IP

Post by Marcus Wendel »

mtrs wrote:
Marcus Wendel wrote:Perhaps it would be possible to create a script to populate the registration ip-address with the one from the first post to correct this issue?
This post http://www.phpbb.com/community/viewtopi ... 5#p9474635 have a script to populate user_ip value with IPs from users' first post IP.
Thanks but what does need to be changed in it to work within this mod instead of in the memberslist?

/Marcus
User avatar
dpaanlka
Registered User
Posts: 286
Joined: Wed May 10, 2006 6:48 pm
Location: Chicago, USA
Contact:

Re: [DEV] TULIP: Tiny User Locator by IP

Post by dpaanlka »

Marcus Wendel wrote:
mtrs wrote:
Marcus Wendel wrote:Perhaps it would be possible to create a script to populate the registration ip-address with the one from the first post to correct this issue?
This post http://www.phpbb.com/community/viewtopi ... 5#p9474635 have a script to populate user_ip value with IPs from users' first post IP.
Thanks but what does need to be changed in it to work within this mod instead of in the memberslist?

/Marcus
That script checks for the existance of user_ip, and if it doens't exist, pulls the ip address directly from the user's first post in the board.

What should be done instead is, write a script to run once, checking all registered users in the users table for a mising user_ip, and if missing fill it in with that of their first post. Something like that shouldn't be too hard to write.

Then you just run it once and there won't be unnecessary lookups in the database every time a flag is generated. I can look into this a little bit later if nobody takes it up in the meantime.

EDIT: Or, this script could, upon finding a non-existant user_ip field, find the user_ip in this manner and then populate the database for future use.
I am a Chicago trance DJ and in my humble opinion I play the best trance music in Chicago :D
User avatar
Marcus Wendel
Registered User
Posts: 534
Joined: Sun Mar 10, 2002 5:58 pm
Location: Sweden
Contact:

Re: [DEV] TULIP: Tiny User Locator by IP

Post by Marcus Wendel »

dpaanlka wrote:EDIT: Or, this script could, upon finding a non-existant user_ip field, find the user_ip in this manner and then populate the database for future use.
I think that would be the ideal solution, unfortunately I have no php coding skills so I hope someone can help with that.

/Marcus
mtrs
Registered User
Posts: 2049
Joined: Sat Sep 22, 2007 2:39 pm

Re: [DEV] TULIP: Tiny User Locator by IP

Post by mtrs »

Marcus Wendel wrote:Thanks but what does need to be changed in it to work within this mod instead of in the memberslist?

/Marcus
Of course, you should prefer only a one time code run and update all users data. Having said that, the code, I gave a link of, is a simple example. It updates an unset IP number once the profile of a user is clicked. Database query is run only once.
I abandoned all of my mods.
User avatar
katib
Registered User
Posts: 562
Joined: Thu Jun 26, 2008 12:27 pm

Re: [DEV] TULIP: Tiny User Locator by IP

Post by katib »

Hi dpaanlka
dpaanlka wrote: Since installing it I've seen many interesting countries on my board, including China, Australia, Trinidad & Tobago, Thailand, Ukraine, Canada, Japan, the UK, and others! It's nice to see how international your board is!
Do you mean members or just guests ?
Anyway, how can I display flags of online guests too ?
like this board:
Image
User avatar
dpaanlka
Registered User
Posts: 286
Joined: Wed May 10, 2006 6:48 pm
Location: Chicago, USA
Contact:

Re: [DEV] TULIP: Tiny User Locator by IP

Post by dpaanlka »

katib wrote:Hi dpaanlka
dpaanlka wrote: Since installing it I've seen many interesting countries on my board, including China, Australia, Trinidad & Tobago, Thailand, Ukraine, Canada, Japan, the UK, and others! It's nice to see how international your board is!
Do you mean members or just guests ?
Anyway, how can I display flags of online guests too ?
like this board:
Image
Is that part of phpBB? I can't find that anywhere.
I am a Chicago trance DJ and in my humble opinion I play the best trance music in Chicago :D
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Re: [DEV] TULIP: Tiny User Locator by IP

Post by 3Di »

dpaanlka wrote:
katib wrote:Hi dpaanlka
dpaanlka wrote: Since installing it I've seen many interesting countries on my board, including China, Australia, Trinidad & Tobago, Thailand, Ukraine, Canada, Japan, the UK, and others! It's nice to see how international your board is!
Do you mean members or just guests ?
Anyway, how can I display flags of online guests too ?
like this board:
Image
Is that part of phpBB? I can't find that anywhere.
It is a part of my MOD: http://gold.io3di.com/index.php ;)
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
User avatar
katib
Registered User
Posts: 562
Joined: Thu Jun 26, 2008 12:27 pm

Re: [DEV] TULIP: Tiny User Locator by IP

Post by katib »

3Di wrote: It is a part of my MOD: http://gold.io3di.com/index.php ;)
Yes you are right
However you did say here:
http://gold.io3di.com/viewtopic.php?p=684#p684
This version has been tested and runs only on phpBB 3.0.4 though.
So I wonder, is there any one still using 3.0.4 ?
By the way, Your board looks very nice ;)
User avatar
dpaanlka
Registered User
Posts: 286
Joined: Wed May 10, 2006 6:48 pm
Location: Chicago, USA
Contact:

Re: [DEV] TULIP: Tiny User Locator by IP

Post by dpaanlka »

3Di wrote:
dpaanlka wrote:Is that part of phpBB? I can't find that anywhere.
It is a part of my MOD: http://gold.io3di.com/index.php ;)
Well then I guess I'll have to write it into my MOD. Just making sure it wasn't already part of phpBB.

I'm assuming phpBB maintains a list of the last IPs to have visited the board in the past however many minutes? If so this shouldn't be that hard to implement.
I am a Chicago trance DJ and in my humble opinion I play the best trance music in Chicago :D
User avatar
katib
Registered User
Posts: 562
Joined: Thu Jun 26, 2008 12:27 pm

Re: [DEV] TULIP: Tiny User Locator by IP

Post by katib »

dpaanlka wrote:Is that part of phpBB? I can't find that anywhere.
No, but a list of online guests along with theire IPs is availabe for Moderators and admins at:
yoursite.com/viewonline.php?sg=1
Locked

Return to “[3.0.x] Abandoned MODs”