Nie raz, nie dwa zdarzyl sie blad komus w instrukcji lub w samej modyfikacji co doprowadzalo do wielu pytan co i jak

Dlatego postanowilem napisac maly temat z bledami i ich poprawkami. Let it begin !
http://phpbb2.pl/faq.php?cat=9 - tutaj takze poprawki i przerobki do modyfikacji
Lista hackow tu zawartych:
- Color Ranks
- Plusminus
- GG & Tlen by Misiek
- Hacks List
- Level MOD
- Kirtana Forum Styles
Wiekszosc hackow Dabroza
W instrukcji jest blad, niedopatrzenie Dabroza ktory nam kaze szukac $_POST zamiast $HTTP_POST_VARS
Color Ranks by Dabroz
1. W pliku admin_ranks.php jest blad przez ktory nie dzialaja style dla rangi. Rozwiazanie ?
Znajdz
Kod:
'.".$rank_style."'
zamien na
Kod:
'".$rank_style."'
2.Blad w aktualizacji grup - nie zapisuje ustawien. Solucja w pliku admin_users.php:
Kod:
#
#----[ZNAJDŹ]----
#
color_calculate_rank($user_id);
#
#-----[WYTNIJ I WKLEJ PRZED]-------
#
// Delete user session, to prevent the user navigating the forum (if logged in) when disabled
Powinno to wygladac tak:
Kod:
message_die(GENERAL_ERROR, 'Could not rename users group', '', __LINE__, __FILE__, $sql);
}
}
color_calculate_rank($user_id);
// Delete user session, to prevent the user navigating the forum (if logged in) when disabled
3.W instrukcji zabrakło kolorowania wyników wyszukiwania gdzy są prezentowane jako tematy.
Oto rozwiązanie...
[phpbb]
#
#-----[ OPEN ]------------------------------------------
#
search.php
#
#-----[ FIND ]------------------------------------------
#
$sql = "SELECT t.*, f.forum_id, f.forum_name, u.username, u.user_id, u2.username as user2, u2.user_id as id2, p.post_username, p2.post_username AS post_username2, p2.post_time
#
#-----[ REPLACE WITH ]------------------------------------------
#
$sql = "SELECT t.*, f.forum_id, f.forum_name, u.username, u.user_id, u2.username as user2, u2.user_id as id2, p.post_username, p2.post_username AS post_username2, p2.post_time, u.user_rank, u.user_posts, u2.user_rank AS rank2, u2.user_posts AS posts2
#
#-----[ FIND ]------------------------------------------
#
$topic_author = ( $searchset[$i]['user_id'] != ANONYMOUS ) ? '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $searchset[$i]['user_id']) . '">' : '';
$topic_author .= ( $searchset[$i]['user_id'] != ANONYMOUS ) ? $searchset[$i]['username'] : ( ( $searchset[$i]['post_username'] != '' ) ? $searchset[$i]['post_username'] : $lang['Guest'] );
$topic_author .= ( $searchset[$i]['user_id'] != ANONYMOUS ) ? '</a>' : '';
#
#-----[ REPLACE WITH ]------------------------------------------
#
$topic_author = ( $searchset[$i]['user_id'] != ANONYMOUS ) ? color_username($searchset[$i]['user_id'],$searchset[$i]['username'],$searchset[$i]['user_rank'],$searchset[$i]['user_posts']) : ( ( $searchsett[$i]['post_username'] != '' ) ? $searchset[$i]['post_username'] : $lang['Guest'] );
#
#-----[ FIND ]------------------------------------------
#
$last_post_author = ( $searchset[$i]['id2'] == ANONYMOUS ) ? ( ($searchset[$i]['post_username2'] != '' ) ? $searchset[$i]['post_username2'] . ' ' : $lang['Guest'] . ' ' ) : '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $searchset[$i]['id2']) . '">' . $searchset[$i]['user2'] . '</a>';
#
#-----[ REPLACE WITH ]------------------------------------------
#
$last_post_author = ( $searchset[$i]['id2'] == ANONYMOUS ) ? ( ($searchset[$i]['post_username2'] != '' ) ? $searchset[$i]['post_username2'] . ' ' : $lang['Guest'] . ' ' ) : color_username($searchset[$i]['id2'],$searchset[$i]['user2'],$searchset[$i]['rank2'],$searchset[$i]['posts2']) ;
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM[/phpbb]
by ~Pyton
Plusminus by Dabroz1. Tutaj juz jest blad w instrukcji, przez ktory po wejsciu do viewtopic.php pojawia sie blad w zapytaniu. Rozwiazanie ?
W instrukcji jest tak:
Kod:
#
#--[ IN-LINE FIND ]--
#
" . USERS_TABLE . " u
#
#--[ IN-LINE BEFORE, ADD ]--
#
(
#
#--[ IN-LINE AFTER, ADD ]--
#
LEFT JOIN ".BANLIST_TABLE." b ON u.user_id=b.ban_userid)
przez co taki jest wynik po dodaniu:
Kod:
FROM " . POSTS_TABLE . " p, (" . USERS_TABLE . " u LEFT JOIN ".BANLIST_TABLE." b ON u.user_id=b.ban_userid)," . POSTS_TEXT_TABLE . " pt
Aby dzialalo nalezy to zamienic na:
Kod:
FROM " . POSTS_TABLE . " p, " . POSTS_TEXT_TABLE . " pt
LEFT JOIN ".BANLIST_TABLE." b ON u.user_id=b.ban_userid, " . USERS_TABLE . " u
Teraz bedzie ok
GG & Tlen by MisiekTutaj w instrukcji jest pare bledow ale najwazniejszy i najbardziej upierdliwy to zamienienie REPLACE WITH na AFTER, ADD w pliku memberlist_body.tpl w wyniku czego mamy 2 tabele userow

