Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]Podstrona która wyświetla funkcje w każdym szablonie
Inaro
post
Post #1





Grupa: Zarejestrowani
Postów: 132
Pomógł: 0
Dołączył: 4.03.2010

Ostrzeżenie: (0%)
-----


Cześć, mam podstronę game.php i chciałbym zrobić funkcje np. {$map}, która wyświetla kod html w każdym szablonie mybb.

Kod
<?php
/**
* Game
*/
define("IN_MYBB", 1);

require_once "./global.php";
require_once "./inc/init.php";

if($mybb->input['action']=="services")
{
    eval("\$content = \"".$templates->get("game_services")."\";");
}
if($mybb->input['action']=="map")
{
    eval("\$content = \"".$templates->get("game_map")."\";");
}
add_breadcrumb($breadcumb, "game.php");
eval("\$template = \"".$templates->get("game")."\";");
output_page($template);
?>


Ten post edytował Inaro 16.08.2012, 19:44:02
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 21.12.2025 - 02:10