[Help] Integrate a php script in template
Its not a muonline problem but i dont know where to post it.
MyProblem: i have a template,all its ok but i want to put a link,for example to register page(register.php) and register page have only the php script,not the template too,my question is: how can i make to load register.php when i click on register link in main template(as in muweb)?
P.S: i dont want to use frame!
Re: [HELP] Integrate a php script in template
You can try by using as base the original muweb index.php, i never tried, but if you read it all, you should understand how does it works; anyway, it works with modules (i think), and it would be changing that variable/function.
If you need a little more help, just make me know.
Re: [HELP] Integrate a php script in template
i want to make my website 100%,all scripts are allready done with only this problem,i allready read the muweb structure but i cant understand this function
Re: [HELP] Integrate a php script in template
I don't know if this will work...
It's the code from a RisingKing Web
Code:
if (!isset($_GET['action']))
{$action= "Server News";}
else
{$action=$_GET['action'];}
include 'config/config.php';
include 'includes/cookies.html';
Code:
if (file_exists("includes/" . $action . ".html"))
{
include 'includes/' . $action . '.html';
}
else
{
echo 'Section not found.';
}
Bye :D
Re: [HELP] Integrate a php script in template
No, that's useless =).
You should ask in muweb forum, but weh..
This at the TOP of the web:
(starts session, include configs, modules, login, etc)
Code:
<?
session_start();
header("Cache-control: private");
ob_start();
require("config.php");
include("includes/web_modules.php");
include("includes/clean_var.php");
include("includes/login.class.php");
$iniTime = microtime_float(); // danger, dinamitedog added :P
login();
logincheck();
check_user();
?>
Title:
Code:
<title><?php require("config.php"); echo($muweb['webtitle']); ?> <?
if(!isset($_GET['op'])){echo("News");}
else{echo(ucfirst($_GET['op']));}
?></title>
Don't forget the tooltip if you would use the same mode that muweb original 0.8 uses to add stats, reset & clear pk.
Tooltip (helptip):
Code:
<script type="text/javascript" src="includes/helptip.js"></script>
This is about user recognition/login:
Code:
<?php if ((isset($_SESSION['pass'])) && (isset($_SESSION['user'])))
{
//here goes your logout form & some welcome to the user :P
}else{
//the login form for the user & a link to reg :P
}
This goes on the "content" part of your web:
Code:
<? if(!isset($_GET['op']) && !isset($_GET['news'])){
include("modules/news.php"); }
elseif(isset($_GET['news'])){
include("modules/news_full.php"); }
elseif(isset($_GET['op'])){
modules();} ?>
It will just recognize the module that is being used (by the switch 'op') though the function modules();, or just including news.
The complement for $iniTime that i made, it will show you in seconds the page generation time:
Code:
<?
$endTime = microtime_float();
$finTime = $endTime - $iniTime;
print "<span class=text_normal_white2>Generation Time: ".$finTime." seconds.</span>";
?>
At the BOTTOM of the web, i don't remember for what is that but put it (:P):
Code:
<?
ob_end_flush();
?>
This should guide you a little xD :P.
DinamiteDog/RaMMz.
Re: [HELP] Integrate a php script in template
i just wonder, when the mu webbys will start using XSLT or at least SMARTY so every user who knows xHTML could edit'em.
Anyway i'm not the one to post souch things, since i'm to lazy to develop one.
Re: [HELP] Integrate a php script in template
Quote:
Originally Posted by
DanseMacabre
i just wonder, when the mu webbys will start using XSLT or at least SMARTY so every user who knows xHTML could edit'em.
Anyway i'm not the one to post souch things, since i'm to lazy to develop one.
I'm making one, with fully support to all versions, but it costs a LOT of time, and that's what everybody needs :P.
Re: [HELP] Integrate a php script in template
Quote:
Originally Posted by
DinamiteDog
I'm making one, with fully support to all versions, but it costs a LOT of time, and that's what everybody needs :P.
You base it on what templates ?
Re: [HELP] Integrate a php script in template
Quote:
Originally Posted by
DanseMacabre
You base it on what templates ?
It's based on a template system, and the official one is designed by me.
Re: [HELP] Integrate a php script in template
the problem was solved and users start to flame it
To moderator: Please close this thread!
Re: [HELP] Integrate a php script in template
Quote:
Originally Posted by
[RCZ]ShadowKing
the problem was solved and users start to flame it
To moderator: Please close this thread!
sory for my pointless post but i have to write it.
flame ? who or what was flamed, i didnt notice or smell anything.
Re: [HELP] Integrate a php script in template
the problem was solved and the problem was not for yours website or templates...
Re: [HELP] Integrate a php script in template
Quote:
Originally Posted by
[RCZ]ShadowKing
the problem was solved and the problem was not for yours website or templates...
Then i appologize for hijacking your thread, but still no one flamed.