Current location: Hot Scripts Forums » Programming Languages » PHP » PHP include in a phpBB template


PHP include in a phpBB template

Reply
  #1 (permalink)  
Old 10-01-09, 08:47 PM
ruteckycs's Avatar
ruteckycs ruteckycs is offline
Coding Addict
 
Join Date: Jul 2009
Posts: 377
Thanks: 6
Thanked 10 Times in 10 Posts
PHP include in a phpBB template

I would like to include another file in the overall_header section of a phpBB style / template.
I tried the following:

As I would in a normal php script:
PHP Code:

<?php include('top.php'); ?>

and with out the php tags
include('top.php');

neither method will work.

Please advise.
__________________
This post was created with 100% recycled electrons.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 10-01-09, 09:58 PM
wirehopper's Avatar
wirehopper wirehopper is offline
-
 
Join Date: Feb 2006
Posts: 2,516
Thanks: 20
Thanked 109 Times in 106 Posts
Quote:
PHP
A contentious decision has seen the ability to include PHP within the template introduced. This is achieved by enclosing the PHP within relevant tags:

<!-- PHP -->
echo "hello!";
<!-- ENDPHP -->
You may also include PHP from an external file using:

<!-- INCLUDEPHP somefile.php -->
it will be included and executed inline.

A note, it is very much encouraged that template designers do not include PHP. The ability to include raw PHP was introduced primarily to allow end users to include banner code, etc. without modifying multiple files (as with 2.0.x). It was not intended for general use ... hence phpBB &bull; Creating Communities Worldwide will not make available template sets which include PHP. And by default templates will have PHP disabled (the admin will need to specifically activate PHP for a template).
From:
phpBB3 &bull; Coding Guidelines
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
The Following User Says Thank You to wirehopper For This Useful Post:
ruteckycs (10-02-09)
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sports Pick Em racingboy20 Script Requests 3 06-18-10 04:12 AM
include php code into xml or the vice versa? ipanda Script Requests 1 12-16-08 11:24 AM
include php in TPL unlisted80 PHP 3 10-28-06 04:28 AM
PHP help... Orchidsdance PHP 8 09-25-04 08:58 PM
Is phpBB the most popular php board and why? pelican General HotScripts Site Discussion 10 09-28-03 11:18 AM


All times are GMT -5. The time now is 07:26 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.