Inability to enter urdu digits in year and page

Started by mrizwan, 19 June 2011, 06:50:43

Previous topic - Next topic
A financial contribution is greatly appreciated as a support, to help us to keep live the project.
If you like this project you can donate some piece of BitCoin to this address: bc1qy5tgq6tvrckac2a57unxvqcnxamrvhduve9sj9

mrizwan

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

A financial contribution is greatly appreciated as a support, to help us to keep live the project.
If you like this project you can donate some piece of BitCoin to this address: bc1qy5tgq6tvrckac2a57unxvqcnxamrvhduve9sj9

federica

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.
Informatizzati [url="https://informatizzati.org"]https://informatizzati.org[/url]
Stacca la spina [url="https://disconnessi.org"]https://disconnessi.org[/url]

mrizwan

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

federica

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.
Informatizzati [url="https://informatizzati.org"]https://informatizzati.org[/url]
Stacca la spina [url="https://disconnessi.org"]https://disconnessi.org[/url]

A financial contribution is greatly appreciated as a support, to help us to keep live the project.
If you like this project you can donate some piece of BitCoin to this address: bc1qy5tgq6tvrckac2a57unxvqcnxamrvhduve9sj9

mrizwan

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.

federica

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?>
Al mondo ci sono 10 tipi di persone, quelli che hanno capito il codice binario e quelli che non l'hanno capito.
Informatizzati [url="https://informatizzati.org"]https://informatizzati.org[/url]
Stacca la spina [url="https://disconnessi.org"]https://disconnessi.org[/url]

mrizwan

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