2006-09-27, 09:03 AM
2006-09-27, 11:54 AM
Witaj,
1. Zrób Kopie ZAPASOWĄ!! (nie odpowiadam za szkody)
2. Stwórz plik o nazwie conv.php i wklej do niego:
4. Po zakończeniu sprawdź czy działa ,jak nie to przywróć kopie .
5. Jeśli forum działa ,uploaduj nowy plik językowy (za chwile będzie w pierwszym poście).
6. Na końcu wejdź na ftp ,otwórz katalog jscripts ,edytuj plik inline_edit.js ,zaznacz całość i zamień na:
1. Zrób Kopie ZAPASOWĄ!! (nie odpowiadam za szkody)
2. Stwórz plik o nazwie conv.php i wklej do niego:
<?
/*
# Full based on http://forum.webhelp.pl/viewtopic.php?t=144222
# Small modifications by Xniver
*/
// pobierz dane mysql
require './inc/config.php';
// jakie ma być kodowanie
$charset = 'utf8';
// połączenie z bazą
$conn_id = mysql_connect('$config['hostname']', '$config['username']', '$config['password']');
mysql_select_db('$config['database']');
// kodowanie dla polaczenia
$query = 'SET NAMES '.$charset;
@mysql_query($query, $conn_id) or die(mysql_error($conn_id));
// ustawienie kodowania i systemu porównań dla bazy danych
$query = 'SELECT DATABASE()';
$result = @mysql_query($query, $conn_id) or die(mysql_error($conn_id));
$row = mysql_fetch_row($result);
$query = 'ALTER DATABASE `'.$row[0].'` DEFAULT CHARACTER SET '.$charset.' COLLATE '.$charset.'_general_ci';
@mysql_query($query, $conn_id) or die(mysql_error($conn_id));
// ustawienie kodowania i systemu porównań dla istniejących tabel
$query = 'SHOW TABLES';
$result = @mysql_query($query, $conn_id) or die(mysql_error($conn_id));
while ($row = mysql_fetch_row($result)) {
$query = 'ALTER TABLE `'.$row[0].'` DEFAULT CHARACTER SET '.$charset.' COLLATE '.$charset.'_general_ci';
@mysql_query($query, $conn_id) or die(mysql_error($conn_id));
}
echo 'Zakończono!';
?>
3. Następnie wyślij go na ftp(do katalogu w ,którym jest myBB) , i wpisz w przeglądarke http://adres_forum.pl/conv.php .4. Po zakończeniu sprawdź czy działa ,jak nie to przywróć kopie .
5. Jeśli forum działa ,uploaduj nowy plik językowy (za chwile będzie w pierwszym poście).
6. Na końcu wejdź na ftp ,otwórz katalog jscripts ,edytuj plik inline_edit.js ,zaznacz całość i zamień na:
var inlineEditor = Class.create();
inlineEditor.prototype = {
initialize: function(url, options)
{
this.url = url;
this.elements = new Array();
this.currentElement = '';
this.options = options;
if(!options.className)
{
alert('You need to specify either a className in the options.');
return false;
}
this.className = options.className;
if(options.spinnerImage)
{
this.spinnerImage = options.spinnerImage;
}
this.elements = DomLib.getElementsByClassName(document, "*", options.className);
if(this.elements)
{
for(var i = 0; i < this.elements.length; i++)
{
if(this.elements[i].id)
{
this.makeEditable(this.elements[i]);
}
}
}
return true;
},
makeEditable: function(element)
{
if(element.title != "")
{
element.title = element.title+" ";
}
if(!this.options.lang_click_edit)
{
this.options.lang_click_edit = "(Click and hold to edit)";
}
element.title = element.title+this.options.lang_click_edit;
element.onmousedown = this.onMouseDown.bindAsEventListener(this);
return true;
},
onMouseDown: function(e)
{
var element = Event.element(e);
Event.stop(e);
if(this.currentElement != '')
{
//alert('not empty.. it is'+this.currentElement);
return false;
}
// Fix for konqueror which likes to set event element as the text not the link
if(typeof(element.id) == "undefined" && typeof(element.parentNode.id) != "undefined")
{
element.id = element.parentNode.id;
}
this.currentElement = element.id;
this.timeout = setTimeout(this.showTextbox.bind(this), 1200);
element.onmouseup = this.onMouseUp.bindAsEventListener(this);
return false;
},
onMouseUp: function(e)
{
clearTimeout(this.timeout);
Event.stop(e);
return false;
},
onButtonClick: function(id)
{
if($(id))
{
this.currentElement = id;
this.showTextbox();
}
return false;
},
showTextbox: function()
{
this.element = $(this.currentElement);
if(typeof(this.element.parentNode) == "undefined" || typeof(this.element.id) == "undefined")
{
return false;
}
this.oldValue = this.element.innerHTML;
this.testNode = this.element.parentNode;
if(!this.testNode)
{
return false;
}
this.cache = this.testNode.innerHTML;
this.textbox = document.createElement("input");
this.textbox.style.width = "95%";
this.textbox.maxlength="85";
this.textbox.className = "textbox";
this.textbox.type = "text";
Event.observe(this.textbox, "blur", this.onBlur.bindAsEventListener(this));
Event.observe(this.textbox, "keypress", this.onKeyUp.bindAsEventListener(this));
this.textbox.setAttribute("autocomplete", "off");
this.textbox.name = "value";
this.textbox.index = this.element.index;
this.textbox.value = MyBB.unHTMLchars(this.oldValue);
Element.remove(this.element);
this.testNode.innerHTML = '';
this.testNode.appendChild(this.textbox);
this.textbox.focus();
return true;
},
onBlur: function(e)
{
this.hideTextbox();
return true;
},
onKeyUp: function(e)
{
if(e.keyCode == Event.KEY_RETURN)
{
this.hideTextbox();
}
else if(e.keyCode == Event.KEY_ESC)
{
this.cancelEdit();
}
return true;
},
onSubmit: function(e)
{
this.hideTextbox();
return true;
},
hideTextbox: function()
{
Event.stopObserving(this.textbox, "blur", this.onBlur.bindAsEventListener(this));
var newValue = this.textbox.value;
if(typeof(newValue) != "undefined" && newValue != '' && MyBB.HTMLchars(newValue) != this.oldValue)
{
this.testNode.innerHTML = this.cache;
this.element = $(this.currentElement);
this.element.innerHTML = newValue;
this.element.onmousedown = this.onMouseDown.bindAsEventListener(this);
this.lastElement = this.currentElement;
postData = "value="+encodeURIComponent(newValue);
if(this.spinnerImage)
{
this.showSpinner();
}
idInfo = this.element.id.split("_");
if(idInfo[0] && idInfo[1])
{
postData = postData+"&"+idInfo[0]+"="+idInfo[1];
}
new ajax(this.url, {method: 'post', postBody: postData, onComplete: this.onComplete.bind(this)});
}
else
{
Element.remove(this.textbox);
this.testNode.innerHTML = this.cache;
this.element = $(this.currentElement);
this.element.onmousedown = this.onMouseDown.bindAsEventListener(this);
}
this.currentElement = '';
return true;
},
cancelEdit: function()
{
Element.remove(this.textbox);
this.testNode.innerHTML = this.cache;
this.element = $(this.currentElement);
this.element.onmousedown = this.onMouseDown.bindAsEventListener(this);
this.currentCurrentElement = '';
},
onComplete: function(request)
{
if(request.responseText.match(/<error>(.*)<\/error>/))
{
message = request.responseText.match(/<error>(.*)<\/error>/);
this.element.innerHTML = this.oldValue;
if(!message[1])
{
message[1] = "Wystapil nieznany blad.";
}
alert('Wystapil blad przy aktualizacji.\n\n'+message[1]);
}
else if(request.responseText)
{
this.element.innerHTML = MyBB.HTMLchars(request.responseText);
}
if(this.spinnerImage)
{
this.hideSpinner();
}
this.currentIndex = -1;
return true;
},
showSpinner: function()
{
if(!this.spinnerImage)
{
return false;
}
if(!this.spinner)
{
this.spinner = document.createElement("img");
this.spinner.src = this.spinnerImage;
if(saving_changes)
{
this.spinner.alt = saving_changes;
}
else
{
this.spinner.alt = "Saving changes..";
}
this.spinner.style.verticalAlign = "middle";
this.spinner.style.paddingRight = "3px";
}
this.testNode.insertBefore(this.spinner, this.testNode.firstChild);
return true;
},
hideSpinner: function()
{
if(!this.spinnerImage)
{
return false;
}
Element.remove(this.spinner);
return true;
}
}
2006-09-28, 05:24 PM
propheti Wrote:Dodać chciałem jeszcze, że błąd występuje tylko po wyborze polskiej paczki.
Mam nadzieje ze rozpakowales plik do inc/languages/polish i nie robiles tych calych "numerow" z konwertowaniem?
Xniver Wrote:2. Stwórz plik o nazwie conv.php i wklej do niego: ....
No wiec walczylem dzisiaj z utf-8 i twoimi najnowszymi plikami.
Problem zaczal sie przy tym, ze trzeba bylo zmienic zawartosc plika conv.php, bo inaczej wyskakiwalo:
Parse error: parse error, unexpected T_STRING
Pierwsza zmiana:
$conn_id = mysql_connect('$config[\'hostname\']', '$config[\'username\']', '$config[\'password\']');
mysql_select_db('$config[\'database\']');
Niestety dalej sie nie laczylo nic.
Druga zmiana:
$conn_id = mysql_connect('HOST', 'UZYTKOWNIK', 'HASLO');
mysql_select_db('BAZA');
Polaczylo sie, na koncu wyskoczylo 'Zakończono!'.
Wgralem najnowsze pliki, w kodzie strony pokazalo sie utf-8.
Wszystko co mialo cos wspolnego z languagepack pokazywalo sie poprawnie, ale niestety zepsuly sie wszystkie stare wpisy uzytkownikow w bazie danych.
Nie pomagalo tez przelaczenie na stare iso w przegladarce, wszedzie byly 'krzaczki'.
Teraz wgralem ponownie backup i uzywam ISO-8859-2.
Jak bedziesz mial jakies ciekawe pomysly to wal ,>
2006-09-29, 08:03 AM
propheti Wrote:Rozpakowane do inc/languages/polish, bo gdzie indziej niby mógłbym to wrzucić? I nie robiłem numerów z konwertowaniem, nie było przynajmniej takiej potrzeby bo krzaków nie ma.
Pytam sie, bo u mnie byl tez krotko dokladnie ten sam blad.
Szukalem w tym i niemieckim forum odpowiedzi na ten problem, ale niestety nic nie znalazlem.
Moze Xniver nie zauwazyl tego:
Language packs changes
Since MyBB 1.2 the following language files have had changes to them:
* datahandler_event.lang.php
* datahandler_user.lang.php
* messages.lang.php
* private.lang.php
* search.lang.php
-> http://community.mybboard.net/showthread...5#pid83415
2006-09-29, 01:41 PM
Wgraliście nową wersje Polish Packa?
Poprostu był błąd.Poprawiłem w v0.98a II .
Poprostu był błąd.Poprawiłem w v0.98a II .
2006-09-29, 04:46 PM
Xniver Wrote:Wgraliście nową wersje Polish Packa?
Poprostu był błąd.Poprawiłem w v0.98a II .
... a powiec mi, czy Tobie sie udalo skonwertowac baze danych z wpisami w ISO-8859-2 na utf-8?
2006-11-06, 02:50 PM
Where is poland edition Cp ?
2006-11-06, 08:11 PM
kempa Wrote:Where is poland edition Cp ?
For 1.2.1:
http://community.mybboard.net/attachment.php?aid=4173
2006-11-13, 11:50 AM
o boze to ty jeszcze gorszy odemniejest CPA >>>>>Users and Groups>>>>>>Custom Profile Fields i tam wszystko masz
2006-11-17, 09:31 PM
Niedługo wydam nową poprawioną wersje (wersja iso-8559-2[UTF-8 odpada, są problemy]).