Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Template Modifications

Reply
 
Thread Tools
Create 404 Page Details »»
Create 404 Page
Version: 1.00, by ALBCODERS ALBCODERS is offline
Developer Last Online: Dec 2014 Show Printable Version Email this Page

Category: Mini Mods - Version: 4.0.x Rating:
Released: 06-28-2010 Last Update: 12-28-2010 Installs: 44
Template Edits
 
No support by the author.

I am not a proffessional Coder but I just fixed a 404 page for my Forum.
If you want to create one follow me;

Crate a new template wich will called 404_error on your style:

HTML Code:
{vb:stylevar htmldoctype}
<html xmlns="http://www.w3.org/1999/xhtml" dir="{vb:stylevar textdirection}" lang="{vb:stylevar languagecode}" id="vbulletin_html">
  <head>
    {vb:raw headinclude}
<title>Gabim  404 - Faqja nuk u Gjet</title>
  </head>
  <body>
    
    {vb:raw header}
    
    {vb:raw navbar}
    <div id="pagetitle">
<h2 class="blockhead" align="center">404 ERROR</h2>
					
					<h3 class="blocksubhead">ERROR 404  Page Not Found.! </br> (( PUT YOUR CODE OR IMAGE HERE )) </h3>
</br>
{vb:raw footer}
</body>
</html>
Change the text (( PUT YOUR CODE OR IMAGE HERE )) whith your Code that you want.

So Now you need a 404.php lets create one;

PHP Code:
<?php

error_reporting
(E_ALL & ~E_NOTICE);

define('THIS_SCRIPT''404_error');
define('CSRF_PROTECTION'true);
define('CSRF_SKIP_LIST''');
define('VB_ENTRY''404.php');

$phrasegroups = array();


$specialtemplates = array();


$globaltemplates = array('404_error',
);


$actiontemplates = array();


require_once(
'./global.php');

$navbar render_navbar_template(construct_navbits($navbits));

$templater vB_Template::create('404_error');
$templater->register_page_templates();
$templater->register('navbar'$navbar);
print_output($templater->render());

?>
Now open .htaccess file and add this ;
PHP Code:
RewriteEngine On
ErrorDocument 404 http
://www.albcoders.com/404.php 

Download Now

File Type: php 404.php (598 Bytes, 167 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
2 благодарности(ей) от:
askeribilgi, kushal

Comments
  #22  
Old 01-19-2016, 03:04 PM
gnrx gnrx is offline
 
Join Date: Apr 2009
Posts: 390
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi,
I use this code for my 404.

Works fine in vb 4.2.3 but only if I upload the .htaccess and 404.php to my forum folder, if I upload this files to my root folder (public_html) don't work and appears this error:

Code:
Warning: require_once(./global.php) [function.require-once]: failed to open stream: No such file or directory in /home/myforum/public_html/404.php on line 32

Fatal error: require_once() [function.require]: Failed opening required './global.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/myforum/public_html/404.php on line 32
I edit the 404.php for this line for this change:
Code:
require_once('http://www.myforum.com/forum/global.php');
But continue the error.

Only if I upload this files to my forum folder works fine.

Thank you very much!
Reply With Quote
  #23  
Old 10-29-2018, 10:04 AM
gnrx gnrx is offline
 
Join Date: Apr 2009
Posts: 390
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello.
Yes, work fine (and then work like indicate en my last reply )

I try to add a code for, after x seconds, redirect to main page, but I can't...

I try some differents codes, like this:

Code:
<script language="JavaScript">
 
    /* Determinamos el tiempo total en segundos */
    var totalTiempo=10;
    /* Determinamos la url donde redireccionar */
    var url="https://www.myforum.com/";
 
    function updateReloj()
    {
        document.getElementById('CuentaAtras').innerHTML = "Redireccionando en..."+totalTiempo+" segundos";
 
        if(totalTiempo==0)
        {
            window.location=url;
        }else{
            /* Restamos un segundo al tiempo restante */
            totalTiempo-=1;
            /* Ejecutamos nuevamente la funci?n al pasar 1000 milisegundos (1 segundo) */
            setTimeout("updateReloj()",1000);
        }
    }

    window.onload=updateReloj;
 
    </script>
But if insert this code in 404.php not work (have a error of Cloudflare) and if insert in template...obviously also not work...

Regards.
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:50 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.08673 seconds
  • Memory Usage 2,246KB
  • Queries Executed 18 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_code
  • (1)bbcode_html
  • (2)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (3)post_thanks_box
  • (2)post_thanks_box_bit
  • (3)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (3)post_thanks_postbit_info
  • (2)postbit
  • (1)postbit_attachment
  • (3)postbit_onlinestatus
  • (3)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete