Unofficial modifications
nieoficjalne modyfikacje for?w phpBB by Przemo

Pomoc dla modyfikacji - Jak wykona? stron? opart? na stylu

Przemek211 - Pią 11 Maj, 2007
Temat postu: Jak wykona? stron? opart? na stylu
Siema pewnie ma?o zrozumia?e, ale postaram si? wyt?umaczy?. Chodzi o to, ?e mam dodatek z rss: http://mody.lastinn.info/highlight_rss-t593.html ale on swojej strony nie opiera tak jak np. skrypt regulaminu na stronie typowej dla stylu forum czyli, ?e nie wy?wietla si? ten ca?y pasek
Kod
Unofficial modifications | Regulamin | FAQ | Szukaj | U?ytkownicy | Grupy | Profil | Wiadomo?ci [0] | Wyloguj [ Przemek211 ] | Mapa Google
i belka z nazw? rss. Kombinowa?em z plikami tpl, ale nie wysz?o :) Nie prosz? o zmodyfikowanie tego rss, tylko o instrukcj?, jak tak? stron? wykona?. Po prostu jak ma wygl?da? dok?adnie ten plik tpl, dla skryptu oraz jakie informacje trzeba doda? w stronie skryptu.
Dobra ju? sobie poradzi?em (na razie tylko zrobi?em sobie tak? oddzieln? stron?), mianowicie: skopiowa?em z paczki Regulamin 2.0 pliki regulamin.php i regulamin_body.tpl
Jako, ?e mam ju? zainstalowany regulamin zmieni?em nazw? na reg.php i reg_body.tpl. Teraz pliki wygl?daj? tak:
reg_body.tpl napisał/a
<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>Regulamin</th>
</tr>
<tr>
<td class=row1>REGULAMIN FORUM</td>
</tr>
<tr>
<td class=catBottom height=28>&nbsp;</td>
</tr>
</table>

<br clear=all />
<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>

reg.php napisał/a
<?php

/***************************************************************************
* regulamin.php *
* [MOD] Regulamin by Matrix 2.0 *
* ------------------------------- *
* begin : Wtorek, Lipiec 13, 2004 *
* copyright : (C) 2003 ALL DEAF - UNIVERSUM *
* email : info@alldeaf.pl *
* *
* *
***************************************************************************/

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_INDEX);
init_userprefs($userdata);
//
// End session management
//

$l_title = $lang['Regulamin'];

$regulamin = ( $board_config['regulamin_enable'] ) ? $board_config['regulamin'] : '';
if ( $regulamin_page && $config['own_header'] )
{
$regulamin = '' . $config['reg_body'] . '';
}

//
// Lets build a page ...
//

$page_title = $l_title;
include($phpbb_root_path . 'includes/page_header.'.$phpEx);

$template->set_filenames(array(
'body' => 'reg_body.tpl')
);
make_jumpbox('viewforum.'.$phpEx, $forum_id);

$template->assign_vars(array(
'L_REGULAMIN_TITLE' => $l_title,
'L_BACK_TO_TOP' => $lang['Back_to_top'],

'REGULAMIN' => $regulamin,
'L_REGULAMIN' => $lang['Regulamin'],
'U_REGULAMIN' => append_sid('regulamin.'.$phpEx) )
);

$template->pparse('body');

include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
include($phpbb_root_path . 'includes/page_header.'.$phpEx);

?>
Pewnie nie kt?re funkcje w reg.php s? nie potrzebne, ale nie znam a? tak dobrze php. W pliku reg_body.tpl tam gdzie jest pogrubione jest ta g?rna belka z napisem Regulamin (tak jak na tym forum), a tam gdzie podkre?lone REGULAMIN FORUM jest ta belka gdzie jest zapisany regulamin.

Powered by phpBB modified by Przemo © 2003 phpBB Group