chatbox_v119g installation prob
Verfasst: 17.03.2006 02:04
tach erst mal,ich habe folgendes prob ich habe versucht das chatboxmod zu insten aba irgend was habe ich wohl falsch gemacht
mein board besteht aus :phpBB-2.0.19 und den mod mod-CH_214_installed
mein board habe ich eingedeutscht
anbei schicke ich mal die 3 dateien,die ich ändern mußte
index.php:
<?php
/***************************************************************************
* index.php
* ---------
* begin : 25/08/2004
* copyright : Ptirhiik
* email : ptirhiik@clanmckeen.com
*
* Version : 0.0.7 - 31/10/2005
*
***************************************************************************/
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
include($config->url('includes/class_forums'));
include($config->url('includes/class_topics'));
include($config->url('includes/class_stats'));
// read parms
$forum_id = _read(POST_FORUM_URL, TYPE_INT);
$mark_allowed = array('forums' => POST_FORUM_URL, 'topics' => POST_TOPIC_URL);
$mark = _read('mark', TYPE_NO_HTML, '', array('' => '') + $mark_allowed);
// read forums
$forums = new forums();
$forums->read();
//
// Start session management
//
$userdata = session_pagestart($user_ip, empty($forum_id) ? PAGE_INDEX : $forum_id);
init_userprefs($userdata);
//
// End session management
//
// init objects
$user->get_cache(array(POST_FORUM_URL, POST_FORUM_URL . 'jbox'));
// check user access
if ( !$user->auth(POST_FORUM_URL, 'auth_view', $forum_id) )
{
if ( !$user->data['session_logged_in'] )
{
redirect($config->url('login', array('redirect' => str_replace('?', '&', $config->url('index', array(POST_FORUM_URL => $forum_id)))), true));
}
message_return('Forum_not_exist');
}
// link forum type
if ( $forums->data[$forum_id]['forum_type'] == POST_LINK_URL )
{
if ( empty($forums->data[$forum_id]['forum_link']) )
{
message_return('Not_available');
}
if ( $forums->data[$forum_id]['forum_link_hit_count'] )
{
$sql = 'UPDATE ' . FORUMS_TABLE . '
SET forum_link_hit = forum_link_hit + 1
WHERE forum_id = ' . $forum_id;
$db->sql_query($sql, false, __LINE__, __FILE__);
}
redirect($forums->data[$forum_id]['forum_link']);
}
// process mark actions
if ( $mark )
{
$forums->mark($mark_allowed[$mark], $forum_id);
}
// actualize data (required for pruning action)
$forums->refresh($forum_id);
// forum prune
if ( $user->auth(POST_FORUM_URL, 'auth_mod', $forum_id) && $config->data['prune_enable'] )
{
if ( ($forums->data[$forum_id]['prune_next'] < time()) && $forums->data[$forum_id]['prune_enable'] )
{
include($config->url('includes/prune'));
require($config->url('includes/functions_admin'));
auto_prune($forum_id);
}
}
// Mozilla navigation bar
if ( !empty($forum_id) )
{
$nav_links['top'] = array(
'url' => $config->url('index', '', true),
'title' => $forums->data[$forum_id]['forum_name'],
);
$nav_links['up'] = array(
'url' => $config->url('index', array(POST_FORUM_URL => intval($forums->data[$forum_id]['forum_main'])), true),
'title' => $forums->data[ intval($forums->data[$forum_id]['forum_main']) ]['forum_name'],
);
}
//
// Start output of page
//
$page_title = empty($forum_id) ? $user->lang('Index') . ' - ' . $config->data['sitename'] : $user->lang('View_forum') . ' - ' . $user->lang($forums->data[$forum_id]['forum_name']);
// get topics for this forum (and section announces if asked)
$topics = new topics();
$topics->read($forum_id);
// board announces
$board_topics = $topics->get_display(true, false);
// forum topics
$forum_topics = $topics->get_display(false, ($forums->data[$forum_id]['forum_type'] == POST_FORUM_URL));
// display forums
$forums->display($forum_id);
// if nothing to display, send message
if ( empty($forum_topics) && !$forums->displayed )
{
if ( empty($forum_id) && empty($board_topics) )
{
message_die(GENERAL_MESSAGE, $user->lang('No_forums'));
}
if ( !empty($forum_id) )
{
$parent = intval($forums->data[$forum_id]['forum_main']);
$l_link = empty($parent) ? '' : 'Click_return_parent';
$u_link = empty($parent) ? '' : $config->url('index', array(POST_FORUM_URL => $parent), true);
message_return('Cat_no_subs', $l_link, $u_link);
}
}
// forum rules
$s_auth_can = '';
if ( $forums->data[$forum_id]['forum_type'] == POST_FORUM_URL )
{
$s_auth_can = ($user->auth(POST_FORUM_URL, 'auth_post', $forum_id) ? $user->lang('Rules_post_can') : $user->lang('Rules_post_cannot')) . '<br />';
$s_auth_can .= ($user->auth(POST_FORUM_URL, 'auth_reply', $forum_id) ? $user->lang('Rules_reply_can') : $user->lang('Rules_reply_cannot')) . '<br />';
$s_auth_can .= ($user->auth(POST_FORUM_URL, 'auth_edit', $forum_id) ? $user->lang('Rules_edit_can') : $user->lang('Rules_edit_cannot')) . '<br />';
$s_auth_can .= ($user->auth(POST_FORUM_URL, 'auth_delete', $forum_id) ? $user->lang('Rules_delete_can') : $user->lang('Rules_delete_cannot')) . '<br />';
$s_auth_can .= ($user->auth(POST_FORUM_URL, 'auth_vote', $forum_id) ? $user->lang('Rules_vote_can') : $user->lang('Rules_vote_cannot')) . '<br />';
if ( !empty($config->data['mod_topic_calendar_CH']) )
{
$s_auth_can .= ($user->auth(POST_FORUM_URL, 'auth_calendar', $forum_id) ? $user->lang('Rules_calendar_can') : $user->lang('Rules_calendar_cannot')) . '<br />';
}
$s_auth_can .= ($user->auth(POST_FORUM_URL, 'auth_mod', $forum_id) ? sprintf($user->lang('Rules_moderate'), '<a href="' . $config->url('modcp', array(POST_FORUM_URL => $forum_id, 'start' => _read('start', TYPE_INT), 'sid' => $user->data['session_id']), true) . '">', '</a>') : '') . '<br />';
}
// send to template
// ChatBox Mod
require_once($phpbb_root_path . 'chatbox_front.php');
$template->assign_vars(array(
'BOARD_TOPICS' => $board_topics,
'FORUM_TOPICS' => $forum_topics,
'U_MARK_READ' => $config->url('index', array(POST_FORUM_URL => $forum_id, 'mark' => 'forums'), true),
'L_MARK_READ' => $user->lang('Mark_all_forums'),
'I_MARK_READ' => $user->img('forum_mark_read'),
'S_AUTH_LIST' => $s_auth_can,
'FORUM_IMG' => $user->img('forum'),
'FORUM_NEW_IMG' => $user->img('forum_new'),
'FORUM_LOCKED_IMG' => $user->img('forum_locked'),
'FORUM_LINK_IMG' => $user->img('link'),
'FOLDER_IMG' => $user->img('folder'),
'FOLDER_NEW_IMG' => $user->img('folder_new'),
'FOLDER_HOT_IMG' => $user->img('folder_hot'),
'FOLDER_LOCKED_IMG' => $user->img('folder_locked'),
'FOLDER_OWN_IMG' => $user->img('folder_own'),
'FOLDER_STICKY_IMG' => $user->img('folder_sticky'),
'FOLDER_ANNOUNCE_IMG' => $user->img('folder_announce'),
'FOLDER_CALENDAR_IMG' => $user->img('folder_calendar'),
'FOLDER_MOVED_IMG' => $user->img('folder_moved'),
'L_NO_NEW_POSTS' => $user->lang('No_new_posts'),
'L_NEW_POSTS' => $user->lang('New_posts'),
'L_FORUM_LOCKED' => $user->lang('Forum_is_locked'),
'L_FORUM_LINK' => $user->lang('Link'),
'L_TOPIC_MOVED' => $user->lang('Topic_Moved'),
'L_TOPIC_HOT' => $user->lang('Hot_topic'),
'L_TOPIC_LOCKED' => $user->lang('Topic_Locked'),
'L_TOPIC_OWN' => $user->lang('Own_topic'),
'L_STICKY' => $user->lang('Post_Sticky'),
'L_ANNOUNCEMENT' => $user->lang('Post_Announcement'),
'S_ACTION' => $config->url('index', array(POST_FORUM_URL => $forum_id), true),
'TOTAL_CHATTERS_ONLINE' => sprintf($lang['How_Many_Chatters'], $howmanychat),
'CHATTERS_LIST' => sprintf($lang['Who_Are_Chatting' ], $chatters),
'L_CLICK_TO_JOIN_CHAT' => $lang['Click_to_join_chat'],
'S_JOIN_CHAT' => append_sid("chatbox_mod/chatbox.$phpEx"),
'CHATBOX_NAME' => $userdata['user_id'] . '_ChatBox', // To make easier to test on my PC
'L_LOGIN_TO_JOIN_CHAT' => $lang['Login_to_join_chat'],
));
$template->set_switch('mark', $forums->displayed && $user->data['session_logged_in']);
$template->set_switch('forum_legend', $forums->data[$forum_id]['forum_type'] != POST_FORUM_URL);
$template->set_switch('board_topics_spacing', !empty($board_topics));
$template->set_switch('forums_spacing', $forums->displayed && !empty($forum_topics));
$template->set_switch('forum_topics_spacing', !empty($forum_topics));
// stats
$stats = new stats();
$stats->display($forum_id);
// jumpbox
make_jumpbox('index', $forum_id);
// display nav
$forums->display_nav($forum_id);
// Generate the page
include($config->url('includes/page_header'));
$template->set_filenames(array('body' => 'index_body.tpl'));
$template->pparse('body');
include($config->url('includes/page_tail'));
?>
index_body.tlp
<table width="100%" cellspacing="0" cellpadding="2" border="0" align="center">
<tr>
<td align="left" valign="bottom"><span class="gensmall">
<!-- BEGIN switch_user_logged_in -->
{LAST_VISIT_DATE}<br />
<!-- END switch_user_logged_in -->
{CURRENT_TIME}<br />
{S_TIMEZONE}
</span></td>
<td align="right" valign="bottom" class="gensmall">
<a href="{U_SEARCH_NEW}" class="gensmall">{L_SEARCH_NEW}</a><br />
<!-- BEGIN switch_user_logged_in -->
<a href="{U_SEARCH_SELF}" class="gensmall">{L_SEARCH_SELF}</a><br />
<!-- END switch_user_logged_in -->
<a href="{U_SEARCH_UNANSWERED}" class="gensmall">{L_SEARCH_UNANSWERED}</a>
</td>
</tr>
</table>
<br class="nav" />
{BOARD_TOPICS}
<!-- BEGIN board_topics_spacing --><br class="nav" /><!-- END board_topics_spacing -->
<form method="post" action="{S_ACTION}">
{NAVIGATION_BOX}
<!-- BEGIN indexrow -->
<!-- BEGIN header -->
<table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline">
<tr>
<th colspan="2" class="thCornerL" height="25" nowrap="nowrap" width="100%"> {L_FORUM} </th>
<th width="70" class="thTop" nowrap="nowrap"> {L_TOPICS} </th>
<th width="70" class="thTop" nowrap="nowrap"> {L_POSTS} </th>
<th width="200" class="thCornerR" nowrap="nowrap"> {L_LASTPOST} </th>
</tr>
<!-- END header -->
<!-- BEGIN cat -->
<!-- BEGIN header -->
<!-- END header -->
<!-- BEGIN row -->
<tr>
<td class="catLeft" colspan="2" height="28"><span class="cattitle">
<a href="{indexrow.cat.U_VIEWCAT}" class="cattitle">{indexrow.cat.CAT_DESC}</a>
</span></td>
<td class="rowpic" colspan="3" align="right"> </td>
</tr>
<!-- END row -->
<!-- BEGIN footer -->
<!-- END footer -->
<!-- END cat -->
<!-- BEGIN forum -->
<!-- BEGIN header -->
<!-- END header -->
<!-- BEGIN row -->
<tr>
<td class="row1" align="center" valign="middle" width="50" height="50">
<img src="{indexrow.forum.I_FORUM_FOLDER}" border="0" alt="{indexrow.forum.L_FORUM_FOLDER}" title="{indexrow.forum.L_FORUM_FOLDER}" />
</td>
<td class="row1" height="50" width="100%">
<!-- BEGIN forum_icon -->
<table cellpadding="0" cellspacing="0" width="100%" border="0"><tr>
<td><a href="{indexrow.forum.U_VIEWFORUM}" class="forumlink"><img src="{indexrow.forum.FORUM_ICON}" border="0" alt="" title="" /></a></td><td><span class="gen"> </span></td><td width="100%">
<!-- END forum_icon -->
<span class="forumlink"><a href="{indexrow.forum.U_VIEWFORUM}" class="forumlink">{indexrow.forum.FORUM_NAME}</a><br /></span>
<span class="genmed">{indexrow.forum.FORUM_DESC}<br /></span>
<!-- BEGIN moderators -->
<span class="gensmall">
<b>{L_MODERATORS}: </b><!-- BEGIN mod --><a href="{indexrow.forum.row.moderators.mod.U_MOD}" title="{indexrow.forum.row.moderators.mod.L_MOD_TITLE}" class="gensmall">{indexrow.forum.row.moderators.mod.L_MOD}</a><!-- BEGIN sep -->, <!-- END sep --><!-- END mod -->
<br /></span>
<!-- END moderators -->
<!-- BEGIN subforums -->
<span class="gensmall">
<b>{L_SUBFORUMS}:</b> <!-- BEGIN sub --><img src="{indexrow.forum.row.subforums.sub.I_SUB}" border="0" align="middle" alt="{indexrow.forum.row.subforums.sub.L_SUB_ALT}" title="{indexrow.forum.row.subforums.sub.L_SUB_ALT}" hspace="2" /><a href="{indexrow.forum.row.subforums.sub.U_SUB}" title="{indexrow.forum.row.subforums.sub.L_SUB_DESC}" class="gensmall">{indexrow.forum.row.subforums.sub.L_SUB}</a><!-- BEGIN sep -->, <!-- END sep --><!-- END sub -->
<br /></span>
<!-- END subforums -->
<!-- BEGIN forum_icon -->
</td></tr></table>
<!-- END forum_icon -->
</td>
<!-- BEGIN auth_read -->
<td class="row2" align="center" valign="middle" height="50"><span class="gensmall">{indexrow.forum.TOPICS}</span></td>
<td class="row2" align="center" valign="middle" height="50"><span class="gensmall">{indexrow.forum.POSTS}</span></td>
<td class="row3Right" align="center" valign="middle" height="50" nowrap="nowrap"><span class="gensmall">
<!-- BEGIN last_post -->
<a href="{indexrow.forum.U_LAST_TOPIC}" class="gensmall" title="{indexrow.forum.LAST_TOPIC_TITLE_ALT}">{indexrow.forum.LAST_TOPIC_TITLE}</a><br />
{indexrow.forum.LAST_POST_TIME}<br />
<!-- BEGIN userlink --><a href="{indexrow.forum.U_LAST_POSTER}" class="gensmall" title="{L_LAST_POSTER}"><!-- END userlink -->{indexrow.forum.LAST_POSTER}<!-- BEGIN userlink --></a><!-- END userlink -->
<a href="{indexrow.forum.U_LAST_POST}" class="gensmall" title="{L_LAST_POST}"><img src="{I_LAST_POST}" border="0" alt="{L_LAST_POST}" /></a><br />
<!-- BEGINELSE last_post -->
{L_NO_POSTS}
<!-- END last_post -->
</span></td>
<!-- BEGINELSE auth_read -->
<td class="row3Right" colspan="3" align="center"><span class="gensmall">
{L_AUTH_REQ}
</span></td>
<!-- END auth_read -->
</tr>
<!-- END row -->
<!-- BEGIN footer -->
<!-- END footer -->
<!-- END forum -->
<!-- BEGIN link -->
<!-- BEGIN header -->
<!-- END header -->
<!-- BEGIN row -->
<tr>
<td class="row1" align="center" valign="middle" height="50" width="50">
<img src="{indexrow.link.I_FORUM_FOLDER}" border="0" alt="{indexrow.link.L_FORUM_FOLDER}" title="{indexrow.link.L_FORUM_FOLDER}" />
</td>
<td class="row1" height="50" width="100%">
<!-- BEGIN forum_icon -->
<table cellpadding="0" cellspacing="0" width="100%" border="0"><tr>
<td><a href="{indexrow.link.U_VIEWFORUM}" class="forumlink"><img src="{indexrow.link.FORUM_ICON}" border="0" alt="" title="" /></a></td><td><span class="gen"> </span></td><td width="100%">
<!-- END forum_icon -->
<span class="forumlink"><a href="{indexrow.link.U_VIEWFORUM}" class="forumlink">{indexrow.link.FORUM_NAME}</a><br /></span>
<span class="genmed">{indexrow.link.FORUM_DESC}<br /></span>
<!-- BEGIN subforums -->
<span class="gensmall">
<b>{L_SUBFORUMS}:</b> <!-- BEGIN sub --><img src="{indexrow.link.row.subforums.sub.I_SUB}" border="0" align="middle" alt="{indexrow.link.row.subforums.sub.L_SUB_ALT}" title="{indexrow.link.row.subforums.sub.L_SUB_ALT}" hspace="2" /><a href="{indexrow.link.row.subforums.sub.U_SUB}" title="{indexrow.link.row.subforums.sub.L_SUB_DESC}" class="gensmall">{indexrow.link.row.subforums.sub.L_SUB}</a><!-- BEGIN sep -->, <!-- END sep --><!-- END sub -->
<br /></span>
<!-- END subforums -->
<!-- BEGIN forum_icon -->
</td></tr></table>
<!-- END forum_icon -->
</td>
<td class="row3Right" align="center" valign="middle" height="50" colspan="3" width="340"><span class="gensmall">
{indexrow.link.HITS}
</span></td>
</tr>
<!-- END row -->
<!-- BEGIN footer -->
<!-- END footer -->
<!-- END link -->
<!-- BEGIN footer -->
</table>
<!-- END footer -->
<!-- BEGIN spacing --><br class="nav" /><!-- END spacing -->
<!-- END indexrow -->
<!-- BEGIN forums_spacing --><br class="nav" /><!-- END forums_spacing -->
{FORUM_TOPICS}
{NAVIGATION_ONLY_BOX}
</form>
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
<td nowrap="nowrap" align="right">{JUMPBOX}</td>
</tr>
</table>
<br />
{STATS_BOX}
<!-- BEGIN switch_user_logged_out -->
<br class="nav" />
<form method="post" action="{S_LOGIN_ACTION}"><table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">
<tr>
<td class="catHead" height="28"><a name="login"></a><span class="cattitle">{L_LOGIN_LOGOUT}</span></td>
</tr>
<tr>
<td class="row1" align="center" valign="middle" height="28"><span class="gensmall">
{L_USERNAME}: <input class="post" type="text" name="username" size="10" />
{L_PASSWORD}: <input class="post" type="password" name="password" size="10" maxlength="32" />
<!-- BEGIN switch_allow_autologin -->
{L_AUTO_LOGIN} <input class="text" type="checkbox" name="autologin" />
<!-- END switch_allow_autologin -->
<input type="submit" class="mainoption" name="login" value="{L_LOGIN}" />
</span> </td>
</tr>
</table></form>
<!-- END switch_user_logged_out -->
<!-- BEGIN forum_legend -->
<br class="nav" />
<table cellspacing="3" border="0" align="center" cellpadding="0">
<tr>
<td width="20" align="center"><img src="{FORUM_NEW_IMG}" alt="{L_NEW_POSTS}" /></td>
<td><span class="gensmall">{L_NEW_POSTS}</span></td>
<td> </td>
<td width="20" align="center"><img src="{FORUM_IMG}" alt="{L_NO_NEW_POSTS}" /></td>
<td><span class="gensmall">{L_NO_NEW_POSTS}</span></td>
<td> </td>
<td width="20" align="center"><img src="{FORUM_LOCKED_IMG}" alt="{L_FORUM_LOCKED}" /></td>
<td><span class="gensmall">{L_FORUM_LOCKED}</span></td>
<td> </td>
<td width="20" align="center"><img src="{FORUM_LINK_IMG}" alt="{L_FORUM_LINK}" /></td>
<td><span class="gensmall">{L_FORUM_LINK}</span></td>
</tr>
</table>
<!-- END forum_legend -->
<!-- BEGIN forum_legend_ELSE -->
<br class="nav" />
<table width="100%" cellspacing="0" border="0" align="center" cellpadding="0">
<tr>
<td align="left" valign="top"><table cellspacing="3" cellpadding="0" border="0">
<tr>
<td width="20" align="left"><img src="{FOLDER_NEW_IMG}" alt="{L_NEW_POSTS}" width="19" height="18" /></td>
<td class="gensmall">{L_NEW_POSTS}</td>
<td> </td>
<td width="20" align="center"><img src="{FOLDER_ANNOUNCE_IMG}" alt="{L_ANNOUNCEMENT}" width="19" height="18" /></td>
<td class="gensmall">{L_ANNOUNCEMENT}</td>
</tr>
<tr>
<td width="20" align="center"><img src="{FOLDER_IMG}" alt="{L_NO_NEW_POSTS}" width="19" height="18" /></td>
<td class="gensmall">{L_NO_NEW_POSTS}</td>
<td> </td>
<td width="20" align="center"><img src="{FOLDER_STICKY_IMG}" alt="{L_STICKY}" width="19" height="18" /></td>
<td class="gensmall">{L_STICKY}</td>
</tr>
<tr>
<td width="20" align="center"><img src="{FOLDER_HOT_IMG}" alt="{L_TOPIC_HOT}" width="19" height="18" /></td>
<td class="gensmall">{L_TOPIC_HOT}</td>
<td> </td>
<td width="20" align="center"><img src="{FOLDER_LOCKED_IMG}" alt="{L_TOPIC_LOCKED}" width="19" height="18" /></td>
<td class="gensmall">{L_TOPIC_LOCKED}</td>
</tr>
<tr>
<td width="20" align="center"><img src="{FOLDER_OWN_IMG}" alt="{L_TOPIC_OWN}" width="19" height="18" /></td>
<td class="gensmall" colspan="4">{L_TOPIC_OWN}</td>
</tr>
</table></td>
<td align="right"><span class="gensmall">{S_AUTH_LIST}</span></td>
</tr>
</table>
<!-- END forum_legend_ELSE -->
<br clear="all" />
mein board besteht aus :phpBB-2.0.19 und den mod mod-CH_214_installed
mein board habe ich eingedeutscht
anbei schicke ich mal die 3 dateien,die ich ändern mußte
index.php:
<?php
/***************************************************************************
* index.php
* ---------
* begin : 25/08/2004
* copyright : Ptirhiik
* email : ptirhiik@clanmckeen.com
*
* Version : 0.0.7 - 31/10/2005
*
***************************************************************************/
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
include($config->url('includes/class_forums'));
include($config->url('includes/class_topics'));
include($config->url('includes/class_stats'));
// read parms
$forum_id = _read(POST_FORUM_URL, TYPE_INT);
$mark_allowed = array('forums' => POST_FORUM_URL, 'topics' => POST_TOPIC_URL);
$mark = _read('mark', TYPE_NO_HTML, '', array('' => '') + $mark_allowed);
// read forums
$forums = new forums();
$forums->read();
//
// Start session management
//
$userdata = session_pagestart($user_ip, empty($forum_id) ? PAGE_INDEX : $forum_id);
init_userprefs($userdata);
//
// End session management
//
// init objects
$user->get_cache(array(POST_FORUM_URL, POST_FORUM_URL . 'jbox'));
// check user access
if ( !$user->auth(POST_FORUM_URL, 'auth_view', $forum_id) )
{
if ( !$user->data['session_logged_in'] )
{
redirect($config->url('login', array('redirect' => str_replace('?', '&', $config->url('index', array(POST_FORUM_URL => $forum_id)))), true));
}
message_return('Forum_not_exist');
}
// link forum type
if ( $forums->data[$forum_id]['forum_type'] == POST_LINK_URL )
{
if ( empty($forums->data[$forum_id]['forum_link']) )
{
message_return('Not_available');
}
if ( $forums->data[$forum_id]['forum_link_hit_count'] )
{
$sql = 'UPDATE ' . FORUMS_TABLE . '
SET forum_link_hit = forum_link_hit + 1
WHERE forum_id = ' . $forum_id;
$db->sql_query($sql, false, __LINE__, __FILE__);
}
redirect($forums->data[$forum_id]['forum_link']);
}
// process mark actions
if ( $mark )
{
$forums->mark($mark_allowed[$mark], $forum_id);
}
// actualize data (required for pruning action)
$forums->refresh($forum_id);
// forum prune
if ( $user->auth(POST_FORUM_URL, 'auth_mod', $forum_id) && $config->data['prune_enable'] )
{
if ( ($forums->data[$forum_id]['prune_next'] < time()) && $forums->data[$forum_id]['prune_enable'] )
{
include($config->url('includes/prune'));
require($config->url('includes/functions_admin'));
auto_prune($forum_id);
}
}
// Mozilla navigation bar
if ( !empty($forum_id) )
{
$nav_links['top'] = array(
'url' => $config->url('index', '', true),
'title' => $forums->data[$forum_id]['forum_name'],
);
$nav_links['up'] = array(
'url' => $config->url('index', array(POST_FORUM_URL => intval($forums->data[$forum_id]['forum_main'])), true),
'title' => $forums->data[ intval($forums->data[$forum_id]['forum_main']) ]['forum_name'],
);
}
//
// Start output of page
//
$page_title = empty($forum_id) ? $user->lang('Index') . ' - ' . $config->data['sitename'] : $user->lang('View_forum') . ' - ' . $user->lang($forums->data[$forum_id]['forum_name']);
// get topics for this forum (and section announces if asked)
$topics = new topics();
$topics->read($forum_id);
// board announces
$board_topics = $topics->get_display(true, false);
// forum topics
$forum_topics = $topics->get_display(false, ($forums->data[$forum_id]['forum_type'] == POST_FORUM_URL));
// display forums
$forums->display($forum_id);
// if nothing to display, send message
if ( empty($forum_topics) && !$forums->displayed )
{
if ( empty($forum_id) && empty($board_topics) )
{
message_die(GENERAL_MESSAGE, $user->lang('No_forums'));
}
if ( !empty($forum_id) )
{
$parent = intval($forums->data[$forum_id]['forum_main']);
$l_link = empty($parent) ? '' : 'Click_return_parent';
$u_link = empty($parent) ? '' : $config->url('index', array(POST_FORUM_URL => $parent), true);
message_return('Cat_no_subs', $l_link, $u_link);
}
}
// forum rules
$s_auth_can = '';
if ( $forums->data[$forum_id]['forum_type'] == POST_FORUM_URL )
{
$s_auth_can = ($user->auth(POST_FORUM_URL, 'auth_post', $forum_id) ? $user->lang('Rules_post_can') : $user->lang('Rules_post_cannot')) . '<br />';
$s_auth_can .= ($user->auth(POST_FORUM_URL, 'auth_reply', $forum_id) ? $user->lang('Rules_reply_can') : $user->lang('Rules_reply_cannot')) . '<br />';
$s_auth_can .= ($user->auth(POST_FORUM_URL, 'auth_edit', $forum_id) ? $user->lang('Rules_edit_can') : $user->lang('Rules_edit_cannot')) . '<br />';
$s_auth_can .= ($user->auth(POST_FORUM_URL, 'auth_delete', $forum_id) ? $user->lang('Rules_delete_can') : $user->lang('Rules_delete_cannot')) . '<br />';
$s_auth_can .= ($user->auth(POST_FORUM_URL, 'auth_vote', $forum_id) ? $user->lang('Rules_vote_can') : $user->lang('Rules_vote_cannot')) . '<br />';
if ( !empty($config->data['mod_topic_calendar_CH']) )
{
$s_auth_can .= ($user->auth(POST_FORUM_URL, 'auth_calendar', $forum_id) ? $user->lang('Rules_calendar_can') : $user->lang('Rules_calendar_cannot')) . '<br />';
}
$s_auth_can .= ($user->auth(POST_FORUM_URL, 'auth_mod', $forum_id) ? sprintf($user->lang('Rules_moderate'), '<a href="' . $config->url('modcp', array(POST_FORUM_URL => $forum_id, 'start' => _read('start', TYPE_INT), 'sid' => $user->data['session_id']), true) . '">', '</a>') : '') . '<br />';
}
// send to template
// ChatBox Mod
require_once($phpbb_root_path . 'chatbox_front.php');
$template->assign_vars(array(
'BOARD_TOPICS' => $board_topics,
'FORUM_TOPICS' => $forum_topics,
'U_MARK_READ' => $config->url('index', array(POST_FORUM_URL => $forum_id, 'mark' => 'forums'), true),
'L_MARK_READ' => $user->lang('Mark_all_forums'),
'I_MARK_READ' => $user->img('forum_mark_read'),
'S_AUTH_LIST' => $s_auth_can,
'FORUM_IMG' => $user->img('forum'),
'FORUM_NEW_IMG' => $user->img('forum_new'),
'FORUM_LOCKED_IMG' => $user->img('forum_locked'),
'FORUM_LINK_IMG' => $user->img('link'),
'FOLDER_IMG' => $user->img('folder'),
'FOLDER_NEW_IMG' => $user->img('folder_new'),
'FOLDER_HOT_IMG' => $user->img('folder_hot'),
'FOLDER_LOCKED_IMG' => $user->img('folder_locked'),
'FOLDER_OWN_IMG' => $user->img('folder_own'),
'FOLDER_STICKY_IMG' => $user->img('folder_sticky'),
'FOLDER_ANNOUNCE_IMG' => $user->img('folder_announce'),
'FOLDER_CALENDAR_IMG' => $user->img('folder_calendar'),
'FOLDER_MOVED_IMG' => $user->img('folder_moved'),
'L_NO_NEW_POSTS' => $user->lang('No_new_posts'),
'L_NEW_POSTS' => $user->lang('New_posts'),
'L_FORUM_LOCKED' => $user->lang('Forum_is_locked'),
'L_FORUM_LINK' => $user->lang('Link'),
'L_TOPIC_MOVED' => $user->lang('Topic_Moved'),
'L_TOPIC_HOT' => $user->lang('Hot_topic'),
'L_TOPIC_LOCKED' => $user->lang('Topic_Locked'),
'L_TOPIC_OWN' => $user->lang('Own_topic'),
'L_STICKY' => $user->lang('Post_Sticky'),
'L_ANNOUNCEMENT' => $user->lang('Post_Announcement'),
'S_ACTION' => $config->url('index', array(POST_FORUM_URL => $forum_id), true),
'TOTAL_CHATTERS_ONLINE' => sprintf($lang['How_Many_Chatters'], $howmanychat),
'CHATTERS_LIST' => sprintf($lang['Who_Are_Chatting' ], $chatters),
'L_CLICK_TO_JOIN_CHAT' => $lang['Click_to_join_chat'],
'S_JOIN_CHAT' => append_sid("chatbox_mod/chatbox.$phpEx"),
'CHATBOX_NAME' => $userdata['user_id'] . '_ChatBox', // To make easier to test on my PC
'L_LOGIN_TO_JOIN_CHAT' => $lang['Login_to_join_chat'],
));
$template->set_switch('mark', $forums->displayed && $user->data['session_logged_in']);
$template->set_switch('forum_legend', $forums->data[$forum_id]['forum_type'] != POST_FORUM_URL);
$template->set_switch('board_topics_spacing', !empty($board_topics));
$template->set_switch('forums_spacing', $forums->displayed && !empty($forum_topics));
$template->set_switch('forum_topics_spacing', !empty($forum_topics));
// stats
$stats = new stats();
$stats->display($forum_id);
// jumpbox
make_jumpbox('index', $forum_id);
// display nav
$forums->display_nav($forum_id);
// Generate the page
include($config->url('includes/page_header'));
$template->set_filenames(array('body' => 'index_body.tpl'));
$template->pparse('body');
include($config->url('includes/page_tail'));
?>
index_body.tlp
<table width="100%" cellspacing="0" cellpadding="2" border="0" align="center">
<tr>
<td align="left" valign="bottom"><span class="gensmall">
<!-- BEGIN switch_user_logged_in -->
{LAST_VISIT_DATE}<br />
<!-- END switch_user_logged_in -->
{CURRENT_TIME}<br />
{S_TIMEZONE}
</span></td>
<td align="right" valign="bottom" class="gensmall">
<a href="{U_SEARCH_NEW}" class="gensmall">{L_SEARCH_NEW}</a><br />
<!-- BEGIN switch_user_logged_in -->
<a href="{U_SEARCH_SELF}" class="gensmall">{L_SEARCH_SELF}</a><br />
<!-- END switch_user_logged_in -->
<a href="{U_SEARCH_UNANSWERED}" class="gensmall">{L_SEARCH_UNANSWERED}</a>
</td>
</tr>
</table>
<br class="nav" />
{BOARD_TOPICS}
<!-- BEGIN board_topics_spacing --><br class="nav" /><!-- END board_topics_spacing -->
<form method="post" action="{S_ACTION}">
{NAVIGATION_BOX}
<!-- BEGIN indexrow -->
<!-- BEGIN header -->
<table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline">
<tr>
<th colspan="2" class="thCornerL" height="25" nowrap="nowrap" width="100%"> {L_FORUM} </th>
<th width="70" class="thTop" nowrap="nowrap"> {L_TOPICS} </th>
<th width="70" class="thTop" nowrap="nowrap"> {L_POSTS} </th>
<th width="200" class="thCornerR" nowrap="nowrap"> {L_LASTPOST} </th>
</tr>
<!-- END header -->
<!-- BEGIN cat -->
<!-- BEGIN header -->
<!-- END header -->
<!-- BEGIN row -->
<tr>
<td class="catLeft" colspan="2" height="28"><span class="cattitle">
<a href="{indexrow.cat.U_VIEWCAT}" class="cattitle">{indexrow.cat.CAT_DESC}</a>
</span></td>
<td class="rowpic" colspan="3" align="right"> </td>
</tr>
<!-- END row -->
<!-- BEGIN footer -->
<!-- END footer -->
<!-- END cat -->
<!-- BEGIN forum -->
<!-- BEGIN header -->
<!-- END header -->
<!-- BEGIN row -->
<tr>
<td class="row1" align="center" valign="middle" width="50" height="50">
<img src="{indexrow.forum.I_FORUM_FOLDER}" border="0" alt="{indexrow.forum.L_FORUM_FOLDER}" title="{indexrow.forum.L_FORUM_FOLDER}" />
</td>
<td class="row1" height="50" width="100%">
<!-- BEGIN forum_icon -->
<table cellpadding="0" cellspacing="0" width="100%" border="0"><tr>
<td><a href="{indexrow.forum.U_VIEWFORUM}" class="forumlink"><img src="{indexrow.forum.FORUM_ICON}" border="0" alt="" title="" /></a></td><td><span class="gen"> </span></td><td width="100%">
<!-- END forum_icon -->
<span class="forumlink"><a href="{indexrow.forum.U_VIEWFORUM}" class="forumlink">{indexrow.forum.FORUM_NAME}</a><br /></span>
<span class="genmed">{indexrow.forum.FORUM_DESC}<br /></span>
<!-- BEGIN moderators -->
<span class="gensmall">
<b>{L_MODERATORS}: </b><!-- BEGIN mod --><a href="{indexrow.forum.row.moderators.mod.U_MOD}" title="{indexrow.forum.row.moderators.mod.L_MOD_TITLE}" class="gensmall">{indexrow.forum.row.moderators.mod.L_MOD}</a><!-- BEGIN sep -->, <!-- END sep --><!-- END mod -->
<br /></span>
<!-- END moderators -->
<!-- BEGIN subforums -->
<span class="gensmall">
<b>{L_SUBFORUMS}:</b> <!-- BEGIN sub --><img src="{indexrow.forum.row.subforums.sub.I_SUB}" border="0" align="middle" alt="{indexrow.forum.row.subforums.sub.L_SUB_ALT}" title="{indexrow.forum.row.subforums.sub.L_SUB_ALT}" hspace="2" /><a href="{indexrow.forum.row.subforums.sub.U_SUB}" title="{indexrow.forum.row.subforums.sub.L_SUB_DESC}" class="gensmall">{indexrow.forum.row.subforums.sub.L_SUB}</a><!-- BEGIN sep -->, <!-- END sep --><!-- END sub -->
<br /></span>
<!-- END subforums -->
<!-- BEGIN forum_icon -->
</td></tr></table>
<!-- END forum_icon -->
</td>
<!-- BEGIN auth_read -->
<td class="row2" align="center" valign="middle" height="50"><span class="gensmall">{indexrow.forum.TOPICS}</span></td>
<td class="row2" align="center" valign="middle" height="50"><span class="gensmall">{indexrow.forum.POSTS}</span></td>
<td class="row3Right" align="center" valign="middle" height="50" nowrap="nowrap"><span class="gensmall">
<!-- BEGIN last_post -->
<a href="{indexrow.forum.U_LAST_TOPIC}" class="gensmall" title="{indexrow.forum.LAST_TOPIC_TITLE_ALT}">{indexrow.forum.LAST_TOPIC_TITLE}</a><br />
{indexrow.forum.LAST_POST_TIME}<br />
<!-- BEGIN userlink --><a href="{indexrow.forum.U_LAST_POSTER}" class="gensmall" title="{L_LAST_POSTER}"><!-- END userlink -->{indexrow.forum.LAST_POSTER}<!-- BEGIN userlink --></a><!-- END userlink -->
<a href="{indexrow.forum.U_LAST_POST}" class="gensmall" title="{L_LAST_POST}"><img src="{I_LAST_POST}" border="0" alt="{L_LAST_POST}" /></a><br />
<!-- BEGINELSE last_post -->
{L_NO_POSTS}
<!-- END last_post -->
</span></td>
<!-- BEGINELSE auth_read -->
<td class="row3Right" colspan="3" align="center"><span class="gensmall">
{L_AUTH_REQ}
</span></td>
<!-- END auth_read -->
</tr>
<!-- END row -->
<!-- BEGIN footer -->
<!-- END footer -->
<!-- END forum -->
<!-- BEGIN link -->
<!-- BEGIN header -->
<!-- END header -->
<!-- BEGIN row -->
<tr>
<td class="row1" align="center" valign="middle" height="50" width="50">
<img src="{indexrow.link.I_FORUM_FOLDER}" border="0" alt="{indexrow.link.L_FORUM_FOLDER}" title="{indexrow.link.L_FORUM_FOLDER}" />
</td>
<td class="row1" height="50" width="100%">
<!-- BEGIN forum_icon -->
<table cellpadding="0" cellspacing="0" width="100%" border="0"><tr>
<td><a href="{indexrow.link.U_VIEWFORUM}" class="forumlink"><img src="{indexrow.link.FORUM_ICON}" border="0" alt="" title="" /></a></td><td><span class="gen"> </span></td><td width="100%">
<!-- END forum_icon -->
<span class="forumlink"><a href="{indexrow.link.U_VIEWFORUM}" class="forumlink">{indexrow.link.FORUM_NAME}</a><br /></span>
<span class="genmed">{indexrow.link.FORUM_DESC}<br /></span>
<!-- BEGIN subforums -->
<span class="gensmall">
<b>{L_SUBFORUMS}:</b> <!-- BEGIN sub --><img src="{indexrow.link.row.subforums.sub.I_SUB}" border="0" align="middle" alt="{indexrow.link.row.subforums.sub.L_SUB_ALT}" title="{indexrow.link.row.subforums.sub.L_SUB_ALT}" hspace="2" /><a href="{indexrow.link.row.subforums.sub.U_SUB}" title="{indexrow.link.row.subforums.sub.L_SUB_DESC}" class="gensmall">{indexrow.link.row.subforums.sub.L_SUB}</a><!-- BEGIN sep -->, <!-- END sep --><!-- END sub -->
<br /></span>
<!-- END subforums -->
<!-- BEGIN forum_icon -->
</td></tr></table>
<!-- END forum_icon -->
</td>
<td class="row3Right" align="center" valign="middle" height="50" colspan="3" width="340"><span class="gensmall">
{indexrow.link.HITS}
</span></td>
</tr>
<!-- END row -->
<!-- BEGIN footer -->
<!-- END footer -->
<!-- END link -->
<!-- BEGIN footer -->
</table>
<!-- END footer -->
<!-- BEGIN spacing --><br class="nav" /><!-- END spacing -->
<!-- END indexrow -->
<!-- BEGIN forums_spacing --><br class="nav" /><!-- END forums_spacing -->
{FORUM_TOPICS}
{NAVIGATION_ONLY_BOX}
</form>
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
<td nowrap="nowrap" align="right">{JUMPBOX}</td>
</tr>
</table>
<br />
{STATS_BOX}
<!-- BEGIN switch_user_logged_out -->
<br class="nav" />
<form method="post" action="{S_LOGIN_ACTION}"><table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">
<tr>
<td class="catHead" height="28"><a name="login"></a><span class="cattitle">{L_LOGIN_LOGOUT}</span></td>
</tr>
<tr>
<td class="row1" align="center" valign="middle" height="28"><span class="gensmall">
{L_USERNAME}: <input class="post" type="text" name="username" size="10" />
{L_PASSWORD}: <input class="post" type="password" name="password" size="10" maxlength="32" />
<!-- BEGIN switch_allow_autologin -->
{L_AUTO_LOGIN} <input class="text" type="checkbox" name="autologin" />
<!-- END switch_allow_autologin -->
<input type="submit" class="mainoption" name="login" value="{L_LOGIN}" />
</span> </td>
</tr>
</table></form>
<!-- END switch_user_logged_out -->
<!-- BEGIN forum_legend -->
<br class="nav" />
<table cellspacing="3" border="0" align="center" cellpadding="0">
<tr>
<td width="20" align="center"><img src="{FORUM_NEW_IMG}" alt="{L_NEW_POSTS}" /></td>
<td><span class="gensmall">{L_NEW_POSTS}</span></td>
<td> </td>
<td width="20" align="center"><img src="{FORUM_IMG}" alt="{L_NO_NEW_POSTS}" /></td>
<td><span class="gensmall">{L_NO_NEW_POSTS}</span></td>
<td> </td>
<td width="20" align="center"><img src="{FORUM_LOCKED_IMG}" alt="{L_FORUM_LOCKED}" /></td>
<td><span class="gensmall">{L_FORUM_LOCKED}</span></td>
<td> </td>
<td width="20" align="center"><img src="{FORUM_LINK_IMG}" alt="{L_FORUM_LINK}" /></td>
<td><span class="gensmall">{L_FORUM_LINK}</span></td>
</tr>
</table>
<!-- END forum_legend -->
<!-- BEGIN forum_legend_ELSE -->
<br class="nav" />
<table width="100%" cellspacing="0" border="0" align="center" cellpadding="0">
<tr>
<td align="left" valign="top"><table cellspacing="3" cellpadding="0" border="0">
<tr>
<td width="20" align="left"><img src="{FOLDER_NEW_IMG}" alt="{L_NEW_POSTS}" width="19" height="18" /></td>
<td class="gensmall">{L_NEW_POSTS}</td>
<td> </td>
<td width="20" align="center"><img src="{FOLDER_ANNOUNCE_IMG}" alt="{L_ANNOUNCEMENT}" width="19" height="18" /></td>
<td class="gensmall">{L_ANNOUNCEMENT}</td>
</tr>
<tr>
<td width="20" align="center"><img src="{FOLDER_IMG}" alt="{L_NO_NEW_POSTS}" width="19" height="18" /></td>
<td class="gensmall">{L_NO_NEW_POSTS}</td>
<td> </td>
<td width="20" align="center"><img src="{FOLDER_STICKY_IMG}" alt="{L_STICKY}" width="19" height="18" /></td>
<td class="gensmall">{L_STICKY}</td>
</tr>
<tr>
<td width="20" align="center"><img src="{FOLDER_HOT_IMG}" alt="{L_TOPIC_HOT}" width="19" height="18" /></td>
<td class="gensmall">{L_TOPIC_HOT}</td>
<td> </td>
<td width="20" align="center"><img src="{FOLDER_LOCKED_IMG}" alt="{L_TOPIC_LOCKED}" width="19" height="18" /></td>
<td class="gensmall">{L_TOPIC_LOCKED}</td>
</tr>
<tr>
<td width="20" align="center"><img src="{FOLDER_OWN_IMG}" alt="{L_TOPIC_OWN}" width="19" height="18" /></td>
<td class="gensmall" colspan="4">{L_TOPIC_OWN}</td>
</tr>
</table></td>
<td align="right"><span class="gensmall">{S_AUTH_LIST}</span></td>
</tr>
</table>
<!-- END forum_legend_ELSE -->
<br clear="all" />