Vox Populi(x) forum

Alexandria Book Library => Errori (Bugs) => Topic started by: mrizwan on 19 June 2011, 06:50:43

Title: Inability to enter urdu digits in year and page
Post by: mrizwan 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
Title: Re: Inability to enter urdu digits in year and page
Post by: federica 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?
Title: Re: Inability to enter urdu digits in year and page
Post by: mrizwan 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
Title: Re: Inability to enter urdu digits in year and page
Post by: federica 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.

Title: Re: Inability to enter urdu digits in year and page
Post by: mrizwan 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.
Title: Re: Inability to enter urdu digits in year and page
Post by: federica 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
<?php if ($this->book->pag>0){ ?>
to
<?php if ($this->book->pag!=''){ ?>

row 144
from
<?php if ($this->book->year!=0){ ?>
to
<?php if ($this->book->year!=''){ ?>

<your_site>/administrator/components/com_abook/views/books/tmpl/default.php
row 136
from
<?php $year=$row->year==0?'':$row->year?>
to
<?php $year=$row->year==''?'':$row->year?>
Title: Re: Inability to enter urdu digits in year and page
Post by: mrizwan 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
Title: Re: Inability to enter urdu digits in year and page
Post by: federica on 04 July 2011, 20:27:55
The file <your_site>/components/com_abook/views/book/tmpl/default.php shows the book on the front-end side, after the modify you are able to show both pag and year urdu numbers.

Send me the url where you want show the urdu number.
Title: Re: Inability to enter urdu digits in year and page
Post by: mrizwan on 05 July 2011, 16:58:14
Thanks for the reply. Here is the link. The page number and year are displayed in english. The books not showing the page number and year of publication are those in which i have written  urdu numbers

http://nubuwat.org/qadianis/
Title: Re: Inability to enter urdu digits in year and page
Post by: federica on 05 July 2011, 18:13:27
Hello mrizwan,
what extension are you using in this link? Plugin, component or module? I have difficulty understanding urdu language :-) Are you using the plugin?
Title: Re: Inability to enter urdu digits in year and page
Post by: mrizwan on 07 July 2011, 12:45:33
Thanks. I solved the problem by installing the joomla plugin gNumber.

On the page i am using loadbook plugin.
Title: Re: Inability to enter urdu digits in year and page
Post by: federica on 11 July 2011, 09:17:20
ok, but if you want show urdu number without gNumber plugin you have to make the follow changes.

<your_site>/plugins/content/abook_loadbook.php
row 212
from
if ($book->pag!=0){
to
if ($book->pag!=""){

row 230
from
if ($book->year!=0){
to
if ($book->year!=""){
Title: Re: Inability to enter urdu digits in year and page
Post by: mrizwan on 11 July 2011, 15:40:20
It is now working. Thanks for all of the help. I appreciate it