Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2011
    Location
    Espoo, Finland
    Posts
    47
    Plugin Contributions
    0

    Default Robots_pages_to_skip

    Hello,

    In earlier versions of ZC, definition of 'ROBOTS_PAGES_TO_SKIP' was in 'meta_tags.php' file and looked like:

    Code:
    define('ROBOTS_PAGES_TO_SKIP','login,logoff,create_account,account,account_edit,account_history...
    (Important: string with no spaces, etc)

    Starting from v158 this definition is moved to 'extra_configures/robots_pages_to_skip.php' file and has formatted outlook:

    Code:
    /**
     * list of pages that should not be indexed by robots
     */
    
    define('ROBOTS_PAGES_TO_SKIP', '
        account,
        account_edit,
        account_history,
        account_history_info,
        ...
    The problem is in spaces added - appropriate code in 'functions/html_output.php' (and also 'common/html_header.php') must now be modified from:

    Code:
     if (defined('ROBOTS_PAGES_TO_SKIP') && in_array($page, explode(",", constant('ROBOTS_PAGES_TO_SKIP')))
    to something like:

    Code:
     if (defined('ROBOTS_PAGES_TO_SKIP') && in_array($page, explode(",", str_replace([" ", "\n"], ['', ''], ROBOTS_PAGES_TO_SKIP)))
    otherwise it seems 'in_array' function won't be working correctly.

    Sorry, if i understand something wrong...

  2. #2
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,684
    Plugin Contributions
    123

    Default Re: Robots_pages_to_skip

    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

 

 

Similar Threads

  1. Yahoo Ignoring 'ROBOTS_PAGES_TO_SKIP'
    By oldschoolrocker in forum General Questions
    Replies: 7
    Last Post: 3 May 2008, 04:41 PM
  2. Robots_pages_to_skip
    By Marg in forum Basic Configuration
    Replies: 0
    Last Post: 12 Mar 2007, 01:48 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR