Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
2.3k views
in Q2A Core by

I've read all the Q's & A's here and I am still confused.. Like someone else's situation I have an overall header/site-nav/footer that I'd like to wrap around the Q&A pages. I've done this with many other applications using php include statments

<?php include('inc_logo_banner_nav.htm');?>

in the overall_head and overall_foot files

I copied the Candy theme and renamed it and will work with that.. but I am completely stumped on where to make this change..

I thought maybe I could do it in:
qa-include/qa-theme-base.php

 function body()
  {
   $this->output('<BODY');
   $this->body_tags();
   $this->output('>');
   $this->output ('<?php include('inc_logo_banner_nav.htm');?>;

but that spit an error..

Parse error: syntax error, unexpected T_STRING in /home/mysite/public_html/question2answer/qa-include/qa-theme-base.php on line 264
 

Can I get some baby step help please??

I know I can put what I want in the custom head/foot in the layout section, but that means I have to maintain the included info in 2 places, I am really trying to avoid that...

Q2A version: 1.4.3

1 Answer

0 votes
by

I don't know what your whole qa-theme.php file looks like, but at first glance, you don't need the <?php before the include. The file is already wrapped in php. Just use include('inc_logo_banner_nav.htm'); and then qa_html_theme_base::body();

Also, for the nav, there is a special nav function to use, I would not use the body function.

 

by
woooooooohoooooo
http://www.beautytech.com/question2answer
woooohooooo I got it! THANK you for making me stop and THINK!

so now.. all the way on the bottom is
1
just below the lower navigation.. where the hack did I pick that up from???

Ahh just did some tweakin on the header also and now its up there too.. ;(
by
FYI, the code below may help you. This is my code for my custom footer, which I used in the qa-theme.php. There are some coding conventions I probaly should have done differently, the for a footer this is fine.

function footer()
            {
                $this->output('<DIV CLASS="qa-footer">');


            //my custom code goes in this file included here               
                             require_once 'footer.php';

                $this->footer_clear();

                $this->nav('footer');
                $this->attribution();

                $this->output('</DIV> <!-- END qa-footer -->', '');
        }
by
genius :) marked that thread for reference.. looking nice now :) Looks like I am ON for moving my forums and the look of the whole site tomorrow :)
...