Mam problem z pewnym modem, ktory pokazuje ilosć stworzonych tematów pod avatarem.
Treść modu:
Kod: Zaznacz cały
--> Pliki do wyedytowania <--
search.php
viewtopic.php
templates/TWÓJ_STYL/viewtopic_body.tpl
###########################################
--> OTWÓRZ PLIK: search.php <--
--> ZNAJDŹ: <--
$show_results = ( isset($HTTP_POST_VARS['show_results']) ) ? $HTTP_POST_VARS['show_results'] : 'posts';
--> PO TYM DODAJ: <--
$show_results = ( isset($HTTP_GET_VARS['show_results']) ) ? $HTTP_GET_VARS['show_results'] : $show_results;
--> ZAPISZ I ZAMKNIJ PLIK <--
###########################################
--> OTWÓRZ PLIK: viewtopic.php <--
--> ZNAJDŹ: <--
$sql = "SELECT p.post_id, p.post_time, p.enable_sig, p.enable_html, p.enable_smilies,
[...]
GROUP by p.post_id
ORDER BY p.post_order, p.post_time $post_time_order
LIMIT $start, $user_posts_per_page";
--> ZMIEŃ TO NA: <--
$sql = "SELECT p.post_id, p.post_time, p.enable_sig, p.enable_html, p.enable_smilies, p.post_edit_count, p.post_edit_time, p.post_username, p.post_approve, p.poster_delete, p.post_edit_by, p.post_parent" . $sgv . "u.user_id, u.username, u.user_level, u.user_jr, u.user_allowhtml, u.user_posts, u.user_allowsig, u.user_sig, u.user_sig_bbcode_uid, u.user_allowsmile, u.user_avatar_type, u.user_allowavatar, u.user_avatar, u.user_rank, u.user_viewemail, u.user_website, u.user_email, u.can_custom_ranks, u.user_custom_rank, u.user_session_time, u.user_allow_viewonline, pt.post_text, pt.bbcode_uid, pt.post_subject, COUNT(t.topic_id) as all_topics $ph_field
FROM " . POSTS_TABLE . " p
$ph_table
LEFT JOIN " . POSTS_TEXT_TABLE . " pt ON (pt.post_id = p.post_id)
LEFT JOIN " . USERS_TABLE . " u ON (u.user_id = p.poster_id)
LEFT JOIN " . TOPICS_TABLE . " t ON (t.topic_poster = p.poster_id)
WHERE p.topic_id = $topic_id
$limit_posts_time
GROUP by p.post_id
ORDER BY p.post_order, p.post_time $post_time_order
LIMIT $start, $user_posts_per_page";
--> ZNAJDŹ: <--
$template->assign_block_vars('postrow', array(
--> PRZED TYM DODAJ: <--
$poster_topics = ( $postrow[$i]['all_topics'] ) ? $lang['Topics'] . ': <a target="_blank" class="gensmall" href="' . append_sid('search.php?search_author='.$poster_username.'&show_results=topics') . '">' . $postrow[$i]['all_topics'] . '</a><br />' : $lang['Topics'] . ': 0<br />';
--> ZNAJDŹ: <--
'POSTER_AVATAR' => $poster_avatar,
--> PO TYM DODAJ: <--
'POSTER_TOPICS' => $poster_topics,
--> ZAPISZ I ZAMKNIJ PLIK <--
Problem polega na:
Sprawdzałem prawie wszystkie fora i te ktore sprawdziłem- na nich mod dobrze działa - wyswietla liczbę tematów.
Ale w jednym forum dzienie- źle wyświetla ilosc stworzonych tematów
przykład:
We wszystkich forach to wygląda tak:
I liczba tematow jest taka sama.
Ale w jednym forum (i to chyba tylko w tym) mod dziwnie sie zachowuje...
Jesli w tym forum odpisuje na jakis temat to ilosc tematów jest prwidłowa (tak jak na innych forach), ale kiedy ja jestem autorem jakiegos tematu w tym forum ta ilosć jest inna ^^
Przykłądowe tematy z tego jednego forum:
(ja jestem autorem tematu)
Ktoś ma jakiśpomyssł dalczego tak jest?