an entire site with phpbb ' s templates

This forum is now closed as part of retiring phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

This forum is now closed due to phpBB2.0 being retired.
Post Reply
remid1985
Registered User
Posts: 47
Joined: Wed Jun 04, 2003 9:17 pm

an entire site with phpbb ' s templates

Post by remid1985 »

I'd like realize this summer a site web based on the templates of phpbb .
Indeed , i ' ve got a football site and i had retouched the templates .
But just for my forum and not for my site.

The next season , i'd like use the templates of phpbb.
Have you got advises ?
Do you disadvise me to do that project?

Thanks for your answers.

User avatar
Wooly Spud
Registered User
Posts: 166
Joined: Tue Jun 11, 2002 11:18 am

Post by Wooly Spud »

my site is entirely done using the phpbb templating engine. i changed one line in the class and placed it in my sites root/includes and declared it for use by all my pages.

remid1985
Registered User
Posts: 47
Joined: Wed Jun 04, 2003 9:17 pm

Post by remid1985 »

What is the line you have changed , please?
I hope you could help me during my project after the 20th June. :D

remid1985
Registered User
Posts: 47
Joined: Wed Jun 04, 2003 9:17 pm

Post by remid1985 »

Wooly Spud wrote: my site is entirely done using the phpbb templating engine. i changed one line in the class and placed it in my sites root/includes and declared it for use by all my pages.


Can i see your website?

User avatar
Wooly Spud
Registered User
Posts: 166
Joined: Tue Jun 11, 2002 11:18 am

Post by Wooly Spud »

my site is www.xgmag.com the page that will come up is a static page but if you click home it will take you to the index page im making for it to be functional. all the pages in the navbar are fully functional and use the templating engine.

id be willing to email you the file i changed some additional code to make it go through nested blocks faster as well. once you have the template.php file in your sites includes directory and include it in the master list of files automatically included with all your pages you will need to declare it with a line like

Code: Select all

$xyz = new Template
then you can use it like phpbb

Code: Select all

$xyz -> makeTemplate(blah){}
and you will also have to specify the directory that the templates will be located. if you are going to have multiple themes you will want to have this be a variable and do some function where the variable gets changed for each theme.

XGSRPG
Registered User
Posts: 7
Joined: Mon Jun 09, 2003 12:46 am

Post by XGSRPG »

I'm getting confused. So what do I have to do to a PHP page to make it so I can use the phpBB templating engine (I really like it and don't want to use Smarty or anything since I've gotten used to the phpBB one)? I know I have to include template.php, but whenever I do a template command (like assign vars or set_filenames) it gives "call to non member function" or something like that.

Btw I start them like

Code: Select all

		$template->set_filenames(array(
			'reviewbody' => 'posting_topic_review.tpl')
		);
I saw what you said last time about $xyz. Does this make it so i would use $xyz instead of $template?

BTW again, I'm using Nuke and I plan to mod some of the files using templates. There probably isn't but if anyone knows any incompatibilites please tell me much appreciated!

User avatar
Wooly Spud
Registered User
Posts: 166
Joined: Tue Jun 11, 2002 11:18 am

Post by Wooly Spud »

yes and xyz can be whatever you want except template (it helps to avoid issues if you are going to be including a phpBB login from other pages MOD)

What i changed is What makes that error go away. along with a change to make nested blocks run faster.

Like i said i can email the file as a zip or if theres a demand for it just load the zip up to my site.

XGSRPG
Registered User
Posts: 7
Joined: Mon Jun 09, 2003 12:46 am

Post by XGSRPG »

Thanks, but it doesnt seem to work. Every time I try to use a template thing, i get this: Fatal error: Call to a member function on a non-object in /home/rpgdude/public_html/modules/Tutorials/index.php on line 473.

Here is my line 473:

Code: Select all

$xyz->set_filenames(array(


I have template.php included and at the beginning I put

Code: Select all

include("includes/template.php");
$xyz = new Template;
. Anything wrong??

EDIT: I just noticed I forgot the directory. But where do I place the location of the directory?

EDIT 2: Nevermind! I found out the coding was in a function and I didn't put $xyz in the global thing.

Scary Fast
Registered User
Posts: 10
Joined: Sun Apr 06, 2003 12:15 pm
Location: Hudds, England
Contact:

Post by Scary Fast »

Ive done a site which uses phpbb's templating engine for every page.

Stupid Stunts

I moved includes/template.php from the forum directory to the site root, which was a bit of a nightamare in terms of poking around all the phpbb code.

My 'set_filenames' method calls have the page directory in the parameter, ie:

Code: Select all

      
    $template->set_filenames(array( 
         'reviewbody' => 'forum/posting_topic_review.tpl') 
    );

Visit scaryfish, a web, design and computing site by matt.

Post Reply

Return to “[2.0.x] MOD Requests”