Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+7 votes
1.6k views
in Q2A Core by
Has someone played around to implement custom Not Found 404 page? Could you point me to where to look to do that?
Q2A version: 1.4.3
by
i use these icons for some special tags not for all and i have 10-15 icons
nd can you please tell me how this iframe work
please take a look of this website

http://www.prepare4interview.com/index.php/ulink?u=https://docs.google.com/document/pub?id=16pknNp2lmU5b_G_0iperY48K27nq4FMUfcQFNDSZ7NU
by
iframe is very simple, it is just an HTML tag. Take a look at this simple example.
http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_iframe
by
and thanks for the tip about the icons you use for tags. Did you actually have to change parts of the qa code somewhere? I am sure you did, and that would be very nice if you could share it with us. I am now busy with taking care of a fatal error in q2a that I reported earlier. I mean this one:http://www.question2answer.org/qa/21673
by
yes i change the code but mostly setting is done by just using css

2 Answers

0 votes
by

goto qa-include/qa-page-not-found.php and replace all content with 

<html>

<head>
<title>Oops!</title>
</head>
<script type="text/javascript">
//<![CDATA[
var redirectURL = "http://www.askoverflow.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.askoverflow.com"><img src="http://www.askoverflow.com/qa-theme/Ask/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">10</span> seconds.</b><span></h4></center>
</div></center> <!-- end #content -->
</html>
 
 
and add this image to your server and chang the website name with our own 
+1 vote
by
You can put below code in qa-theme.php file, this file will be in your theme's directory. If it is not present then create and copy below code. Test and let us know.

<?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();
        }

    }    

?>
...