News:

CPG Release 1.6.31
Minor maintenance release
Clean up remaining remnants of the .net CPG website
Improved installer_stub compatibility with various server configurations

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://coppermine-gallery.com/forum/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.