Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 7.6
Author Message
emma
Hangin' Around



Joined: Nov 02, 2005
Posts: 32

PostPosted: Thu Dec 22, 2005 6:57 pm Reply with quote

I just finished an install of PHP Nuke version 7.6 with the 3.1 patch.

There is only one account registered right now, (which is the admin users account).

When I log into the account and go to the YOUR INFO module,
I notice that although I have enterd nothing in the field, the YOUR ICQ field has a zero in it ('0').

I deleted it and clicked on 'save changes', but it will not go away.

Does anyone know about this? Is it a known bug?

_________________
I utilise the PHPNuke Version 7.6 software using the patch 3.1 also with the CNB 4.4.2 and NukeSentinel(tm) 2.3.2 
View user's profile Send private message
evaders99
Former Moderator in Good Standing



Joined: Apr 30, 2004
Posts: 3221

PostPosted: Thu Dec 22, 2005 10:03 pm Reply with quote

I think I see the problem

Code:


$user_icq = intval($user_icq);


The ICQ value is set to 0 because of intval, even if its empty. The existing check should also work here. Try..
Code:


if (preg_match('/^[0-9]+$/', $user_icq)) { $user_icq = intval($user_icq); }
else { $user_icq = ""; }


Haven't tested that, but it should work. I'll make sure its changed in the Patched files

_________________
- Only registered users can see links on this board! Get registered or login! -

Need help? Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
emma







PostPosted: Fri Dec 23, 2005 6:22 am Reply with quote

Hi Evaders99,

Thank you for replying to my cry for help.

I have a further small problem though...Which file should I be making the changes in?...You did not mention this.
 
evaders99







PostPosted: Fri Dec 23, 2005 2:04 pm Reply with quote

Ah sorry - modules/Your_Account/index.php

I've tested it and it seems to work just fine
 
emma







PostPosted: Sat Dec 24, 2005 7:15 am Reply with quote

Hi Evaders99,

Corect me if I am wrong, but I thought that your solution was simply to find the existing code:

$user_icq = intval($user_icq);


and replace this with the following code:

if (preg_match('/^[0-9]+$/', $user_icq)) { $user_icq = intval($user_icq); }
else { $user_icq = ""; }


...Is that correct? I did do this but the account still shows as '0' (zero) in the 'Your ICQ' field.
 
evaders99







PostPosted: Sun Dec 25, 2005 12:01 am Reply with quote

Just go and set it to empty - it should remain empty now
 
emma







PostPosted: Sun Dec 25, 2005 3:34 am Reply with quote

'set it to empty'?
 
evaders99







PostPosted: Sun Dec 25, 2005 1:55 pm Reply with quote

Blank, nothing, nothing in that field
 
emma







PostPosted: Sun Dec 25, 2005 2:17 pm Reply with quote

Ahhhh....Thank you for that dearest Evaders99 and Happy Christmas to you and all...It is now working, just as you said.
 
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 7.6

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©