Page 9 of 26 FirstFirst 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 ... LastLast
Results 121 to 135 of 376
Like Tree7Likes

Create a Custom vBulletin "404 Page Not Found" Page, and direct vBSEO to use it.

This is a discussion on Create a Custom vBulletin "404 Page Not Found" Page, and direct vBSEO to use it. within the Member Articles forums, part of the Focus on Members category; Hi, I am using this 404 mod and instead of 404s, every page that doesn't exist is sending a 200 ...

  1. #121
    Senior Member
    Real Name
    Johnny5
    Join Date
    Oct 2008
    Posts
    231
    Liked
    0 times
    Hi,

    I am using this 404 mod and instead of 404s, every page that doesn't exist is sending a 200 and taking people to a list of smileys. Has anyone else had this issue and can you recommend a fix? I'm afraid it's going to hurt my search engines results. :(

    Thank you!

  2. #122
    Senior Member
    Real Name
    Keith Cohen
    Join Date
    Jul 2005
    Location
    Raleigh, NC USA
    Posts
    6,147
    Liked
    12 times
    If you're getting the smilies, then you made a mistake on a step of this.

    The smilies come up if you just call misc.php with no parameters, or with incorrect parameters. Example: vBulletin SEO Forums - Smilies

  3. #123
    Senior Member
    Real Name
    Johnny5
    Join Date
    Oct 2008
    Posts
    231
    Liked
    0 times
    Thanks, Keith. I'm using this in tandem with this: 404 / 301 Tool After Import Redirect on ImpEx imported forums

    Are there any additional steps I need to follow/things I need to ensure to make them jive?

    Thank you.

  4. #124
    Junior Member
    Real Name
    Catherine L Wright
    Join Date
    Sep 2008
    Posts
    27
    Liked
    0 times
    Dear

    How do I should create a new template ?

    create a
    custom_404.XML file and paste codes into it ?

    then admincp > Download / Upload Style > Styles & Templates > Import XML File ?





  5. #125
    Member SIINSI's Avatar
    Real Name
    Miguel Diaz
    Join Date
    Sep 2008
    Location
    Palm Coast, FL
    Posts
    74
    Liked
    0 times
    AdminCP>Styles & Templates>Style Manager>Add New Template in Dopdown Menu

    Copy and paste and name template custom_404>Save. Do the same for all styles.

    Miguel

  6. #126
    Junior Member
    Real Name
    Catherine L Wright
    Join Date
    Sep 2008
    Posts
    27
    Liked
    0 times
    Thanks SIINSI

    you guide me well

  7. #127
    Junior Member
    Real Name
    Lowfyr
    Join Date
    Aug 2007
    Posts
    2
    Liked
    0 times
    I just wanna share my customized custom_404 template, I've included the new google Enhance 404 pages widget (you can find this widget in WMT).

    Code:
    $stylevar[htmldoctype]
    <html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
    <head>
     <!-- no cache headers -->
     <meta http-equiv="Pragma" content="no-cache" />
     <meta http-equiv="Expires" content="-1" />
     <meta http-equiv="Cache-Control" content="no-cache" />
     <!-- end no cache headers -->
     $headinclude
     <title>Page Not Found - <phrase 1="$vboptions[bbtitle]">$vbphrase[x_powered_by_vbulletin]</phrase></title>
    </head>
    <body>
    $header
    $navbar
    <br />
    <div style="padding-left: 25px; padding-right: 25px; font-weight: bold;" class="alt1">
    <br />
    <h2>Page not found</h2>
    ########## enter your google 404 code here ##########
    <br />
    </div>
    $footer
    </body>
    </html>
    how it looks like: http://www.elitepvpers.de/forum/404

    oh and btw. you can exclude adsense with this condition

    Code:
    <if condition="THIS_SCRIPT != 'misc'">
    #your adsense code#
    </if>
    but please note that this condition excludes your adsense from all misc sites.
    Last edited by Lowfyr; 10-17-2008 at 08:56 AM.

  8. #128
    Senior Member briansol's Avatar
    Real Name
    Brian
    Join Date
    Apr 2006
    Location
    Central CT, USA
    Posts
    6,981
    Liked
    8 times
    i've Also added a tag cloud to mine.

    This requires hacking misc.php a little bit.
    Last edited by Brian Cummiskey; 12-01-2009 at 01:23 AM.

  9. #129
    Senior Member webwizzy's Avatar
    Real Name
    Vinayak
    Join Date
    Aug 2008
    Location
    India
    Posts
    257
    Liked
    0 times
    Quote Originally Posted by briansol View Post
    i've Also added a tag cloud to mine.

    This requires hacking misc.php a little bit.
    You could have done it with vba integration feature without modifing misc.php
    Last edited by Brian Cummiskey; 12-01-2009 at 01:23 AM.

  10. #130
    Senior Member
    Real Name
    Johnny5
    Join Date
    Oct 2008
    Posts
    231
    Liked
    0 times
    Can you please share how this is accomplished so I can do the same, Brian?

  11. #131
    Senior Member briansol's Avatar
    Real Name
    Brian
    Join Date
    Apr 2006
    Location
    Central CT, USA
    Posts
    6,981
    Liked
    8 times
    Quote Originally Posted by webwizzy View Post
    You could have done it with vba integration feature without modifing misc.php
    possibly, but vba doesn't touch my site

  12. #132
    Senior Member briansol's Avatar
    Real Name
    Brian
    Join Date
    Apr 2006
    Location
    Central CT, USA
    Posts
    6,981
    Liked
    8 times
    Quote Originally Posted by Johnny5 View Post
    Can you please share how this is accomplished so I can do the same, Brian?

    in misc.php

    add the gloabaltemplates for the cloud:

    replace
    Code:
    $globaltemplates = array();
    with

    Code:
    $globaltemplates = array(
        'tag_cloud_link',
        'tag_cloud_box_search',
        'tag_cloud_headinclude'
        );
    replace
    Code:
    // ######################### REQUIRE BACK-END ############################
    require_once('./global.php');
    with

    Code:
    // ######################### REQUIRE BACK-END ############################
    require_once('./global.php');
    require_once(DIR . '/includes/functions_search.php');
    require_once(DIR . '/includes/functions_misc.php');
    Note: this next section includes my 404 logger product hack (link in sig). If you are not running this, skip this and use the next one

    swap out the whole if page... conditional with this:

    Code:
    if ($_REQUEST['do'] == 'page' AND $vbulletin->GPC['template'] != '')
    {
        $template_name = preg_replace('#[^a-z0-9_]#i', '', $vbulletin->GPC['template']);
    
    
        if($template_name == "404") {        
            // store bad hits for reports
    
            if ($vbulletin->userinfo['userid'] == '' || $vbulletin->userinfo['userid'] == '0')
            {
                $userid = "0";
            }
            else
            {
                $userid = $vbulletin->userinfo['userid'];
            }
    
            $dateline = TIMENOW;
    
            //defined in class_core
            $ref = addslashes(REFERRER);
            $page = addslashes(SCRIPTPATH);
            $ip = addslashes(SESSION_HOST);
            $ua = addslashes(USER_AGENT);
    
            $sql = $db->query_write("INSERT INTO " . TABLE_PREFIX . "four0four (dateline, userid, ref, page, ip, ua)  VALUES ($dateline, $userid, '$ref', '$page', '$ip', '$ua')    ");
        
    
            //*  include tag cloud *//
    
            // tag cloud display
            if ($vbulletin->options['threadtagging'] == 1 AND $vbulletin->options['tagcloud_searchcloud'] == 1)
            {
                $tag_cloud = fetch_tagcloud('usage');            
            }
            else
            {
                $tag_cloud = '';
                $tag_cloud_headinclude = '';
            }
        }
    
        $navbits = construct_navbits(array('' => $template_name));
        eval('$navbar = "' . fetch_template('navbar') . '";');
        
    
        eval('print_output("' . fetch_template('custom_' . $template_name) . '");');
    }
    If you don't use my product, use this instead:

    Code:
    if ($_REQUEST['do'] == 'page' AND $vbulletin->GPC['template'] != '')
    {
        $template_name = preg_replace('#[^a-z0-9_]#i', '', $vbulletin->GPC['template']);
    
    
        if($template_name == "404") { 
            //*  include tag cloud *//
    
            // tag cloud display
            if ($vbulletin->options['threadtagging'] == 1 AND $vbulletin->options['tagcloud_searchcloud'] == 1)
            {
                $tag_cloud = fetch_tagcloud('usage');            
            }
            else
            {
                $tag_cloud = '';
                $tag_cloud_headinclude = '';
            }
        }
    
        $navbits = construct_navbits(array('' => $template_name));
        eval('$navbar = "' . fetch_template('navbar') . '";');
        
    
        eval('print_output("' . fetch_template('custom_' . $template_name) . '");');
    }
    edit custom_404 template. You may want to change some of this, but it includes both the google 404 stuff (which you must sign up for / get from google webmaster tools), and the cloud tag.

    Code:
    $stylevar[htmldoctype]
    <html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]" xmlns="http://www.w3.org/1999/xhtml">
    <head>
     <!-- no cache headers -->
     <meta http-equiv="Pragma" content="no-cache" />
     <meta http-equiv="Expires" content="-1" />
     <meta http-equiv="Cache-Control" content="no-cache" />
     <!-- end no cache headers -->
     $headinclude
     <title>404 Page Not Found - <phrase 1="$vboptions[bbtitle]">$vbphrase[x_powered_by_vbulletin]</phrase></title>
    <style type="text/css">
      #goog-wm { }
      #goog-wm h3.closest-match { }
      #goog-wm h3.closest-match a { }
      #goog-wm h3.other-things { display: none; }
      #goog-wm ul li { text-align: center; }
      #goog-wm li.search-goog { display: block; }
    #wrapper404 { width: 550px; margin: 0 auto 0 auto; padding: 0; 
     text-align: center; }
    h1 { margin: 0; padding: 0; }
    ul li {text-align: left; }
    
    a.tagcloudlink:link, a.tagcloudlink:visited { text-decoration:none; }
    a.tagcloudlink:hover, a.tagcloudlink:active { text-decoration:underline; }
    a.level1 { font-size: xx-small; }
    a.level2 { font-size: small; }
    a.level3 { font-size: medium; }
    a.level4 { font-size: large; }
    a.level5 { font-size: xx-large; }
    
    </style>
    </head>
    <body>
    $header
    $navbar
    <br />
    <div id="wrapper404">
    <h1>404</h1>
    <p>Sorry, the page you have requested cannot be found.</p>
    <script type="text/javascript">
      var GOOG_FIXURL_LANG = 'en';
      var GOOG_FIXURL_SITE = 'http://YOURDOMAIN.com/';
    </script>
    <script type="text/javascript" 
        src="http://linkhelp.clients.google.com/tbproxy/lh/wm/fixurl.js"></script>
    
    <ul>
    <li><a href="$vboptions[bburl]/search.php">Forum Search Engine</a></li>
    <li>Return to the <a href="/">homepage</a></li>
    </ul>
    
    <h3>Popular Tags</h3>
    $tag_cloud 
    
    </div>
    $footer
    </body>
    </html>
    I think that's it.

    let me know if something doesn't work... been a while since i did this and didn't write down the steps involved.
    Last edited by briansol; 03-11-2009 at 10:21 PM.

  13. #133
    vBSEO.com Webmaster Mert Gökçeimam's Avatar
    Real Name
    Lizard King
    Join Date
    Oct 2005
    Location
    Istanbul, Turkey, Turkey
    Posts
    22,367
    Liked
    542 times
    Blog Entries
    4
    Adding tags is a great idea.

    You may also want to change

    Code:
    <h1>404</h1>
    <p>Sorry, the page you have requested cannot be found.</p>
    with

    Code:
    <h1>404</h1>
    <p>Sorry, <a href="http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]" rel="nofollow">the page</a>  you have requested cannot be found.</p>
    Mert Gökçeimam / Crawlability Inc.

    vBSEO 3.6.0 Alpha Önizlemesi - Including Like Tree
    Unveiling the NEW vBSEO Sitemap Generator 3.0 - available NOW for vBSEO Customers!


    Twitter:@Depkac
    Personal Blog : Mert Gökçeimam

  14. #134
    Senior Member briansol's Avatar
    Real Name
    Brian
    Join Date
    Apr 2006
    Location
    Central CT, USA
    Posts
    6,981
    Liked
    8 times
    Good idea, Mert

  15. #135
    Senior Member
    Real Name
    Johnny5
    Join Date
    Oct 2008
    Posts
    231
    Liked
    0 times
    Thanks so much, Brian. I'll give installing this a shot!

Page 9 of 26 FirstFirst 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 ... LastLast

LinkBacks (?)


Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •