Witam,
pisałem juz na phpbb2.pl, ale nie wiem co się z tamtym forum stało, nie ma juz tam tak zgranej ekipy, nikt nie pomoze
A więc tak, pierwszy błąd polega na tym, że jak dodam jakieś posty do subfor, do nie wyświetla ich jako posty/tematy na głównej, zawsze pisze: posty: 0, tematy: 0. Da się jakoś ustawić, żeby pokazywało posty i tematy?. Ew. jaki plik mam podać/pokazać?
Pozdrawiam, Meon.
Adres forum to: www.gsmclub.org.
Problem z Simplesubforums.
Re: Problem z Simplesubforums.
Przeanalizuj czy dobrze wykonałeś instrukcję instalacji moda w pliku
index.php
.Re: Problem z Simplesubforums.
Masz może jeszcze instrukcje tego moda, bo już na phpbb2.pl nie ma. Nie umiem znaleźć, nawet na phpbb.com zmienili na simple subforums pod BB3.
Re: Problem z Simplesubforums.
U nas to już poszukać nie mogłeś :>.
http://www.phpbb.pl/pliki-k31/73/
http://www.phpbb.pl/pliki-k31/73/
Re: Problem z Simplesubforums.
Sorki, może jestem głupi, ale jakaś taka ,,inna" ta instrukcja niż standardowa.
Proszę index.php:
gsmclub.org/index'io
Pozdrawiam.
Proszę index.php:
gsmclub.org/index'io
Pozdrawiam.
Re: Problem z Simplesubforums.
Masz instrukcję dla index.php
Sprawdź też plik index_body.tpl (jak pobrałeś paczkę z modem i ją rozpakowałeś to uruchom plik simple_subforums_1.0.2.xml w przeglądarce).
Kod: Zaznacz cały
#
#-----[ OPEN ]------------------------------------------
#
index.php
#
#-----[ FIND ]------------------------------------------
#
while ($row = $db->sql_fetchrow($result))
{
$category_rows[] = $row;
}
$db->sql_freeresult($result);
#
#-----[ AFTER, ADD ]------------------------------------------
#
// Begin Simple Subforums MOD
$subforums_list = array();
// End Simple Subforums MOD
#
#-----[ FIND ]------------------------------------------
#
'L_FORUM' => $lang['Forum'],
#
#-----[ AFTER, ADD ]------------------------------------------
#
// Begin Simple Subforums MOD
'L_SUBFORUMS' => $lang['Subforums'],
// End Simple Subforums MOD
#
#-----[ FIND ]------------------------------------------
#
$folder_image = $images['forum_locked'];
$folder_alt = $lang['Forum_locked'];
#
#-----[ AFTER, ADD ]------------------------------------------
#
// Begin Simple Subforums MOD
$unread_topics = false;
$folder_images = array(
'default' => $folder_image,
'new' => $images['forum_locked'],
'sub' => ( isset($images['forums_locked']) ) ? $images['forums_locked'] : $images['forum_locked'],
'subnew' => ( isset($images['forums_locked']) ) ? $images['forums_locked'] : $images['forum_locked'],
'subalt' => $lang['Forum_locked'],
'subaltnew' => $lang['Forum_locked'],
);
// End Simple Subforums MOD
#
#-----[ FIND ]------------------------------------------
#
$folder_image = ( $unread_topics ) ? $images['forum_new'] : $images['forum'];
$folder_alt = ( $unread_topics ) ? $lang['New_posts'] : $lang['No_new_posts'];
#
#-----[ AFTER, ADD ]------------------------------------------
#
// Begin Simple Subforums MOD
$folder_images = array(
'default' => $folder_image,
'new' => $images['forum_new'],
'sub' => ( isset($images['forums']) ) ? $images['forums'] : $images['forum'],
'subnew' => ( isset($images['forums_new']) ) ? $images['forums_new'] : $images['forum_new'],
'subalt' => $lang['No_new_posts'],
'subaltnew' => $lang['New_posts'],
);
// End Simple Subforums MOD
#
#-----[ FIND ]------------------------------------------
#
$last_post .= '<a href="' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $forum_data[$j]['forum_last_post_id']) . '#' . $forum_data[$j]['forum_last_post_id'] . '"><img src="' . $images['icon_latest_reply'] . '" border="0" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '" /></a>';
#
#-----[ AFTER, ADD ]------------------------------------------
#
// Begin Simple Subforums MOD
$last_post_sub = '<a href="' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $forum_data[$j]['forum_last_post_id']) . '#' . $forum_data[$j]['forum_last_post_id'] . '"><img src="' . ($unread_topics ? $images['icon_newest_reply'] : $images['icon_latest_reply']) . '" border="0" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '" /></a>';
$last_post_time = $forum_data[$j]['post_time'];
// End Simple Subforums MOD
#
#-----[ FIND ]------------------------------------------
#
$last_post = $lang['No_Posts'];
#
#-----[ AFTER, ADD ]------------------------------------------
#
// Begin Simple Subforums MOD
$last_post_sub = '<img src="' . $images['icon_minipost'] . '" border="0" alt="' . $lang['No_Posts'] . '" title="' . $lang['No_Posts'] . '" />';
$last_post_time = 0;
// End Simple Subforums MOD
#
#-----[ FIND ]------------------------------------------
#
$moderator_list = ' ';
#
#-----[ IN-LINE FIND ]------------------------------------------
#
' ';
#
#-----[ IN-LINE REPLACE WITH ]------------------------------------------
#
'';
#
#-----[ FIND ]------------------------------------------
#
'L_FORUM_FOLDER_ALT' => $folder_alt,
#
#-----[ AFTER, ADD ]------------------------------------------
#
// Begin Simple Subforums MOD
'FORUM_FOLDERS' => serialize($folder_images),
'HAS_SUBFORUMS' => 0,
'PARENT' => $forum_data[$j]['forum_parent'],
'ID' => $forum_data[$j]['forum_id'],
'UNREAD' => intval($unread_topics),
'TOTAL_UNREAD' => intval($unread_topics),
'TOTAL_POSTS' => $forum_data[$j]['forum_posts'],
'TOTAL_TOPICS' => $forum_data[$j]['forum_topics'],
'LAST_POST_FORUM' => $last_post,
'LAST_POST_TIME' => $last_post_time,
'LAST_POST_TIME_FORUM' => $last_post_time,
// End Simple Subforums MOD
#
#-----[ FIND ]------------------------------------------
#
'U_VIEWFORUM' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id"))
);
#
#-----[ AFTER, ADD ]------------------------------------------
#
// Begin Simple Subforums MOD
if( $forum_data[$j]['forum_parent'] )
{
$subforums_list[] = array(
'forum_data' => $forum_data[$j],
'folder_image' => $folder_image,
'last_post' => $last_post,
'last_post_sub' => $last_post_sub,
'moderator_list' => $moderator_list,
'unread_topics' => $unread_topics,
'l_moderators' => $l_moderators,
'folder_alt' => $folder_alt,
'last_post_time' => $last_post_time,
'desc' => $forum_data[$j]['forum_desc'],
);
}
// End Simple Subforums MOD
#
#-----[ FIND ]------------------------------------------
#
else
{
message_die(GENERAL_MESSAGE, $lang['No_forums']);
}
#
#-----[ AFTER, ADD ]------------------------------------------
#
// Begin Simple Subforums MOD
unset($data);
unset($item);
unset($cat_item);
unset($row_item);
for( $i = 0; $i < count($subforums_list); $i++ )
{
$forum_data = $subforums_list[$i]['forum_data'];
$parent_id = $forum_data['forum_parent'];
// Find parent item
if( isset($template->_tpldata['catrow.']) )
{
$data = &$template->_tpldata['catrow.'];
$count = count($data);
for( $j = 0; $j < $count; $j++)
{
$cat_item = &$data[$j];
$row_item = &$cat_item['forumrow.'];
$count2 = count($row_item);
for( $k = 0; $k < $count2; $k++)
{
if( $row_item[$k]['ID'] == $parent_id )
{
$item = &$row_item[$k];
break;
}
}
if( isset($item) )
{
break;
}
}
}
if( isset($item) )
{
if( isset($item['sub.']) )
{
$num = count($item['sub.']);
$data = &$item['sub.'];
}
else
{
$num = 0;
$item[] = 'sub.';
$data = &$item['sub.'];
}
// Append new entry
$data[] = array(
'NUM' => $num,
'FORUM_FOLDER_IMG' => $subforums_list[$i]['folder_image'],
'FORUM_NAME' => $forum_data['forum_name'],
'FORUM_DESC' => $forum_data['forum_desc'],
'FORUM_DESC_HTML' => htmlspecialchars(preg_replace('@<[\/\!]*?[^<>]*?>@si', '', $forum_data['forum_desc'])),
'POSTS' => $forum_data['forum_posts'],
'TOPICS' => $forum_data['forum_topics'],
'LAST_POST' => $subforums_list[$i]['last_post'],
'LAST_POST_SUB' => $subforums_list[$i]['last_post_sub'],
'LAST_TOPIC' => $forum_data['topic_title'],
'MODERATORS' => $subforums_list[$i]['moderator_list'],
'PARENT' => $forum_data['forum_parent'],
'ID' => $forum_data['forum_id'],
'UNREAD' => intval($subforums_list[$i]['unread_topics']),
'L_MODERATOR' => $subforums_list[$i]['l_moderators'],
'L_FORUM_FOLDER_ALT' => $subforums_list[$i]['folder_alt'],
'U_VIEWFORUM' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . '=' . $forum_data['forum_id'])
);
$item['HAS_SUBFORUMS'] ++;
$item['TOTAL_UNREAD'] += intval($subforums_list[$i]['unread_topics']);
// Change folder image
$images = unserialize($item['FORUM_FOLDERS']);
$item['FORUM_FOLDER_IMG'] = $item['TOTAL_UNREAD'] ? $images['subnew'] : $images['sub'];
$item['L_FORUM_FOLDER_ALT'] = $item['TOTAL_UNREAD'] ? $images['subaltnew'] : $images['subalt'];
// Check last post
if( $item['LAST_POST_TIME'] < $subforums_list[$i]['last_post_time'] )
{
$item['LAST_POST'] = $subforums_list[$i]['last_post'];
$item['LAST_POST_TIME'] = $subforums_list[$i]['last_post_time'];
}
if( !$item['LAST_POST_TIME_FORUM'] )
{
$item['LAST_POST_FORUM'] = $item['LAST_POST'];
}
// Add topics/posts
$item['TOTAL_POSTS'] += $forum_data['forum_posts'];
$item['TOTAL_TOPICS'] += $forum_data['forum_topics'];
}
unset($item);
unset($data);
unset($cat_item);
unset($row_item);
}
// End Simple Subforums MOD
Re: Problem z Simplesubforums.
Najpierw rozpakuj paczkę, następnie wejdź w rozpakowany folder i otwórz dopiero ten plik w firefoxie.