1
bestToolXoop
database problem : user_icq must be shorter than 15 characters.

Hi all ,

i follow a lead here try to change as it say
below : i add up user_icq and user_aim in MySQL yet it still tell me this error when i try to edit my account ..
( i already change it to 100 for both )

--->user_icq must be shorter than 15 characters.
---->user_aim must be shorter than 18 characters.

https://xoops.org/modules/newbb/viewtopic.php?topic_id=20250&forum=27

1. In ../language/english/user.php change

define('_US_ICQ','Organisation');
define('_US_AIM','Department');
define('_US_YIM','Address');
define('_US_MSNM','City');
define('_US_LOCATION','County');
define('_US_OCCUPATION','Post Code');
define('_US_INTEREST','Phone');

2. In .. /modules/system/language/english/admin
users.php
findusers.php

change
define("_AM_ICQ","Organisation");
define("_AM_AIM","Department");
define("_AM_YIM","Address");
define("_AM_MSNM","City");
define("_AM_LOCATION","County");
define("_AM_OCCUPATION","Postcode");
define("_AM_INTEREST","Phone");

3. In ../user.php

define('_US_ICQ','Organisation');
define('_US_AIM','Department');
define('_US_YIM','Address');
define('_US_MSNM','City');
define('_US_LOCATION','County');
define('_US_OCCUPATION','Post Code');
define('_US_INTEREST','Phone');

4. in ../edituser.php

Find
if ($op == 'editprofile') {

About 23 lines after this, a line begins $icq_text
From (and including) that line, change the first and second number in brackets to increase the size of the text box appearing for users (I have used 40, 100 as default for all).

5. In MySQL, in xoops_users edit the field size to 100 (or whatever you set at maximum in 4 above) for ICQ, AIM, YIM etc. that you have amended (to allow for more text to be entered)

2
ackbarr
Re: database problem : user_icq must be shorter than 15 characters.

you will also need to modify /kernel/user.php

$this->initVar('user_icq'XOBJ_DTYPE_TXTBOXnullfalse15);

The above line creates a new variable in the XoopsUser object with the following settings:

name: user_icq
type: XOBJ_DTYPE_TXTBOX (textbox)
default value: null (empty)
required: false
length: 15

So to use your new db lengths you need to modify that line to:
$this->initVar('user_icq'XOBJ_DTYPE_TXTBOXnullfalse, [color=008000][b]100[/b][/color]);


You'll need to make a similar change to the line for 'user_aim'

3
bestToolXoop
Re: database problem : user_icq must be shorter than 15 characters.

tq bro, it work like a charm = )

Login

Who's Online

130 user(s) are online (62 user(s) are browsing Support Forums)


Members: 0


Guests: 130


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits