| 
Welcome, Guest

IP Address...
(1 viewing) (1) Guest

TOPIC: IP Address...

Re:IP Address... 5 years, 11 months ago #15385

  • silexian
  • silexian
  • OFFLINE
  • Expert Boarder
    Expert Boarder
  • Posts: 94
  • Karma: -2032
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
"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
		# 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
$is_admin = (strtolower($my->usertype) == 'administrator' || strtolower($my->usertype) == 'super administrator');
 

correct it to (better)
$is_admin = (strtolower($my->usertype) == 'administrator') || (strtolower($my->usertype) == 'super administrator');


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


with my config

Then, modify
if ($iplogDetect=="0" AND $my->id==$user) { // Visiting own profile only!
with
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
"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
		# 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
$is_admin = (strtolower($my->usertype) == 'administrator' || strtolower($my->usertype) == 'super administrator');
 

correct it to (better)
$is_admin = (strtolower($my->usertype) == 'administrator') || (strtolower($my->usertype) == 'super administrator');


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


with my config

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

Then $user in
if (($iplogDetect=="0"«») AND ($my->id==$user)) { // Visiting own profile only!
is incorrect. Must be
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
Attachments:
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... 5 years, 11 months ago #15386

  • silexian
  • silexian
  • OFFLINE
  • Expert Boarder
    Expert Boarder
  • Posts: 94
  • Karma: -2032
Here is the file that works ...

Attachment iplog_ok.zip not found

Attachments:
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... 5 years, 11 months ago #15531

  • Kampp
  • Kampp
  • OFFLINE
  • Expert Boarder
    Expert Boarder
  • Posts: 85
  • Karma: 8
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

Attachment cb_iplog-f9c5ce551419f3c322c9e58fe1a3eae6.zip not found



Post edited by: Kampp, at: 2006/06/18 14:17
Attachments:
Creator of the CB plugins: "User IP log" and "Public Mail"
Joomla! services/coding: www.toolmaster.dk
The topic has been locked.

Re:IP Address... 5 years, 11 months ago #15652

  • joomladude
  • joomladude
  • OFFLINE
  • Senior Boarder
    Senior Boarder
  • Posts: 73
  • Karma: -3
Good job bro. You are THA BEST!
The topic has been locked.

Re:IP Address... 5 years, 11 months ago #15680

  • silexian
  • silexian
  • OFFLINE
  • Expert Boarder
    Expert Boarder
  • Posts: 94
  • Karma: -2032
Hi Kampp

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

mine is

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


and yours is

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... 5 years, 10 months ago #17615

  • Kampp
  • Kampp
  • OFFLINE
  • Expert Boarder
    Expert Boarder
  • Posts: 85
  • Karma: 8
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
The topic has been locked.
Time to create page: 2.50 seconds