PunBB Resource

Your ultimate PunBB resource!

Keywords:

    (Extended)

You are not logged in.


Login to move these ads to the bottom of the page

#1 2007-06-02 04:48:32

Zinezn
Member
Registered: 2007-05-27
Posts: 12

Template?

How can I use a template (.tpl) in a website, without having PunBB installed?

Offline

 

#2 2007-06-02 05:13:40

FSX
Member
Registered: 2006-09-14
Posts: 616
Website

Re: Template?

You need a template parser like Templatepower or Smarty.

Offline

 

#3 2007-06-02 16:15:40

Zinezn
Member
Registered: 2007-05-27
Posts: 12

Re: Template?

Isn't there an easier way, just to implent a code or something?

EDIT: I only want one template file and connect that one to a PHP-file with content. Then be able to change the content to content from another PHP-file when I click on a link on my site. No more functions needed.

Last edited by Zinezn (2007-06-02 16:27:20)

Offline

 

#4 2007-06-02 19:59:04

quaker
Member
From: Bama,USA
Registered: 2006-02-22
Posts: 1064
Website

Re: Template?

ummmmm look for snews... that a simple new system and mini cms..
but what that got to do with punbb?

hehehe....
Q


My stuff or my style might sux, but atleast I'm willing to help when I can.
Don't be stupid and help ! We are the stupid one's !!!

Offline

 

#5 2007-06-03 05:33:35

Zinezn
Member
Registered: 2007-05-27
Posts: 12

Re: Template?

Can't I just implent a code to display the template on a site, then show the content of the site on a specific place on the template?

Offline

 

#6 2007-06-03 05:39:29

FSX
Member
Registered: 2006-09-14
Posts: 616
Website

Re: Template?

You can do something with variables.

Something like this I think.

index.php

Code:

<?php
$title = "The title";
$content = "blablabla";

include ('template/main.php');
?>

template/main.php

Code:

<html>
<head>
<title><?php echo $title; ?></title>

</head>
<body>

<?php echo $content; ?>

</body>
</html>

Offline

 

Board footer

Based on PunBB
© Copyright 2002–2005 Rickard Andersson

© Copyright 2004–2006 Kristoffer Jansson

User contributed files are property of their respective owners.