Pravda v očích.cz

Navigace:Pravda v očích.czPHP ⇒ How to create your own page in phpBB 3

How to create your own page in phpBB 3

This is the English translation of the original article Jak vytvořit vlastní stránku v phpBB 3. Each operator of forum on phpBB 3 (and earlier versions) sometimes put a question on how to create your own "static" page, where could place the necessary contact information or sponsorship of the…
phpbb pages, how create your forum, forum deredes, karikatury pres internet, ceske kabelove programi ke stahnutiu zdarma cz, phpBB loc CZ, phpbb own styles, inserting weblog into phpbb, to create, veci ke stazeni do the sims,

This is the English translation of the original article Jak vytvořit vlastní stránku v phpBB 3.


Each operator of forum on phpBB 3 (and earlier versions) sometimes put a question on how to create your own "static" page, where could place the necessary contact information or sponsorship of the forum. Today I have need it to Poradna pro hrace and so I wrote a small universal script, which is transmitted GET variable of name of the page that call. Code then creates structure of phpBB style and entered into by the variable page template, which we have imposed in the styles / (name of style) / template. Such own page may look like this.

Code of page.php

# Universal script for calls static pages
# Used methods phpBB 3 - Copyright 2000-2008 phpbb.com
# Created by Jakub Dvorak - http://pravdavocich.cz, http://www.pravdavocich.cz
# Copyright 2008 Jakub Dvorak, phpBB
# This code is free under GNUGPL

define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
$user->session_begin();
$auth->acl($user->data);
$user->setup('common');
page_header("Forum");

$zadame = $_GET['p'];
$volame = "extra_" . $zadame . ".html";
if (! $_GET['p']) {
header("HTTP/1.1 404 Not Found");
header("Location: http://yourforum.com");
header("Connection: close");
}

$template->set_filenames(array(
'body' => $volame
));
// parse page:
page_footer();
?>


First, we call all the necessary functions and methods that phpBB calls for the establishment of sessions and styles. After only find the variable p for create from the name of the template, which require. If not p variable exists or has zero value, is returned header 404 (Not found) and redirected back to the main page forum.

Example

Create in a directory of styles / (the name of the style that you are using) / template file called extra_mypage.html. In her appearance will be stored static pages, for example, that:




my page

etc etc etc....


To view this page you will then only be sufficient to call a set page.php, in this case as follows:

http://adress_of_your_forum.com/page.php?p=mypage

autor Jakub Dvořák | cal 2.7.2008 | Vše o PHP - seriály, tipy a triky.... PHP |

Kometáře


Zatim tu nejsou žádný (schválené) kometáře.
Nové kometáře nejsou povolené.

Související články

blue ray stáhnout otrokáři 1976 download film pelíšky download the sims download zdarma uživatel kačislava skype virtual DJ návod slovenčina mixovaci pulty download poradna pro windows XP mixsažni pult ke staženi zdarma mobile idnes navigace

Pravda v očích

© 2012 Copyright Pravdavocich.cz Jakub Dvořák Zásady ochrany osobních údajů. Stránka generována 21.05. 2012, 22:30:31 za 0,0934s