phpBB2 by Przemo
Support forów phpBB2 modified by Przemo

FAQFAQ - PIERWSZA POMOC!!  regulaminREGULAMIN  SzukajSZUKAJ  UżytkownicyUżytkownicy  GrupyGrupy  StatystykiStatystyki
RejestracjaRejestracja  ZalogujZaloguj  DownloadDownload  katalog Forów DyskusyjnychKatalog Forów   FAQ Video tutoriale

Poprzedni temat «» Następny temat
[General] phpBB by przemo pracuj?ce w utf8 - baza oraz ca?e
Autor Wiadomość
evilmc


Posty: 289
Wysłany: 18-11-2010, 13:30   [General] phpBB by przemo pracujące w utf8 - baza oraz całe

Kod:
http://bb2.tosiek.pl/phpbb-by-przemo-pracujsce-w-utf8-baza-oraz-cale-forum-vt21.htm

If anyone can translate this text into English?
_________________
Looptroop - Bandit Queen
 
     
Gadatliwa Kasia 

   
M17ek


Pomógł: 9 razy
Posty: 136
Wysłany: 04-12-2010, 23:56   

phpbb-by-przemo-working in UTF8 coding , MySQL and forum , some think like this ;)
 
     
Truelegend


Posty: 1
Wysłany: 17-01-2011, 19:50   

Translate topic or just title?
 
     
evilmc


Posty: 289
Wysłany: 23-02-2011, 01:44   

only translate for topic.
_________________
Looptroop - Bandit Queen
 
     
japi55


Pomógł: 570 razy
Posty: 1447
Wysłany: 23-02-2011, 19:30   

If you were trying anytime to integrate phpBB or modyfication by przemo, probably you had a problem with a database, phpBB doesn't work in UTF8-code or in showing integrated elements, for example last topics.

Or if you have foreign hosting, on some of them iso-8859-2 code doesn't exists, in which works phpBB and phpBB by przemo

Here is explained only the way to modificate a script to works with utf-8 code in database and on a webpage.

If you use spider friendly, from includes directory cut these documents:
map.iso-8859-1.php
map.iso-8859-2.php
And in replace in pspad, check the option "ask when replace" and don't let to change anything in files of spider friendly.

Do everything on a save copy of forum!!!.
If you want to modyfiacte the script, remember about database! You have to modyficate database, too.
The way to modyficate database is explained here:
http://www.przemo.org/php...p=380714#380714

Replace every lyrics from iso-8859-2 to utf-8 and you have already a guide for utf-8

The only change is that, you always have to save as utf-8, and, the most important, in database before import, do a question to it ( IMPORTANT ! )
Kod:
ALTER DATABASE `name_of_a_base` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;

name_of_a_base replace with a name of database which is shown on the left side ( database with forum )

The next thing we must take care of modyficating a script.
Needed things are:

Gżegżółka - http://www.gzegzolka.com/?m=down
PsPad - http://www.pspad.com/

We start from just thinkink about that what we must do:

Convert all files that can include lyrics with polish characters.
Small modyficationg of some files.
Replace code page definition on utf-8

Now we must convert by "Gżegżółka" all files of forum to utf-8
Copy all files of forum to one directory.
Grab all the directory with files to the "Gżegżółka" window.
In the "Maska" field, write:
Zaczynamy od konwersji Gżegżólką wszystkich plików forum do utf8

Kod:
*.php;*.xml;*.htm;*.html;*.tpl;*.cfg;*.txt;*.sql


Check "Wyszukuj" field includes underdirectories.
The next thing we must click on "konwersja" button.
In the first field we check "Automatyczny" and in the first Unicode UTF-8
Automatyczny >>> Unicode UTF-8
We click on "projekt" >> ustawienia, and uncheck 3 options:
Konwertuj znaczniki
Podstawiaj encje
Traktuj plik html jak xhtml
Click OK and press Start, all the files will be converted.

The next step is to change all the appeared of other codes-sides in files to utf-8
Klick on Search >> Search / Replace in files
We choose the directory with files of forum in the "Checked directory" field.
In the "find text" fiels we write: iso-8859-2
We check replace with and write utf-8
We uncheck ask when replacing.
We check include subdirectores
We repeat it with iso-8859-1

Small modyfication in files.
Open includes/functions.php
Find
Kod:
function replace_encoded($text)

And this what is under and replace with
Kod:
function replace_encoded($text)
{
    global $lang;
    return ($lang['ENCODING'] == 'utf-8') ? $text : str_replace(
        array('ę', 'ó', 'ą', 'ś', 'ł', 'ż', 'ź', 'ć', 'ń', 'Ę', 'Ó', 'Ą', 'Ś', 'Ł', 'Ż', 'Ź', 'Ć', 'Ń'),
        array('e', 'o', 'a', 's', 'l', 'z', 'z', 'c', 'n', 'E', 'O', 'A', 'S', 'L', 'Z', 'Z', 'C', 'N'), $text
    );
}


Open language/lang_polish/lang_main.php
Find

Kod:
setlocale(LC_ALL, 'pl');
@setlocale (LC_ALL, 'pl_PL.utf-8', 'pl_PL.latin2', 'pl_PL', 'pl', 'polish');

Replace with
Kod:
//setlocale(LC_ALL, 'pl');
//@setlocale (LC_ALL, 'pl_PL.utf-8', 'pl_PL.latin2', 'pl_PL', 'pl', 'polish');


Open db/mysql4.php
Find:
Kod:
$dbselect = mysql_select_db($this->dbname);


After, add
Kod:
mysql_query('SET NAMES utf8 COLLATE utf8_unicode_ci', $this->db_connect_id);


And in config.php must be

Kod:
$dbms = 'mysql4';



//Sory for my bad english :)
 
     
Wyświetl posty z ostatnich:   
Odpowiedz do tematu
Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Możesz załączać pliki na tym forum
Możesz ściągać załączniki na tym forum
Dodaj temat do Ulubionych
Wersja do druku

Skocz do:  

Kopiowanie wszelkich treści zawartych na forum, modyfikacji oraz instrukcji bez zgody administracji i autorów tematów/postów zabronione!

Powered by phpBB modified by Przemo © 2003 phpBB
Strona wygenerowana w 0,07 sekundy. Zapytań do SQL: 12
Polecane serwisy

Najlepsze oprogramowanie do prowadzenia sklepu internetowegoNajlepszy program do sklepu firmowany przez Przem'a

Sklep z gadżetami

serwis laptopów

phpbb

Design Cart - Tworzenie sklepu internetowego

iRonin.IT

• Zamów reklamę