1

Topic: How can I use the footer and header from wordpress?

It seems that the main.tpl doesn't support php. So how can I use the footer and header from my wordpress theme?

Re: How can I use the footer and header from wordpress?

There is a way to include php-file in main.tpl. It's described here

3 (edited by quaker 2008-12-02 02:42)

Re: How can I use the footer and header from wordpress?

here is my main.tpl for http://256studio.com --> wp http://256studio.com/forum --> punbb 1.20

i have did a little modding... trying to work on a integration mod..
here is the first part
1.main.tpl

<pun_include "header.php">

<div id="punwrap">
<div id="pun<pun_page>" class="pun">

<div id="brdheader" class="block">
    <div class="box">
        
        <pun_navlinks>
        <pun_status>
    </div>
</div>

<pun_announcement>

<pun_main>

<pun_footer>

</div>
</div>

<pun_include "footer.php">

2. my header.php as you notice that is in the main.tpl place this header.php in the include/user/

<?php /* Don't remove this line. */ require('../wp-blog-header.php'); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head profile="http://gmpg.org/xfn/11">

<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />

<meta name="distribution" content="global" />

<meta name="robots" content="follow, all" />

<meta name="language" content="en, sv" />



<title><?php wp_title(''); ?><?php if(wp_title('', false)) { echo ' :'; } ?> <?php bloginfo('name'); ?></title>

<meta name="generator" content="WordPress <?php bloginfo('version'); ?>" />

<!-- leave this for stats please -->


<link rel="stylesheet" type="text/css" media="screen" href="http://256studio.com/forum/style/Oxygen.css" />
<link rel="Shortcut Icon" href="<?php echo get_settings('home'); ?>/wp-content/themes/revolution-sports/images/favicon.ico" type="image/x-icon" />

<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php bloginfo('rss2_url'); ?>" />

<link rel="alternate" type="text/xml" title="RSS .92" href="<?php bloginfo('rss_url'); ?>" />

<link rel="alternate" type="application/atom+xml" title="Atom 0.3" href="<?php bloginfo('atom_url'); ?>" />

<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />

<?php wp_get_archives('type=monthly&format=link'); ?>

<?php wp_head(); ?>

<style type="text/css" media="screen">

<!-- @import url( <?php bloginfo('stylesheet_url'); ?> ); -->

</style>

</head>



<body>



<div id="wrap">



<div id="header">



    <div class="headerleft">

        <a href="<?php echo get_settings('home'); ?>/"><img src="<?php bloginfo('template_url'); ?>/images/logo.png" alt="<?php bloginfo('description'); ?>" /></a>

    </div>

    

    <div class="headerright">

        <script type="text/javascript"><!--
google_ad_client = "pub-2086538475721432";
/* 468x60, created 6/6/08 */
google_ad_slot = "6259916009";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

    </div>



</div>



<div id="navbar">



    <div id="navbarleft">

        <ul>

            <li><a href="<?php echo get_settings('home'); ?>">Home</a></li>
 <li><a href="/forum">Forum</a></li>
            <?php wp_list_pages('title_li=&depth=1&sort_column=menu_order'); ?>

        </ul>

    </div>

    

    

    

</div>



<div id="subnav">



    <div id="subnavleft">

        <ul>

            <?php wp_list_categories('sort_column=name&title_li=&depth=1'); ?>

        </ul>

    </div>

    

    

        

</div>

3. here is the footer.php from my main.tpl place this also in the include/user/

<!-- begin footer -->



<div style="clear:both;"></div>



<div id="footer">



    <div id="footerleft">

        <p>Copyright &copy; 2007-2008 <a href="<?php echo get_settings('home'); ?>/"><?php bloginfo('name'); ?></a> | <?php wp_loginout(); ?> | <a href="<?php bloginfo('rss_url'); ?>"><img style="vertical-align:middle" src="<?php bloginfo('template_url'); ?>/images/rss.gif" alt="Subscribe to <?php bloginfo('name'); ?>" /></a><a href="<?php bloginfo('rss_url'); ?>">Subscribe</a> </p>

    </div>

    

    <div id="footerright">

        <p><a href="<?php echo get_settings('home'); ?>"><img src="<?php bloginfo('template_url'); ?>/images/rev.png" alt="256Studio" /></a><a href="http://wordpress.org"><img src="<?php bloginfo('template_url'); ?>/images/wp.gif" alt="WordPress" /></a></p>

    </div>

    

</div>



<?php do_action('wp_footer'); ?>



</div>



</body>

</html>

holla at me if ya need help..

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 !!!

Re: How can I use the footer and header from wordpress?

take your header.php from the theme.. and replace my header.php

you need to add

<?php /* Don't remove this line. */ require('../wp-blog-header.php'); ?>

to line 1 in the header.

2.
you need a direct path to the style from punbb

<link rel="stylesheet" type="text/css" media="screen" href="http://256studio.com/forum/style/Oxygen.css" />

that should do it...

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 !!!

Re: How can I use the footer and header from wordpress?

next take the wp theme and take the footer.php and
place it in the include/user folder of punbb

and use my main.tpl


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 !!!

Re: How can I use the footer and header from wordpress?

how do we do this for wp 2.7.1 and punbb 1.3.2 ?

Re: How can I use the footer and header from wordpress?

Hi,
I try this method : link with Wordpress 2.8.2 and Punbb 1.3.4
It works like a charm ! Except when I active a worpdress plugin "Role Manager".
When I try to load my forum page, it says that "stripslashes_array" cannot be redeclared... But there is no "stripslashes_array" function in the plugin role-manager... I am lost...
Does someone have the same problem ?

zz
(sorry for my poor english)

8

Re: How can I use the footer and header from wordpress?

<?php if is_category('WordPress') {
    get_header('wordpress');
} else {
    get_header();
} ?>



Shamwow