Strona 1 z 2
Cytuj - błąd
: 10 kwietnia 2006, 10:50
autor: arsen_lipen
Witam !!!
Mam taki problemik po aktualizacji forum gdzieś zrobiłem byka (chyba) a może to było wcześniej zrobione, już nie wiem. Mianowicie kiedy ktoś kliknie na "Cytuj" to tekst powinien być na białym tle o tak:
ksywa pisze:tutaj jakis tekst.
a jest:

Z góry dzieki za odp.
EDIT
Dodam jeszcze że aktualizacja byla z 2.019 -> 2.0.20
: 10 kwietnia 2006, 12:49
autor: daroPL
arsen_lipen pisze:Dodam jeszcze że aktualizacja byla z 2.019 -> 2.0.20
code_changes zdaje mi się, że jeszcze nie wydali...więc chyba się pomyliłem. (chyba ze wrzuciłeś pliki z 2.0.20)
co do problemu to coś zle dałeś w includes/bbcode.php lub templates/twój_styl/bbcode.tpl...sprawdz
: 10 kwietnia 2006, 13:29
autor: arsen_lipen
Co do
code_changes to wydali jest do pobrania
phpbb-2.0.19_to_2.0.20 tutaj
Jeżeli chodzi o plik includes/bbcode.php to już próbowałem wszystkiego i byka nie znalazłem nawet nadpisywałem ten z 2.0.19 i nic a templates/twój_styl/bbcode.tpl tego do aktualizcji nie było w paczce.

