Author Topic: Inability to enter urdu digits in year and page  (Read 20253 times)

Offline mrizwan

  • Coccinella
  • *
  • Posts: 20
  • Karma: +0/-0
Inability to enter urdu digits in year and page
« on: 19 June 2011, 06:50:43 »
I am using the urdu language for abook. when i enter the details of the book regarding number of pages and the year of publication in urdu digits it is not saved and is also not visible. But if i enter numbers in english language then it is correctly displayed and saved. Thanks

Offline federica

  • Amministratore
  • Delfino
  • *****
  • Posts: 1.043
  • Karma: +1/-0
Re: Inability to enter urdu digits in year and page
« Reply #1 on: 20 June 2011, 15:40:29 »
Hello mrizwan,
the page number and year number fields are a numeric fields. They don't accept alphabetic characters.

How to write numbers in urdu language?
Al mondo ci sono 10 tipi di persone, quelli che hanno capito il codice binario e quelli che non l'hanno capito.
http://www.antivirushelp.it
stacca la spina!

Offline mrizwan

  • Coccinella
  • *
  • Posts: 20
  • Karma: +0/-0
Re: Inability to enter urdu digits in year and page
« Reply #2 on: 20 June 2011, 19:22:08 »
These are urdu digits (same like arabic or persian). All are RTL language and use the same numbers like
۱، ۲، ۳، ۴، ۵، ۶، ۷، ۸، ۹، ۱۰  which in english language are (1, 2, 3, 4, 5, 6, 7, 8, 9, 10). Would appreciate your help. Thanks

Offline federica

  • Amministratore
  • Delfino
  • *****
  • Posts: 1.043
  • Karma: +1/-0
Re: Inability to enter urdu digits in year and page
« Reply #3 on: 25 June 2011, 17:01:11 »
Hi mrizwan,
if you want insert urdu number to database you must modify the field data types. Are you able to make this change by yourself?
The fields to change are in jos_abbook table. Change the fields "pag" and "year" from INT to VARCHAR.

Al mondo ci sono 10 tipi di persone, quelli che hanno capito il codice binario e quelli che non l'hanno capito.
http://www.antivirushelp.it
stacca la spina!

Offline mrizwan

  • Coccinella
  • *
  • Posts: 20
  • Karma: +0/-0
Re: Inability to enter urdu digits in year and page
« Reply #4 on: 26 June 2011, 11:13:09 »
Thanks for the reply. i made the changes as suggested by you but to no effect. It is neither displayed on the website and neither it is saved. when you save it the value is not saved and field is empty.

Offline federica

  • Amministratore
  • Delfino
  • *****
  • Posts: 1.043
  • Karma: +1/-0
Re: Inability to enter urdu digits in year and page
« Reply #5 on: 26 June 2011, 16:54:45 »
You're right, try to change even these files:
<your_site>/components/com_abook/views/book/tmpl/default.php
row 126
from
Code: [Select]
<?php if ($this->book->pag>0){ ?>to
Code: [Select]
<?php if ($this->book->pag!=''){ ?>
row 144
from
Code: [Select]
<?php if ($this->book->year!=0){ ?>to
Code: [Select]
<?php if ($this->book->year!=''){ ?>
<your_site>/administrator/components/com_abook/views/books/tmpl/default.php
row 136
from
Code: [Select]
<?php $year=$row->year==0?'':$row->year?>to
Code: [Select]
<?php $year=$row->year==''?'':$row->year?>
Al mondo ci sono 10 tipi di persone, quelli che hanno capito il codice binario e quelli che non l'hanno capito.
http://www.antivirushelp.it
stacca la spina!

Offline mrizwan

  • Coccinella
  • *
  • Posts: 20
  • Karma: +0/-0
Re: Inability to enter urdu digits in year and page
« Reply #6 on: 27 June 2011, 12:21:37 »
thanks for your reply. I made the changes as advised. Now the changes are showing up in the control panel and in books. But they are still not being displayed at the website. I appreciate your help. Thank you