forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 bridging => Topic started by: agridoc on December 12, 2006, 12:50:21 pm

Title: SMF membergroups names in Greek not properly displayed in CPG 1.4x
Post by: agridoc on December 12, 2006, 12:50:21 pm
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).

Code: [Select]
                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().

Code: [Select]
                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.