Ich hab da mal ein Problem:
###############################################
## Mod Title: Advanced forum rules
## Mod Version: 0.9.0
## Author: ExplicitFaktorX, Canada < ExplicitFaktorX@hotmail.com > http://www.deadzoneforums.vze.com
## Description: This mod will add a page for rules into your phpBB2 forum
##
## This mod is for phpBB2 ver 2.0.2
##
##
## Installation Level: Easy
## Installation Time: 5-25 Minutes
## Files To Edit: 4
## language/lang_xx/lang_main.php
## includes/page_header.php
## includes/constants.php
## templates/xxx/overall_header.tpl
## language/lang_xxx/lang_rules.php
##
## Included Files: 3
## language/lang_xxx/lang_rules.php
## includes/templates/xxx/rules_body.tpl
## rules.php
##
## History:
## 0.9.0 - Initial release phpBB2 ver 2.0.2
##
#
#-----[ OPEN ]------------------------------------------
# (make sure to edit this file for every language your board uses).
language/lang_xxx/lang_rules.php
#
#-----[ FIND ]------------------------------------------
#
$rules[] = array("--","Category 1");
$rules[] = array("Rule", "Statement");
$rules[] = array("Rule", "Statement");
$rules[] = array("Rule", "Statement");
$rules[] = array("Rule", "Statement");
$rules[] = array("Rule", "Statement");
$rules[] = array("Rule", "Statement");
$rules[] = array("Rule", "Statement");
#
#-----[ ALTER TO SUIT NEEDS ]----------------------
#
If more categories and rules are needed just copy and paste the following statement after the rules you alter.
Erstmal $rules[] ist in lang_rules.php nicht vorhanden und wenn ich es unter $faq[] = array(...) anhänge, wird es nicht angezeigt!
ich würde gerne $rules[] = array("Rule", "Statement") nutzen.
Was muss ich wo bzw. wie umschreiben, damit $rules[] auch ausgeführt wird, bin da langsam ratlos. Kann mir jemand helfen?
Rules
Forumsregeln
phpBB 2.0 hat das Ende seiner Lebenszeit überschritten
phpBB 2.0 wird nicht mehr aktiv unterstützt. Insbesondere werden - auch bei Sicherheitslücken - keine Patches mehr bereitgestellt. Der Einsatz von phpBB 2.0 erfolgt daher auf eigene Gefahr. Wir empfehlen einen Umstieg auf phpBB 3.1, welches aktiv weiterentwickelt wird und für welches regelmäßig Updates zur Verfügung gestellt werden.
phpBB 2.0 hat das Ende seiner Lebenszeit überschritten
phpBB 2.0 wird nicht mehr aktiv unterstützt. Insbesondere werden - auch bei Sicherheitslücken - keine Patches mehr bereitgestellt. Der Einsatz von phpBB 2.0 erfolgt daher auf eigene Gefahr. Wir empfehlen einen Umstieg auf phpBB 3.1, welches aktiv weiterentwickelt wird und für welches regelmäßig Updates zur Verfügung gestellt werden.
- Firestarter
- Mitglied
- Beiträge: 1162
- Registriert: 09.06.2003 15:21
$faq[] = array("--","Text");
$faq[] = array("Titel", "Text");
das ist alles, ab er wenn ich dort die Formeln anhänge, werden sie nicht in der entsprechenden Tabelle angezeigt sondern einfach weggelassen!
Hier ist der Auszug der rules_body.tpl_datei :
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
<tr>
<td align="left" class="nav"><a href="{U_INDEX}" class="nav">{L_INDEX}</a></td>
</tr>
</table>
<table class="forumline" width="100%" cellspacing="1" cellpadding="3" border="0" align="center">
<tr>
<th class="thHead">{L_RULES}</th>
</tr>
<tr>
<td class="row1">
<!-- BEGIN rules_block_link -->
<span class="gen"><b>{rules_block_link.BLOCK_TITLE}</b></span><br />
<!-- BEGIN rules_row_link -->
<span class="gen"><a href="{rules_block_link.rules_row_link.U_RULES_LINK}" class="postlink">{rules_block_link.rules_row_link.RULES_LINK}</a></span><br />
<!-- END rules_row_link -->
<br />
<!-- END rules_block_link -->
</td>
</tr>
<tr>
<td class="catBottom" height="28"> </td>
</tr>
</table>
<br clear="all" />
<!-- BEGIN rules_block -->
<table class="forumline" width="100%" cellspacing="1" cellpadding="3" border="0" align="center">
<tr>
<td class="catHead" height="28" align="center"><span class="cattitle">{rules_block.BLOCK_TITLE}</span></td>
</tr>
<!-- BEGIN rules_row -->
<tr>
<td class="{rules_block.rules_row.ROW_CLASS}" align="left" valign="top"><span class="postbody"><a name="{rules_block.rules_row.U_RULES_ID}"></a><b>{rules_block.rules_row.RULES_QUESTION}</b></span><br /><span class="postbody">{rules_block.rules_row.RULES_ANSWER}<br /><a class="postlink" href="#Top">{L_BACK_TO_TOP}</a></span></td>
</tr>
<tr>
<td class="spaceRow" height="1"><img src="templates/subSilver/images/spacer.gif" alt="" width="1" height="1" /></td>
</tr>
<!-- END rules_row -->
</table>
<br clear="all" />
<!-- END rules_block -->
<table width="100%" cellspacing="2" border="0" align="center">
<tr>
<td align="right" valign="middle" nowrap="nowrap"><span class="gensmall">{S_TIMEZONE}</span><br /><br />{JUMPBOX}</td>
</tr>
</table>
der Auszug der rules.php-Datei :
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_FAQ);
init_userprefs($userdata);
//
// End session management
//
//
// Load the appropriate Rules file
//
if( isset($HTTP_GET_VARS['mode']) )
{
switch( $HTTP_GET_VARS['mode'] )
{
case 'bbcode':
$lang_file = 'lang_bbcode';
$l_title = $lang['BBCode_guide'];
break;
default:
$lang_file = 'lang_rules';
$l_title = $lang['rules'];
break;
}
}
else
{
$lang_file = 'lang_rules';
$l_title = $lang['rules'];
}
include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/' . $lang_file . '.' . $phpEx);
//
// Pull the array data from the lang pack
//
$j = 0;
$counter = 0;
$counter_2 = 0;
$faq_block = array();
$faq_block_titles = array();
for($i = 0; $i < count($faq); $i++)
{
if( $faq[$i][0] != '--' )
{
$faq_block[$j][$counter]['id'] = $counter_2;
$faq_block[$j][$counter]['question'] = $faq[$i][0];
$faq_block[$j][$counter]['answer'] = $faq[$i][1];
$counter++;
$counter_2++;
}
else
{
$j = ( $counter != 0 ) ? $j + 1 : 0;
$faq_block_titles[$j] = $faq[$i][1];
$counter = 0;
}
}
//
// Lets build a page ...
//
$page_title = $l_title;
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
$template->set_filenames(array(
'body' => 'faq_body.tpl')
);
make_jumpbox('viewforum.'.$phpEx, $forum_id);
$template->assign_vars(array(
'L_FAQ_TITLE' => $l_title,
'L_BACK_TO_TOP' => $lang['Back_to_top'])
);
for($i = 0; $i < count($faq_block); $i++)
{
if( count($faq_block[$i]) )
{
$template->assign_block_vars('faq_block', array(
'BLOCK_TITLE' => $faq_block_titles[$i])
);
$template->assign_block_vars('faq_block_link', array(
'BLOCK_TITLE' => $faq_block_titles[$i])
);
for($j = 0; $j < count($faq_block[$i]); $j++)
{
$row_color = ( !($j % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
$row_class = ( !($j % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
$template->assign_block_vars('faq_block.faq_row', array(
'ROW_COLOR' => '#' . $row_color,
'ROW_CLASS' => $row_class,
'FAQ_QUESTION' => $faq_block[$i][$j]['question'],
'FAQ_ANSWER' => $faq_block[$i][$j]['answer'],
'U_FAQ_ID' => $faq_block[$i][$j]['id'])
);
$template->assign_block_vars('faq_block_link.faq_row_link', array(
'ROW_COLOR' => '#' . $row_color,
'ROW_CLASS' => $row_class,
'FAQ_LINK' => $faq_block[$i][$j]['question'],
'U_FAQ_LINK' => '#' . $faq_block[$i][$j]['id'])
);
}
}
}
$template->pparse('body');
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
Die Install-Datei bzgl. des obenangeführten Problem :
#
#-----[ OPEN ]------------------------------------------
# (make sure to edit this file for every language your board uses).
language/lang_xxx/lang_rules.php
#
#-----[ FIND ]------------------------------------------
#
$rules[] = array("--","Category 1");
$rules[] = array("Rule", "Statement");
$rules[] = array("Rule", "Statement");
$rules[] = array("Rule", "Statement");
$rules[] = array("Rule", "Statement");
$rules[] = array("Rule", "Statement");
$rules[] = array("Rule", "Statement");
$rules[] = array("Rule", "Statement");
Kann mir jemand sagen, wo der Fehler liegt?
$faq[] = array("Titel", "Text");
das ist alles, ab er wenn ich dort die Formeln anhänge, werden sie nicht in der entsprechenden Tabelle angezeigt sondern einfach weggelassen!
Hier ist der Auszug der rules_body.tpl_datei :
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
<tr>
<td align="left" class="nav"><a href="{U_INDEX}" class="nav">{L_INDEX}</a></td>
</tr>
</table>
<table class="forumline" width="100%" cellspacing="1" cellpadding="3" border="0" align="center">
<tr>
<th class="thHead">{L_RULES}</th>
</tr>
<tr>
<td class="row1">
<!-- BEGIN rules_block_link -->
<span class="gen"><b>{rules_block_link.BLOCK_TITLE}</b></span><br />
<!-- BEGIN rules_row_link -->
<span class="gen"><a href="{rules_block_link.rules_row_link.U_RULES_LINK}" class="postlink">{rules_block_link.rules_row_link.RULES_LINK}</a></span><br />
<!-- END rules_row_link -->
<br />
<!-- END rules_block_link -->
</td>
</tr>
<tr>
<td class="catBottom" height="28"> </td>
</tr>
</table>
<br clear="all" />
<!-- BEGIN rules_block -->
<table class="forumline" width="100%" cellspacing="1" cellpadding="3" border="0" align="center">
<tr>
<td class="catHead" height="28" align="center"><span class="cattitle">{rules_block.BLOCK_TITLE}</span></td>
</tr>
<!-- BEGIN rules_row -->
<tr>
<td class="{rules_block.rules_row.ROW_CLASS}" align="left" valign="top"><span class="postbody"><a name="{rules_block.rules_row.U_RULES_ID}"></a><b>{rules_block.rules_row.RULES_QUESTION}</b></span><br /><span class="postbody">{rules_block.rules_row.RULES_ANSWER}<br /><a class="postlink" href="#Top">{L_BACK_TO_TOP}</a></span></td>
</tr>
<tr>
<td class="spaceRow" height="1"><img src="templates/subSilver/images/spacer.gif" alt="" width="1" height="1" /></td>
</tr>
<!-- END rules_row -->
</table>
<br clear="all" />
<!-- END rules_block -->
<table width="100%" cellspacing="2" border="0" align="center">
<tr>
<td align="right" valign="middle" nowrap="nowrap"><span class="gensmall">{S_TIMEZONE}</span><br /><br />{JUMPBOX}</td>
</tr>
</table>
der Auszug der rules.php-Datei :
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_FAQ);
init_userprefs($userdata);
//
// End session management
//
//
// Load the appropriate Rules file
//
if( isset($HTTP_GET_VARS['mode']) )
{
switch( $HTTP_GET_VARS['mode'] )
{
case 'bbcode':
$lang_file = 'lang_bbcode';
$l_title = $lang['BBCode_guide'];
break;
default:
$lang_file = 'lang_rules';
$l_title = $lang['rules'];
break;
}
}
else
{
$lang_file = 'lang_rules';
$l_title = $lang['rules'];
}
include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/' . $lang_file . '.' . $phpEx);
//
// Pull the array data from the lang pack
//
$j = 0;
$counter = 0;
$counter_2 = 0;
$faq_block = array();
$faq_block_titles = array();
for($i = 0; $i < count($faq); $i++)
{
if( $faq[$i][0] != '--' )
{
$faq_block[$j][$counter]['id'] = $counter_2;
$faq_block[$j][$counter]['question'] = $faq[$i][0];
$faq_block[$j][$counter]['answer'] = $faq[$i][1];
$counter++;
$counter_2++;
}
else
{
$j = ( $counter != 0 ) ? $j + 1 : 0;
$faq_block_titles[$j] = $faq[$i][1];
$counter = 0;
}
}
//
// Lets build a page ...
//
$page_title = $l_title;
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
$template->set_filenames(array(
'body' => 'faq_body.tpl')
);
make_jumpbox('viewforum.'.$phpEx, $forum_id);
$template->assign_vars(array(
'L_FAQ_TITLE' => $l_title,
'L_BACK_TO_TOP' => $lang['Back_to_top'])
);
for($i = 0; $i < count($faq_block); $i++)
{
if( count($faq_block[$i]) )
{
$template->assign_block_vars('faq_block', array(
'BLOCK_TITLE' => $faq_block_titles[$i])
);
$template->assign_block_vars('faq_block_link', array(
'BLOCK_TITLE' => $faq_block_titles[$i])
);
for($j = 0; $j < count($faq_block[$i]); $j++)
{
$row_color = ( !($j % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
$row_class = ( !($j % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
$template->assign_block_vars('faq_block.faq_row', array(
'ROW_COLOR' => '#' . $row_color,
'ROW_CLASS' => $row_class,
'FAQ_QUESTION' => $faq_block[$i][$j]['question'],
'FAQ_ANSWER' => $faq_block[$i][$j]['answer'],
'U_FAQ_ID' => $faq_block[$i][$j]['id'])
);
$template->assign_block_vars('faq_block_link.faq_row_link', array(
'ROW_COLOR' => '#' . $row_color,
'ROW_CLASS' => $row_class,
'FAQ_LINK' => $faq_block[$i][$j]['question'],
'U_FAQ_LINK' => '#' . $faq_block[$i][$j]['id'])
);
}
}
}
$template->pparse('body');
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
Die Install-Datei bzgl. des obenangeführten Problem :
#
#-----[ OPEN ]------------------------------------------
# (make sure to edit this file for every language your board uses).
language/lang_xxx/lang_rules.php
#
#-----[ FIND ]------------------------------------------
#
$rules[] = array("--","Category 1");
$rules[] = array("Rule", "Statement");
$rules[] = array("Rule", "Statement");
$rules[] = array("Rule", "Statement");
$rules[] = array("Rule", "Statement");
$rules[] = array("Rule", "Statement");
$rules[] = array("Rule", "Statement");
$rules[] = array("Rule", "Statement");
Kann mir jemand sagen, wo der Fehler liegt?