I use TinyPortal 1.0 RC1 and older versions and tags in Russian is not add in system, only on English. Russian-UTF8 characters
Sorry for duble question. I have this problem again after update TP for last version. but not find fix for it. Please help my!
This is something I don't know very much about, but I suppose you could add in the Russian characters to allow them.
In TPortalAdmin.php look for this line
$allowed = "/[^a-zA-Z0-9_]/";
For now I'd suggest you add any additional characters you'd like to that line like this:
$allowed = "/[^a-zA-Z0-9_чл]/";
Hope that works!
Thank you very much! But after updating for me in general have ceased to work TAGs, at attempt to add new, the error message stands out: Error of database , /Sources/TPortalAdmin.php string 2735
2735 string is end of this code :
// check the value, only letters and underscore allowed
$allowed = "/[^a-zA-Z0-9_чл]/";
$value = preg_replace($allowed, '', $value);
if(!empty($value))
$smcFunc['db_query']('REPLACE',
'{db_prefix}tp_variables',
array('value1' => 'string', 'type' => 'string'),
array($value,'globaltag'),
array('id')
);
and in error log:
http://www.paraplanoff.net/index.php?pretty;action=tpadmin
Database error:
smf_tp_variables
file: /usr/local/www/data-dist/saks/Sources/TPortalAdmin.php
String: 2735
http://www.paraplanoff.net/index.php?pretty;action=tpadmin
2: mysql_errno(): supplied argument is not a valid MySQL-Link resource
file: /usr/local/www/data-dist/saks/Sources/Subs-Db-mysql.php
String: 415
http://www.paraplanoff.net/index.php?pretty;action=tpadmin
2: mysql_error(): supplied argument is not a valid MySQL-Link resource
file: /usr/local/www/data-dist/saks/Sources/Subs-Db-mysql.php
String: 414
Replace:
$smcFunc['db_query']
With:
$smcFunc['db_insert']
For any errors you run into, a quick search on the board and you'll find that I've posted fixes for the majority of them already.
Quote from: IchBinâ,,¢ on September 15, 2011, 03:18:11 AM
With:
$smcFunc['db_insert']
It`s work well!
But string
$allowed = "/[^a-zA-Z0-9_чл]/"; is not work and russian worlds not add and if i am use string $allowed = "/[^a-zA-Z0-9а-ÑÐ-Я_] in tag add only first letter
Don't type it A-Я. I think php will only take english alphabet when doing a range of characters like A-Z. You'll need to put in each character that you want to allow.
$allowed = "/[^a-zA-Z0-9_abcdefg]/";
Yes, I think so! I use string
$allowed = "/[^a-zA-Z0-9абвгдеÑ'жзийклмнопрÑÑ,уÑ,,Ñ...цчшщыьъÑÑŽÑÐÐ'Ð'Ð"Ð"ЕÐЖЗИЙКЛМÐОПРСТУФХЦЧШЩЫЬЪÐЮЯ_]/";
and it work!. Thank you for support!