|
|
Re:IP Address...
|
|
Date: 2006/06/16 03:00
|
By: silexian
|
Status: User
|
|
|
Karma: -2023  
|
|
Senior Joomlapolitan  | Posts: 93 |   | |
|
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: | "SELECT DISTINCT userip FROM jos_comprofiler_plug_iplog WHERE userid='62' ORDER BY logdate ASC
LIMIT 0, 3"
|
i don't think the userid is a varchar, so the ' are useless ?
Then there's a bug line 129
| Code: | # Detect users IP - unless is admin and no admin log settings enabled
if (!$iplogNoAdminLog AND $admin) { } else { $this->detectUserIp($user, $iplogDetect, $iplogLogIp); }
|
$admin does not exist. $is_admin, yes.
Then | Code: | $is_admin = (strtolower($my->usertype) == 'administrator' || strtolower($my->usertype) == 'super administrator');
|
correct it to (better)
| Code: | $is_admin = (strtolower($my->usertype) == 'administrator') || (strtolower($my->usertype) == 'super administrator');
|
Then, i never verify | Code: | if ($iplogDetect=="0" AND $my->id==$user) { // Visiting own profile only!
| and | Code: | else if ($iplogDetect=="1"«») { // Visiting any profile!
|
with my config
Then, modify | Code: | if ($iplogDetect=="0" AND $my->id==$user) { // Visiting own profile only!
| with | Code: | if (($iplogDetect=="0"«») AND ($my->id==$user)) { // Visiting own profile only!
|
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: | "SELECT DISTINCT userip FROM jos_comprofiler_plug_iplog WHERE userid='62' ORDER BY logdate ASC
LIMIT 0, 3"
|
i don't think the userid is a varchar, so the ' are useless ?
Then there's a bug line 129
| Code: | # Detect users IP - unless is admin and no admin log settings enabled
if (!$iplogNoAdminLog AND $admin) { } else { $this->detectUserIp($user, $iplogDetect, $iplogLogIp); }
|
$admin does not exist. $is_admin, yes.
Then | Code: | $is_admin = (strtolower($my->usertype) == 'administrator' || strtolower($my->usertype) == 'super administrator');
|
correct it to (better)
| Code: | $is_admin = (strtolower($my->usertype) == 'administrator') || (strtolower($my->usertype) == 'super administrator');
|
Then, i never verify | Code: | if ($iplogDetect=="0" AND $my->id==$user) { // Visiting own profile only!
| and | Code: | else if ($iplogDetect=="1"«») { // Visiting any profile!
|
with my config
Then, $user in
| Code: | if (($iplogDetect=="0"«») AND ($my->id==$user)) { // Visiting own profile only!
| is an object and not a value
Then $user in | Code: | if (($iplogDetect=="0"«») AND ($my->id==$user)) { // Visiting own profile only!
| is incorrect. Must be | Code: | if (($iplogDetect=="0"«») AND ($my->id==$user->id)) { // Visiting own profile only!
|
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
|
|
The topic has been locked. |
|
|
|
Re:IP Address...
|
|
Date: 2006/06/16 03:44
|
By: silexian
|
Status: User
|
|
|
Karma: -2023  
|
|
Senior Joomlapolitan  | Posts: 93 |   | |
|
Here is the file that works ...
help me decrease my Karma ! i AM a bad boy Hurry up or i'm gonna eat your soul
|
|
The topic has been locked. |
|
|
|
Re:IP Address...
|
|
Date: 2006/06/18 20:12
|
By: Kampp
|
Status:
|
|
|
Karma: 6  
|
|
Senior Joomlapolitan  | Posts: 70 |   | |
|
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!!!!
Cheers, Kampp
Post edited by: Kampp, at: 2006/06/18 14:17 Creator of the CB plugins: "User IP log" and "Public Mail" Joomla! services/coding: http://www.toolmaster.dk
|
|
The topic has been locked. |
|
|
|
|
Re:IP Address...
|
|
Date: 2006/06/20 08:05
|
By: joomladude
|
Status: User
|
|
|
Karma: -3  
|
|
Senior Joomlapolitan  | Posts: 74 |   | |
|
Good job bro. You are THA BEST!
|
|
The topic has been locked. |
|
|
|
Re:IP Address...
|
|
Date: 2006/06/20 19:25
|
By: silexian
|
Status: User
|
|
|
Karma: -2023  
|
|
Senior Joomlapolitan  | Posts: 93 |   | |
|
Hi Kampp
there's 1 difference between the file iplog.php, (mine & yours)
mine is
| Code: | if (($iplogDetect=="0"«») AND ($my->id==$user<span style="color: #FF0000">->id</span>)) { // Visiting own profile only!
|
and yours is
| Code: | if (($iplogDetect=="0"«») AND ($my->id==$user)) { // Visiting own profile only!
|
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
|
|
The topic has been locked. |
|
|
|
Re:IP Address...
|
|
Date: 2006/07/25 20:55
|
By: Kampp
|
Status:
|
|
|
Karma: 6  
|
|
Senior Joomlapolitan  | Posts: 70 |   | |
|
The plugin is now available in the download section! Creator of the CB plugins: "User IP log" and "Public Mail" Joomla! services/coding: http://www.toolmaster.dk
|
|
The topic has been locked. |
|
|