IP Address...

17 years 10 months ago #15385 by silexian
Replied by silexian on topic Re:IP Address...
i did not get that warning due to my ERROR_REPORTING level (set to NONE)...

Well, i'm trying to debug.

First, on line 24 [code:1]"SELECT DISTINCT userip FROM jos_comprofiler_plug_iplog WHERE userid='62' ORDER BY logdate ASC LIMIT 0, 3"[/code:1]

i don't think the userid is a varchar, so the ' are useless ?

Then there's a bug line 129
[code:1] # Detect users IP - unless is admin and no admin log settings enabled

if (!$iplogNoAdminLog AND $admin) { } else { $this->detectUserIp($user, $iplogDetect, $iplogLogIp); }[/code:1]

$admin does not exist. $is_admin, yes.

Then [code:1]$is_admin = (strtolower($my->usertype) == 'administrator' || strtolower($my->usertype) == 'super administrator');
[/code:1]
correct it to (better)
[code:1]$is_admin = (strtolower($my->usertype) == 'administrator') || (strtolower($my->usertype) == 'super administrator');[/code:1]

Then, i never verify [code:1]if ($iplogDetect=="0" AND $my->id==$user) { // Visiting own profile only![/code:1] and [code:1]else if ($iplogDetect=="1"«») { // Visiting any profile![/code:1]

with my config

Then, modify [code:1]if ($iplogDetect=="0" AND $my->id==$user) { // Visiting own profile only![/code:1] with [code:1]if (($iplogDetect=="0"«») AND ($my->id==$user)) { // Visiting own profile only![/code:1]
it's better to set explicit priorities

Then i did not get that warning due to my ERROR_REPORTING level (set to NONE)...

Well, i'm trying to debug.

First, on line 24 [code:1]"SELECT DISTINCT userip FROM jos_comprofiler_plug_iplog WHERE userid='62' ORDER BY logdate ASC LIMIT 0, 3"[/code:1]

i don't think the userid is a varchar, so the ' are useless ?

Then there's a bug line 129
[code:1] # Detect users IP - unless is admin and no admin log settings enabled

if (!$iplogNoAdminLog AND $admin) { } else { $this->detectUserIp($user, $iplogDetect, $iplogLogIp); }[/code:1]

$admin does not exist. $is_admin, yes.

Then [code:1]$is_admin = (strtolower($my->usertype) == 'administrator' || strtolower($my->usertype) == 'super administrator');
[/code:1]
correct it to (better)
[code:1]$is_admin = (strtolower($my->usertype) == 'administrator') || (strtolower($my->usertype) == 'super administrator');[/code:1]

Then, i never verify [code:1]if ($iplogDetect=="0" AND $my->id==$user) { // Visiting own profile only![/code:1] and [code:1]else if ($iplogDetect=="1"«») { // Visiting any profile![/code:1]

with my config

Then, $user in
[code:1]if (($iplogDetect=="0"«») AND ($my->id==$user)) { // Visiting own profile only![/code:1] is an object and not a value

Then $user in [code:1]if (($iplogDetect=="0"«») AND ($my->id==$user)) { // Visiting own profile only![/code:1] is incorrect. Must be [code:1]if (($iplogDetect=="0"«») AND ($my->id==$user->id)) { // Visiting own profile only![/code:1]

Post edited by: silexian, at: 2006/06/15 21:30

Okay ... I made some modification ...
and now, with my config, it works !

Post edited by: silexian, at: 2006/06/15 21:43

help me decrease my Karma ! i AM a bad boy ;) Hurry up or i'm gonna eat your soul :p
Attachments:

Please Log in to join the conversation.

17 years 10 months ago #15386 by silexian
Replied by silexian on topic Re:IP Address...
Here is the file that works ...

Attachment iplog_ok.zip not found


help me decrease my Karma ! i AM a bad boy ;) Hurry up or i'm gonna eat your soul :p
Attachments:

Please Log in to join the conversation.

17 years 10 months ago #15531 by Kampp
Replied by Kampp on topic Re:IP Address...
Here is a new compilation that fixes the install/uninstall bug and some of the the suggestions from silexian.

This will also be added to the CB download archive - if I just knew how to do so!!!! :kiss:

Cheers, Kampp

Attachment cb_iplog-f9c5ce551419f3c322c9e58fe1a3eae6.zip not found



Post edited by: Kampp, at: 2006/06/18 14:17

Creator of the CB plugins: "User IP log" and "Public Mail"
Joomla! services/coding: www.toolmaster.dk
Joomla! services/coding: joomla-konsulent.dk
Danish Joomla! hosting: www.joomla-hosting.dk
Attachments:

Please Log in to join the conversation.

17 years 10 months ago #15652 by joomladude
Replied by joomladude on topic Re:IP Address...
Good job bro. You are THA BEST! :woohoo:

Please Log in to join the conversation.

17 years 10 months ago #15680 by silexian
Replied by silexian on topic Re:IP Address...
Hi Kampp

there's 1 difference between the file iplog.php, (mine & yours)

mine is

[code:1]if (($iplogDetect=="0"«») AND ($my->id==$user->id)) { // Visiting own profile only![/code:1]

and yours is

[code:1]if (($iplogDetect=="0"«») AND ($my->id==$user)) { // Visiting own profile only![/code:1]

if i remember, $user is an object. But, i don't have time to verify it. May you confirm or infirm that ?

Silexian

help me decrease my Karma ! i AM a bad boy ;) Hurry up or i'm gonna eat your soul :p

Please Log in to join the conversation.

17 years 9 months ago #17615 by Kampp
Replied by Kampp on topic Re:IP Address...
The plugin is now available in the download section!

Creator of the CB plugins: "User IP log" and "Public Mail"
Joomla! services/coding: www.toolmaster.dk
Joomla! services/coding: joomla-konsulent.dk
Danish Joomla! hosting: www.joomla-hosting.dk

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.255 seconds

Facebook Twitter LinkedIn