legohead6 Posted April 22, 2007 Share Posted April 22, 2007 how would i do this, i am intergrating a phpbb forum system into my site! Link to comment https://forums.phpfreaks.com/topic/48087-adding-php-code-or-to-include-a-page-with-php-code-into-a-tpl-page/ Share on other sites More sharing options...
fert Posted April 22, 2007 Share Posted April 22, 2007 the only way to do this is to tell the server to parse tpl files as php. Link to comment https://forums.phpfreaks.com/topic/48087-adding-php-code-or-to-include-a-page-with-php-code-into-a-tpl-page/#findComment-235001 Share on other sites More sharing options...
legohead6 Posted April 22, 2007 Author Share Posted April 22, 2007 and how would i go about doing that? Link to comment https://forums.phpfreaks.com/topic/48087-adding-php-code-or-to-include-a-page-with-php-code-into-a-tpl-page/#findComment-235002 Share on other sites More sharing options...
legohead6 Posted April 22, 2007 Author Share Posted April 22, 2007 or what about just a page include? and the included page would have the php on it? Link to comment https://forums.phpfreaks.com/topic/48087-adding-php-code-or-to-include-a-page-with-php-code-into-a-tpl-page/#findComment-235003 Share on other sites More sharing options...
Glyde Posted April 22, 2007 Share Posted April 22, 2007 the only way to do this is to tell the server to parse tpl files as php. Or eval() the .tpl files Link to comment https://forums.phpfreaks.com/topic/48087-adding-php-code-or-to-include-a-page-with-php-code-into-a-tpl-page/#findComment-235004 Share on other sites More sharing options...
HaLo2FrEeEk Posted April 22, 2007 Share Posted April 22, 2007 There is a mod for phpbb that allows you to put php in your tpl files, look on phpbbhacks.com for it. Link to comment https://forums.phpfreaks.com/topic/48087-adding-php-code-or-to-include-a-page-with-php-code-into-a-tpl-page/#findComment-235035 Share on other sites More sharing options...
legohead6 Posted April 22, 2007 Author Share Posted April 22, 2007 ok,i am trying to work around doing this by adding the required php code in the php pages, i have modified the index page so that to save time trying to merge my "members" database with the "phpbb_users" i have created a code at the beginning that checks if there is an account on both with the same username and password, if there is i made it so it should login and if there isnt it makes one in the phpbb_users to match the one in my "members" database. now i keep comming up with errors. i had to bypass the whole "hacking atempt" system because it wasnt liking my code and know im getting "Fatal error: Call to a member function on a non-object in /home2/mattsweb/public_html/forum/main/includes/page_header.php on line 62" since im not all that familiar with the phpbb system of coding and have been kinda figuring it out as i go i can figure out whats is wrong. here is page_header.php up to that line! <?php /*************************************************************************** * page_header.php * ------------------- * begin : Saturday, Feb 13, 2001 * copyright : (C) 2001 The phpBB Group * email : [email protected] * * $Id: page_header.php,v 1.106.2.25 2005/10/30 15:17:14 acydburn Exp $ * * ***************************************************************************/ /*************************************************************************** * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * ***************************************************************************/ if ( !defined('IN_PHPBB') ) { die("Hacking attempt"); } define('HEADER_INC', TRUE); // // gzip_compression // $do_gzip_compress = FALSE; if ( $board_config['gzip_compress'] ) { $phpver = phpversion(); $useragent = (isset($HTTP_SERVER_VARS['HTTP_USER_AGENT'])) ? $HTTP_SERVER_VARS['HTTP_USER_AGENT'] : getenv('HTTP_USER_AGENT'); if ( $phpver >= '4.0.4pl1' && ( strstr($useragent,'compatible') || strstr($useragent,'Gecko') ) ) { if ( extension_loaded('zlib') ) { ob_start('ob_gzhandler'); } } else if ( $phpver > '4.0' ) { if ( strstr($HTTP_SERVER_VARS['HTTP_ACCEPT_ENCODING'], 'gzip') ) { if ( extension_loaded('zlib') ) { $do_gzip_compress = TRUE; ob_start(); ob_implicit_flush(0); header('Content-Encoding: gzip'); } } } } $template->set_filenames(array( 'overall_header' => ( empty($gen_simple_header) ) ? 'overall_header.tpl' : 'simple_header.tpl') ); //this is line 65// Link to comment https://forums.phpfreaks.com/topic/48087-adding-php-code-or-to-include-a-page-with-php-code-into-a-tpl-page/#findComment-235048 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.