Xwab
Форумыnavigate_nextphpBB-WAP

как переделать в пхп код станицу
Сообщения
freedom'

"мне проще программировать в пхп"
а срипт написан на чем? не php?
если нада новые страницы то можеш писать их без templates

13 Сен 2010, 15:26
abn

freedom', да, на пхп.

сможешь дать какой то пример станиц с темпл и без?


я не тупой, просто б не помешало увидеть пример сделан уверенной рукой.

13 Сен 2010, 16:18
iceman12

с темплейтами - пхпбб. без:
<?php echo'Hello'; ?>

13 Сен 2010, 16:21
abn

str.php
<?php
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);

$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);

define('SHOW_ONLINE', true);
$page_title = $lang['Index'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);

$template->set_filenames(array(
'body' => '4e_body.tpl')
);
$text = 'че?';
$text2 = 'верх';

$template->assign_vars(array(
'TEXT' => $text,
'TEXT2' => $text2,
)
);
$template->pparse('body');


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

?>
templates/4e_body.tpl
<p><a href="{U_INDEX}">Форумы</a>|Страница</p>
<table width="100%" cellpadding="1" cellspacing="0" border="0" class="forumline">
<tr>
<td class="catSides"><span class="cattitle">{TEXT2}</span></td><tr/>
<tr>
<td class="row1">
{TEXT}
</td>
</tr>
</table>


//как сделать только в пхп? а, ну да. там же ещо надо заменить includes/page_tail и includes/page_header и остальное

13 Сен 2010, 16:31
freedom'

str.php
<?php
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);

$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);

define('SHOW_ONLINE', true);
$page_title = $lang['Index'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
echo'
<p><a href="{U_INDEX}">Форумы</a>|Страница</p>
<table width="100%" cellpadding="1" cellspacing="0" border="0" class="forumline">
<tr>
<td class="catSides"><span class="cattitle">'.$text2.'</span></td><tr/>
<tr>
<td class="row1">
'.$text.'
</td>
</tr>
</table>';
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
?>

13 Сен 2010, 16:36
abn

freedom', ну спасибо.

13 Сен 2010, 18:20
Ответить на тему