Przypuszczam że to bedzie inny plik, albo poprostu błąd był przed aktualizacją 2.0.19 -> 2.0.20 tylko teraz go zobaczyłem. Poprostu zbieg okoliczności.
chyba ze wrzuciłeś pliki z 2.0.20
Z paczki brałem tylko polskie plik jezykowe oczywiście tylko te które były dodane nie cały plik
language/polish/lang_main.php
language/polish/lang_admin.php
: 10 kwietnia 2006, 15:24
autor: TrAvIkK
To może zuploaduj gdzieś i daj linki do plików bbcode.php oraz bbcode.tpl bo wygląda na to, że wcześniej był błąd.
: 10 kwietnia 2006, 15:44
autor: arsen_lipen
Dobra zapodaje te pliczki
TUTAJ POBIERZ
: 10 kwietnia 2006, 16:15
autor: daroPL
To wrzuc pliki z wersji 2.0.19 i zobacz czy działa?
Ty to instalowałeś czy jest w standardzie 2.0.20
Kod: Zaznacz cały
$bbcode_tpl['google'] = '\'' . $bbcode_tpl['google'] . '\'';
$bbcode_tpl['google'] = str_replace('{STRING}', "' . str_replace('\\\"', '\"', '\\1') . '", $bbcode_tpl['google']);
$bbcode_tpl['google'] = str_replace('{QUERY}', "' . urlencode(str_replace('\\\"', '\"', '\\1')) . '", $bbcode_tpl['google']);
?
: 10 kwietnia 2006, 16:24
autor: arsen_lipen
To ja instalowałem ale już dawno dawno temu gdzies w necie to łapłem. Jak chcesz komuś dać namiary na google [google]tutaj wpisujesz cos do wyszukiwarki [/google] i przekieruje go na google jak na to kliknie.
EDIT
To jest hak Google Search BBCode
: 10 kwietnia 2006, 16:36
autor: TrAvIkK
A po wywaleniu tego czegoś działa?
To spróbuj wrzucić na serwer pliki z oryginalnej paczki 2.0.20 (bbcode.php & bbcode.tpl)
: 10 kwietnia 2006, 16:51
autor: arsen_lipen
A wiec tak nadpisałem na chwile orginały bbcode.php & bbcode.tpl z paczki forum 2.0.20 i nic dalej to samo. A więc przyczyna leży gdzieś indziej, ale numer tylko gdzie ?????? Ciekawe który to plik ???
Zresztą
TrAvIkK możesz to sprawdzić jesteś zarejestrowany u mnie na forum
http://www.formaty.com/forum 
: 11 kwietnia 2006, 14:47
autor: arsen_lipen
A więc tak wiem w którym pliku jest błąd includes/functions_post.php oczywiście z aktualizacji 2.0.19 do 2.0.20 poniżej jest kod którego powinnem nadpisać z paczki 2.0.20 kiedy to zrobię to mam ten bład jak wróce do poprzedniej wersji 2.0.19 to jest ok. Moje pytanie jest proste gdzie tu jest byk ?
includes/functions_post.php
#
#-----[ FIND ]---------------------------------------------
# Line 44
$allowed_html_tags = split(',', $board_config['allow_html_tags']);
$end_html = 0;
$start_html = 1;
$tmp_message = '';
$message = ' ' . $message . ' ';
while ($start_html = strpos($message, '<', $start_html))
{
$tmp_message .= preg_replace($html_entities_match, $html_entities_replace, substr($message, $end_html + 1, ($start_html - $end_html - 1)));
if ($end_html = strpos($message, '>', $start_html))
{
$length = $end_html - $start_html + 1;
$hold_string = substr($message, $start_html, $length);
if (($unclosed_open = strrpos(' ' . $hold_string, '<')) != 1)
{
$tmp_message .= preg_replace($html_entities_match, $html_entities_replace, substr($hold_string, 0, $unclosed_open - 1));
$hold_string = substr($hold_string, $unclosed_open - 1);
}
$tagallowed = false;
for ($i = 0; $i < sizeof($allowed_html_tags); $i++)
{
$match_tag = trim($allowed_html_tags[$i]);
if (preg_match('#^<\/?' . $match_tag . '[> ]#i', $hold_string))
{
$tagallowed = (preg_match('#^<\/?' . $match_tag . ' .*?(style[\t ]*?=|on[\w]+[\t ]*?=)#i', $hold_string)) ? false : true;
}
}
$tmp_message .= ($length && !$tagallowed) ? preg_replace($html_entities_match, $html_entities_replace, $hold_string) : $hold_string;
$start_html += $length;
}
else
{
$tmp_message .= preg_replace($html_entities_match, $html_entities_replace, substr($message, $start_html, strlen($message)));
$start_html = strlen($message);
$end_html = $start_html;
}
}
if (!$end_html || ($end_html != strlen($message) && $tmp_message != ''))
{
$tmp_message .= preg_replace($html_entities_match, $html_entities_replace, substr($message, $end_html + 1));
}
$message = ($tmp_message != '') ? trim($tmp_message) : trim($message);
#
#-----[ REPLACE WITH ]---------------------------------------------
#
// If HTML is on, we try to make it safe
// This approach is quite agressive and anything that does not look like a valid tag
// is going to get converted to HTML entities
$message = stripslashes($message);
$html_match = '#<[^\w<]*(\w+)((?:"[^"]*"|\'[^\']*\'|[^<>\'"])+)?>#';
$matches = array();
$message_split = preg_split($html_match, $message);
preg_match_all($html_match, $message, $matches);
$message = '';
foreach ($message_split as $part)
{
$tag = array(array_shift($matches[0]), array_shift($matches[1]), array_shift($matches[2]));
$message .= htmlspecialchars($part) . clean_html($tag);
}
$message = addslashes($message);
#
#-----[ FIND ]---------------------------------------------
# Line 153
$temp_option_text[$option_id] = htmlspecialchars($option_text);
#
#-----[ REPLACE WITH ]---------------------------------------------
#
$temp_option_text[intval($option_id)] = htmlspecialchars($option_text);
#
#-----[ FIND ]---------------------------------------------
# Line 816
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
}
}
#
#-----[ AFTER, ADD ]---------------------------------------------
#
/**
* Called from within prepare_message to clean included HTML tags if HTML is
* turned on for that post
* @param array $tag Matching text from the message to parse
*/
function clean_html($tag)
{
global $board_config;
if (empty($tag[0]))
{
return '';
}
$allowed_html_tags = preg_split('/, */', strtolower($board_config['allow_html_tags']));
$disallowed_attributes = '/^(?:style|on)/i';
// Check if this is an end tag
preg_match('/<[^\w\/]*\/[\W]*(\w+)/', $tag[0], $matches);
if (sizeof($matches))
{
if (in_array(strtolower($matches[1]), $allowed_html_tags))
{
return '</' . $matches[1] . '>';
}
else
{
return htmlspecialchars('</' . $matches[1] . '>');
}
}
// Check if this is an allowed tag
if (in_array(strtolower($tag[1]), $allowed_html_tags))
{
$attributes = '';
if (!empty($tag[2]))
{
preg_match_all('/[\W]*?(\w+)[\W]*?=[\W]*?(["\'])((?:(?!\2).)*)\2/', $tag[2], $test);
for ($i = 0; $i < sizeof($test[0]); $i++)
{
if (preg_match($disallowed_attributes, $test[1][$i]))
{
continue;
}
$attributes .= ' ' . $test[1][$i] . '=' . $test[2][$i] . str_replace(array('[', ']'), array('[', ']'), htmlspecialchars($test[3][$i])) . $test[2][$i];
}
}
if (in_array(strtolower($tag[1]), $allowed_html_tags))
{
return '<' . $tag[1] . $attributes . '>';
}
else
{
return htmlspecialchars('<' . $tag[1] . $attributes . '>');
}
}
// Finally, this is not an allowed tag so strip all the attibutes and escape it
else
{
return htmlspecialchars('<' . $tag[1] . '>');
}
}
: 11 kwietnia 2006, 15:06
autor: TrAvIkK
Pewnie mod google dodaje coś do pliku funcions_post.php, a aktualizacją nadpisujesz to co zmienia mod.
Zainstaluj jeszcze raz moda dla tego pliku.
: 11 kwietnia 2006, 15:16
autor: arsen_lipen
TrAvIkK pisze:Pewnie mod google dodaje coś do pliku funcions_post.php, a aktualizacją nadpisujesz to co zmienia mod.
Zainstaluj jeszcze raz moda dla tego pliku.
Niestety nie ma tego pliku w haku
Google Search BBCode Dodam jeszcze że wywaliłem całkiem hak google i też nic.
: 11 kwietnia 2006, 16:11
autor: daroPL
nadpisz sobie pliki posting.php, bbcode.php, viewtopic.php i ich .tpl tymi z najnowszej paczki 2.0.20, wcześniej zrób kopie starych...zobacz czy działa

: 11 kwietnia 2006, 16:36
autor: arsen_lipen
Również nic z tego nic to nie dało. A ma takie zapytanie co sie stanie jak dam plik functions_post.php z wersji 2.0.19 czy błedy nie wynikną gdzies indziej za co wogóle ten plik jest odpowiedzialny. Wgralem sobie forum na krasnalu i na localu testuje ale ciekawe jak to bedzie wygladało na serwerku ?
: 11 kwietnia 2006, 17:07
autor: daroPL
Zawiera funkcje odpowiadające za pisanie i wyświetlanie postów.
Może tam leży problem