Rozwiazanie - wystarczy zamiast dodawac po, zamienic kod
Hacks ListOtoz w pliku jest zawarte zle zapytanie. Prawidlowe to:
Kod:
CREATE TABLE `phpbb_hacks_list` (
`hack_id` mediumint(8) unsigned NOT NULL auto_increment,
`hack_name` varchar(255) NOT NULL default '',
`hack_desc` varchar(255) NOT NULL default '',
`hack_author` varchar(255) NOT NULL default '',
`hack_author_email` varchar(255) NOT NULL default '',
`hack_author_website` tinytext NOT NULL,
`hack_version` varchar(32) NOT NULL default '',
`hack_hide` enum('Yes','No') NOT NULL default 'No',
`hack_download_url` tinytext NOT NULL,
`hack_file` varchar(255) NOT NULL default '',
`hack_file_mtime` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`hack_id`),
UNIQUE KEY `hack_name` (`hack_name`),
KEY `hack_file` (`hack_file`),
KEY `hack_hide` (`hack_hide`)
) TYPE=INNODB;
Level ModZnajdz:
Kod:
<td><img src="templates/subSilYOUR_TEMPLATE_NAMEver/images/level_mod/hp_bar_left.gif" width="2" height="12" /></td>
<td><img src="templates/YOUR_TEMPLATE_NAME/images/level_mod/hp_bar_fil.gif" width="{postrow.POSTER_HP_WIDTH}" height="12"
zamien na
Kod:
<td><img src="templates/YOUR_TEMPLATE_NAME/images/level_mod/hp_bar_left.gif" width="2" height="12" /></td>
<td><img src="templates/YOUR_TEMPLATE_NAME/images/level_mod/hp_bar_fil.gif" width="{postrow.POSTER_HP_WIDTH}" height="12"
Poprawia zle wyswietlanie sie paska HP - blad zgloszony przez Flo
Kirtana Forums Styles
W instrukcji do moda Kirtana Forums Styles jest blad ( w zapytaniach ) powodujacy nic innego jak bledne dzialanie. Rozwiazanie:
Zamiana:
[sql]ALTER TABLE `phpbb_themes` ADD `iss_special` INT NOT NULL AFTER `themes_id` ;[/sql]
na
[sql]ALTER TABLE `phpbb_themes` ADD `is_special` INT NOT NULL AFTER `themes_id` ;[/sql]
Za poprawke dziekujemy uzytkownikowi Sopel
Jesli i wy znacie jakies bledy w instrukcjach - prosze o powiadomienie na PW i po sprawdzeniu na pewno dodam 
Devilish
Ostatnia aktualizacja: 28.12.2006
Pomocy nt. forum lub/i php udzielam tylko na forum.