[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.
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 » Mon Dec 28, 2009 6:39 pm

eeji wrote:I think the biggest problem I have is the DB is an import from phpBB2 which mustn't have recorded user ips so theres lots missing
I had the same problem so I adopted the solution I wrote about in the post at http://www.phpbb.com/community/viewtopi ... #p11110905

/Marcus

User avatar
eeji
Jr. Style Validator
Posts: 1074
Joined: Fri Dec 12, 2008 9:08 pm
Location: Manchester, UK
Contact:

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

Post by eeji » Mon Dec 28, 2009 8:28 pm

then after adding the relevent code, i would need to visit the site memberlist, then remove the code? (just need to get this correct before trashing the site! :) )

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 » Tue Dec 29, 2009 7:02 am

eeji wrote:then after adding the relevent code, i would need to visit the site memberlist, then remove the code? (just need to get this correct before trashing the site! :) )
You copy the memberlist.php to a new file (for example fix-ip.php) and make the changes, then you visit the new file to add ip-addresses, when that is done you can delete the file. No changes necessary to the standard files in your forum.

/Marcus

User avatar
eeji
Jr. Style Validator
Posts: 1074
Joined: Fri Dec 12, 2008 9:08 pm
Location: Manchester, UK
Contact:

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

Post by eeji » Tue Dec 29, 2009 1:48 pm

cool, thanks :)

**edit - just tried your suggestion and it worked a treat, thanks :)

neonshares
Registered User
Posts: 138
Joined: Thu May 21, 2009 1:31 am

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

Post by neonshares » Sat Jan 09, 2010 3:22 pm

how to insert the country flag and name field in the username profile page, memberslist page and UCP -> Profile pages?

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 » Sat Jan 16, 2010 7:24 pm

neonshares wrote:how to insert the country flag and name field in the username profile page, memberslist page and UCP -> Profile pages?
Good question. I'm going to go through this entire thread and clean up the mod and add extra pages in the next day or so. I've had to put TULIP on the back-burner for awhile but I see some competent persons have expanded upon the mod a bit since I was last here.
phpBB user and evangelist since 2005.
My boards: Info-Mac | System 7 Today

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 » Mon Jan 18, 2010 10:27 am

dpaanlka wrote:You can also add this wherever you want the full name of the country to appear, such as in the above image's ALT tag:

Code: Select all

{postrow.POSTER_COUNTRY_FULL}
So you would in the ALT tag example end up with this line:

Code: Select all

<img src="./flags/{postrow.POSTER_COUNTRY}.gif" alt="{postrow.POSTER_COUNTRY_FULL}">
If you add the title-tag to the end of that code the name will show up when you place the pointed over the flag also in browsers such as Firefox and Opera.

Code: Select all

<img src="./flags/{postrow.POSTER_COUNTRY}.gif" alt="{postrow.POSTER_COUNTRY_FULL}" title="{postrow.POSTER_COUNTRY_FULL}">
/Marcus

neonshares
Registered User
Posts: 138
Joined: Thu May 21, 2009 1:31 am

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

Post by neonshares » Tue Jan 19, 2010 10:07 pm

Thank you very much dpaanlka . Now i added this in memberlist and view user profile pages too. Looking cool. Thanks alot.

User avatar
eeji
Jr. Style Validator
Posts: 1074
Joined: Fri Dec 12, 2008 9:08 pm
Location: Manchester, UK
Contact:

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

Post by eeji » Tue Feb 23, 2010 7:24 pm

for anyone interested I found a free set of 246 flag images .gif format, all named with the 2 letter ISO codes here: http://famfamfam.com/lab/icons/flags/
neonshares wrote:Thank you very much dpaanlka . Now i added this in memberlist and view user profile pages too. Looking cool. Thanks alot.
can you share the file edits you made to make this work please?

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 » Wed Feb 24, 2010 4:17 pm

Hey everyone, I just noticed the download link was broken, probably when I shuffled some server stuff around a few days ago. Sorry, it has now been fixed.
eeji wrote:for anyone interested I found a free set of 246 flag images .gif format, all named with the 2 letter ISO codes here: http://famfamfam.com/lab/icons/flags/
Thanks, these look pretty great. I notice, though, that only 246 as opposed to the 256 in my package. Some must be missing, perhaps best to combine rather than replace the flags directory with these new ones.
phpBB user and evangelist since 2005.
My boards: Info-Mac | System 7 Today

Sheldon469
Registered User
Posts: 128
Joined: Wed Jan 28, 2004 2:32 am
Location: USA
Contact:

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

Post by Sheldon469 » Fri Mar 19, 2010 3:32 am

subscribing...

User avatar
^[GS]^
Registered User
Posts: 274
Joined: Sun Aug 06, 2006 10:59 pm
Location: Argentina
Contact:

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

Post by ^[GS]^ » Fri Mar 19, 2010 6:19 am

Any screen?

lovelysummer
Registered User
Posts: 437
Joined: Fri Mar 20, 2009 1:49 pm

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

Post by lovelysummer » Thu Apr 01, 2010 9:57 pm

Does anybody have this flag 'international' , in what situation will this occur ?

Image

Thank you.

User avatar
eeji
Jr. Style Validator
Posts: 1074
Joined: Fri Dec 12, 2008 9:08 pm
Location: Manchester, UK
Contact:

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

Post by eeji » Fri Apr 02, 2010 12:19 pm

'International' shows when there is no ip recorded, or the ip cannot be traced. also make sure you have the latest GeoIP.dat file which is updated on the 1st of every month (details on the first page)

User avatar
Neuropass
Registered User
Posts: 1158
Joined: Fri Apr 17, 2009 2:02 pm
Location: SciTE4AutoIt3

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

Post by Neuropass » Sun May 02, 2010 3:31 pm

dpaanlka wrote:
katib wrote:Thanks for Mod
Loks quite simple and easy to install
but how about shwowing country flags on index_body.html especially at the bottom page in who is online part ?
Hey katib, go ahead and try this. It's a simple one-line edit.

Open /includes/functions.php

Find:

Code: Select all

$user_online_link = get_username_string(($row['user_type'] <> USER_IGNORE) ? 'full' : 'no_profile', $row['user_id'], $row['username'], $row['user_colour']);
Replace with:

Code: Select all

$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']);
Works for me on 3.0.5! As you can see, I simply looked for the code that generates that line, and passed the user_id to TULIP's country code function.

I can't get it to work in the index.. can you please help me mate?


I get this error when i edit the function.php

Code: Select all


Fatal error: Call to undefined function iptocountry() in /home2/newageos/public_html/includes/functions.php  on line 3814

Locked

Return to “[3.0.x] Abandoned MODs”