SMF membergroups names in Greek not properly displayed in CPG 1.4x SMF membergroups names in Greek not properly displayed in CPG 1.4x
 

News:

CPG Release 1.6.27
change DB IP storage fields to accommodate IPv6 addresses
remove use of E_STRICT (PHP 8.4 deprecated)
update README to reflect new website
align code with new .com CPG website
correct deprecation in captcha

Main Menu

SMF membergroups names in Greek not properly displayed in CPG 1.4x

Started by agridoc, December 12, 2006, 12:50:21 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

agridoc

As I posted in http://forum.coppermine-gallery.net/index.php?topic=37919.msg186006#msg186006 SMF membergroups names in Greek are not properly displayed in CPG 1.4x. Greek characters are ignored.

I don' t know if this happens with UTF-8 as I use a different approach.

I use codepage ISO-8859-7 in config and Greek language file with same codepage. Database collation is latin-1_swedish. The same applies for SMF.

Searching smf10.inc.php I found that the problem can be overcomed  by editing the code in lines 190-193 (CPG 1.4.10).

                while ($row = mysql_fetch_assoc($result))
                {
                        $udb_groups[$row[$this->field['grouptbl_group_id']]+100] = utf_ucfirst(utf_strtolower($row[$this->field['grouptbl_group_name']]));
                }


Just change the utf_ucfirst() and utf_strtolower() functions defined in /include/functions.inc.php to the original  PHP ucfirst() and strtolower().

                while ($row = mysql_fetch_assoc($result))
                {
                        $udb_groups[$row[$this->field['grouptbl_group_id']]+100] = ucfirst(strtolower($row[$this->field['grouptbl_group_name']]));
                }


Using the edited file membergroups names in Greek will display correctly.

I believe that this change, combined with the proposed one for Greek search will make possible to use CPG in standard Greek ISO-8859-7 codepage. Not found any other misfunction yet.