Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+2 votes
842 views
in Q2A Core by
when you click on below page it says page not found, how to customize this message?

http://answers.prothoughts.com/abcde

1 Answer

+2 votes
by
 
Best answer
First, make a custom theme following the instructions here:

http://www.question2answer.org/advanced.php#theme-advanced

Then add this code inside your theme folder in the file qa-theme.php:

<?php

    class qa_html_theme extends qa_html_theme_base
    {
        function main()
        {
            if ($this->template=='not-found') {
                // output the content of your 404 page...

            } else
                qa_html_theme_base::main();
        }
    }
   
?>
by
Future versions will include a better default 404 page so hopefully you'll have less need to do that...
by
Thanks a lot! will try this for now.
by
can anybody add this code in uper code

<script type="text/javascript">
//<![CDATA[
var redirectURL = "http://www.yoursite.com";

window.onload = function() { setInterval(countdown, 1000); }
function countdown() {
    var num = parseInt(document.getElementById('timer').innerHTML);
    if(--num < 0) window.location = redirectURL;
    else document.getElementById('timer').innerHTML = num;
}
//]]>
</script>
<center><div style="font-family: verdana;width:700px;text-align:left;" id="content">
<center><span style="font-size:250%;"><b><h1>Oops!</h1></b></span></center>
<b><h2>The page you were looking for could not be found, but don't worry.</h2></b>
    <div class="entry">
           <center><p><a href="http://www.yoursite.com/"><img src="http://spykarbay.com/wp-content/uploads/2012/06/404.jpg" alt="banner" height="320" width="380"></a></p></center>
    </div> <!-- end .entry -->
<center><h4><span style="font-family: verdana;"><b>You will be automatically redirected to Homepage in <span id="timer">5</span> seconds.</b><span></h4></center>
</div></center> <!-- end #content -->
...