The vB Geek

The vB Geek (http://www.thevbgeek.com/index.php)
-   Geek Article and Review System (http://www.thevbgeek.com/forumdisplay.php?f=26)
-   -   alphabet of other language (http://www.thevbgeek.com/showthread.php?t=4193)

Whity 04-26-2008 08:28 AM

alphabet of other language
 
How to add the alphabet of other language in a navigating bar?

Morgan 04-27-2008 03:58 PM

Untested, but you would need to edit code in the gars_class_list.php file (code below) and possibly other places, or turn the alphabet bar off using 'Display the Alphabetical Quick Jump Bar' under ACP -> GARS -> Types:
Code:

                eval('$alphabar = "' . fetch_template('GARS_alphabar') . '";');
                for ($i=65; $i<91; $i++)
                {
                    $currentltr = chr($i);
                    $linkltr =& $currentltr;
                    $show['selectedltr'] = $this->ltr == $currentltr ? true : false;
                    eval('$alphabar .= "' . fetch_template('GARS_alphabar') . '";');
                }


Whity 04-28-2008 07:07 PM

it's work!


Edit gars_class_list.php


Find:

Code:

                eval('$alphabar = "' . fetch_template('GARS_alphabar') . '";');
                for ($i=65; $i<91; $i++)
                {
                    $currentltr = chr($i);
                    $linkltr =& $currentltr;
                    $show['selectedltr'] = $this->ltr == $currentltr ? true : false;
                    eval('$alphabar .= "' . fetch_template('GARS_alphabar') . '";');
                }

After add:

Code:

// BEGIN Hack Russian Alphabet

        eval('$alphabar = "' . fetch_template('GARS_alphabar') . '";');

        // Russian letters
        $a = array (192,193,194,195,196,197,198,199,200,202,203,204,205,206,207,208,209,210,211,212,213,214,215,217,221,222,223);

        foreach ($a as $i) {

                            $currentltr = chr($i);
                    $linkltr =& $currentltr;
                    $show['selectedltr'] = $this->ltr == $currentltr ? true : false;
                    eval('$alphabar .= "' . fetch_template('GARS_alphabar') . '";');
        }
// END Hack Russian Alphabet


cykelmyggen 07-31-2009 10:46 AM

Hi
I have no coding experience/skills - could anyone be kind to tell me what this should look like for the danish alphabet?

Morgan 07-31-2009 07:14 PM

Sorry, I don't know what ASCII numbers you'd use for Danish, but you might try looking at the chr and ord functions.

cykelmyggen 07-31-2009 07:39 PM

Quote:

Originally Posted by Morgan (Post 29534)
Sorry, I don't know what ASCII numbers you'd use for Danish, but you might try looking at the chr and ord functions.

The danish characters missing in the end of the alphabet has ascii values 91 92 and 93,

So would the danish hack look like this, or...?
Code:

// BEGIN Hack Danish Alphabet

        eval('$alphabar = "' . fetch_template('GARS_alphabar') . '";');

        // Danish letters
        $a = array (65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,198,216,197);

        foreach ($a as $i) {

                            $currentltr = chr($i);
                    $linkltr =& $currentltr;
                    $show['selectedltr'] = $this->ltr == $currentltr ? true : false;
                    eval('$alphabar .= "' . fetch_template('GARS_alphabar') . '";');
        }
// END Hack Danish Alphabet


Morgan 08-03-2009 01:47 PM

This would only produce three characters in the letter bar. You'd need to add the other numbers for the entire alphabet:
Code:

$a = array (91,92.93);

cykelmyggen 08-03-2009 04:53 PM

Of cause...:o

This one works - except there is an extra A at the beginning at the alphabet - this should be # I guess?
Code:

// BEGIN Hack Danish Alphabet

        eval('$alphabar = "' . fetch_template('GARS_alphabar') . '";');

        // Danish letters
        $a = array (65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,198,216,197);

        foreach ($a as $i) {

                            $currentltr = chr($i);
                    $linkltr =& $currentltr;
                    $show['selectedltr'] = $this->ltr == $currentltr ? true : false;
                    eval('$alphabar .= "' . fetch_template('GARS_alphabar') . '";');
        }
// END Hack Danish Alphabet


Morgan 08-06-2009 02:08 PM

Not sure why there is an extra A at the beginning. Maybe if you delete some numbers, and then add some back in, you'll be able to see why the extra A is appearing.

cykelmyggen 08-06-2009 02:18 PM

Deleted first number which made one af the A's dissapear. Thanks for your support:)


All times are GMT. The time now is 02:49 PM.

Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.