PDA

View Full Version : Listing field type (Phone) does not work!



PGGO
December 5, 2012, 08:32 AM
I setup a <Phone> listing field type under Admin Panel; however, it does not show up in admin panel ether in front end (see snapshot).

Vladimir
December 5, 2012, 10:10 AM
Hello,

You can fix it manually using the following sql command:



ALTER TABLE `YOUR_DB_PREFIX_listing_fields` MODIFY COLUMN `Type` ENUM('bool','text','textarea','number','date','mix ed','price','select','radio','checkbox','file','ac cept','image','phone') NOT NULL DEFAULT 'text';

PGGO
December 7, 2012, 05:00 AM
Thanks a lot! it works

Milea Ionut
January 3, 2013, 12:04 PM
How can i show the "0" number in frontend? If i create an account i can insert it but it does not appear in frontend.

Viktor
January 4, 2013, 04:34 AM
Hello Milea Ionut,

If you want show 0 in profile you should go to ftp://includes>>classes>>rlAccount.class.php
find method registration and code at line ~411:



case 'phone':
$out = '';

/* code */
if ( $fields[$poss]['Opt1'] )
{
$code = (int)substr($account[$key]['code'], 0, $fields[$poss]['Default']);
$out = 'c:'. $code .'|';
}

/* area */
$area = (int)$account[$key]['area'];
$out .= 'a:'. $area . '|';

/* number */
$number = (int)substr($account[$key]['number'], 0, $fields[$poss]['Values']);
$out .= 'n:'. $number;

/* extension */
if ( $fields[$poss]['Opt2'] )
{
$ext = (int)$account[$key]['ext'];
$out .= '|e:'. $ext;
}

$data2['fields'][$key] = $out;
break;


and remove (int) where do you want see 0 in code or area or number. IF you want see 0 in all you can remove (int) from all. Then save and create new account.

Milea Ionut
January 4, 2013, 09:57 AM
Now is working! Thank you!

Maaz Surchy
January 13, 2013, 06:57 PM
Pardon me, but how to run that SQL command?

Because I got same problem and tried to fix it.

Peter Jonsson
January 13, 2013, 08:31 PM
yoursite.com/admin/index.php?controller=database

Maaz Surchy
January 13, 2013, 09:22 PM
Thanks Peter, I got this message: The query has been successfully implemented, 0 rows have been affected.

But still have same problem.

Viktor
January 14, 2013, 03:09 AM
Hello Maaz,

Would you please send me in PM ftp access details and I will fix it ASAP and send code for your problem.