Jump to content

FWR Media

♥Ambassador
  • Content count

    6,718
  • Joined

  • Last visited

  • Days Won

    46

Reputation Activity

  1. Like
    FWR Media got a reaction from zooyork in ULTIMATE Seo Urls 5 - by FWR Media   
    No the issue you were having was due to the fact that tep_href_link() was being passed a path ext/modules/payment/platnosci/checkout_pl.php instead of a filename, I thought that may be the case which is why I suggested you upgrade. The other issue cannot be automatically attributed to USU5 and I'm pretty certain is unrelated.
  2. Like
    FWR Media got a reaction from zooyork in ULTIMATE Seo Urls 5 - by FWR Media   
    Current revision is r141
     
    you need to upgrade to r119 then to r141 .. don't worry the upgrades are simple.
     
    One thing to remember is to remove the code in includes/footer.php
     

    usu::performance();
     
    I forgot to put it's removal in the instructions.
     
    Let me know how it does with your problem.
  3. Like
    FWR Media got a reaction from marius123 in ULTIMATE Seo Urls 5 - by FWR Media   
    This link is wrong ..
     

    tep_href_link('product_info.php?products_id='.$p_id)
     
    It should be ..
     

    tep_href_link( FILENAME_PRODUCT_INFO, 'products_id=' . $p_id )
     
    The other link will work ..
     

    tep_href_link("products_new.php","action=buy_now&products_id=".$p_id)
     
    But should be ..
     

    tep_href_link( FILENAME_PRODUCTS_NEW, 'action=buy_now&products_id=' . $p_id )
  4. Like
    FWR Media got a reaction from marius123 in ULTIMATE Seo Urls 5 - by FWR Media   
    I'm confused Mario, USU5 produces urls it has nothing to do with menus. As long as the menu is using the correct tep_href_link() function then USU5 will produce the correct urls.
  5. Like
    FWR Media got a reaction from spooks in Remove & Prevent duplicate content with the canonical tag   
    Sam just a few bits I'd have done differently, obviously use none of it, part of it or all of it as you wish. This is untested I hasten to add.
     
    On the site page ..
     

    <?php sams_canonical( $xhtml = true ); ?>
     
    the function ..
     

    <?php function sams_canonical( $xhtml = false ) { global $request_type; $close_tag = ' />'; if ( false === $xhtml ) { $close_tag = '>'; } $domain = ( $request_type == 'SSL' ? HTTPS_SERVER : HTTP_SERVER ); // Find the file basename safely = PHP_SELF is unreliable - SCRIPT_NAME can show path to phpcgi if ( array_key_exists( 'SCRIPT_NAME', $_SERVER ) && ( substr( basename( $_SERVER['SCRIPT_NAME'] ), -4, 4 ) == '.php' ) ) { $basefile = basename( $_SERVER['SCRIPT_NAME'] ); } elseif ( array_key_exists( 'PHP_SELF', $_SERVER ) && ( substr( basename( $_SERVER['PHP_SELF'] ), -4, 4 ) == '.php' ) ) { $basefile = basename( $_SERVER['PHP_SELF'] ); } else { // No base file so we have to return nothing return false; } // Don't produce canonicals for SSL pages that bots shouldn't see $ignore_array = array( 'account', 'address', 'checkout', 'login', 'password', 'logoff' ); if ( in_array( str_replace( '.php', '', $basefile ) , $ignore_array ) ) { // Bots shouldn't be here so show no canonical return false; } // REQUEST_URI usually doesn't exist on Windows servers ( sometimes ORIG_PATH_INFO doesn't either ) if ( array_key_exists( 'REQUEST_URI', $_SERVER ) ) { $request_uri = str_replace( strrchr( $_SERVER['REQUEST_URI'], '?' ), '', $_SERVER['REQUEST_URI'] ); } elseif( array_key_exists( 'ORIG_PATH_INFO', $_SERVER ) ) { $request_uri = str_replace( strrchr( $_SERVER['ORIG_PATH_INFO'], '?' ), '', $_SERVER['ORIG_PATH_INFO'] ); } else { // we need to fail here as we have no REQUEST_URI and return no canonical link html return false; } // We want these _GET keys removed from the canonical link $ignore_get_keys = array( 'currency', 'language', 'page', 'sort', 'ref', 'affiliate_banner_id', 'osCsid' ); if ( !empty( $_GET ) ) { $get = $_GET; $newget = array(); foreach ( $get as $key => $value ) { if ( in_array( $key, $ignore_get_keys ) ) { unset( $get[$key] ); } } } else { $get = ''; } if ( !empty( $get ) ) { $get = '?' . http_build_query( $get ); } $canonical = $domain . $request_uri . $get; echo '<link rel="canonical" href="' . $canonical . '"' . $close_tag . PHP_EOL; } // function ?>
     
    Hope it helps or gives some ideas ( http_build_query is PHP5 but has a wrapper in RC2a not sure about MS2.2)
  6. Like
    FWR Media got a reaction from dinmc in auctionTastic   
    I'll install it on 2.2 tomorrow and let you know. I haven't had any other reports of it not working on MS2.2 but I'll try nevertheless.
  7. Like
    FWR Media got a reaction from zooyork in Header Tags SEO   
    no don't do that it wont work .. do this instead.
     
    catalog/includes/application_top.php
     
    Find ..
     

    // include the list of project filenames require(DIR_WS_INCLUDES . 'filenames.php');
     
    Add immediately below: -
     

    if ( $_SERVER['PHP_SELF'] == '/' ) { $PHP_SELF = $_SERVER['PHP_SELF'] = $HTTP_SERVER_VARS['PHP_SELF'] = FILENAME_DEFAULT; }
  8. Like
    FWR Media got a reaction from zooyork in Header Tags SEO   
    Jack re:zooyork
     
    We had a problem with his server and USU5, oddly on his server when you access the site as www.mysite.com both $_SERVER['SCRIPT_NAME'] and $_SERVER['PHP_SELF'] contain just /.
     
    On every other server I have worked on they contain /index.php.
     
    So .. if in the header tags script somewhere it uses basename( $HTTP_SERVER_VARS['PHP_SELF'] ) or something expecting to get a filename .. it wont.
     
    Hope that helps.
     
    Regards
     
    Rob
  9. Like
    FWR Media got a reaction from zooyork in ULTIMATE Seo Urls 5 - by FWR Media   
    Ok remove the test code.
     
    You have an odd server there, when accessed as mysite.com (no index.php) $_SERVER['SCRIPT_NAME'] and $_SERVER['PHP_SELF'] should contain /index.php .. yours contains nothing. What server type is it?
     
    Where you used to have ..

    trigger_error( 'USU5 could not find a valid base filename, please inform the developer.', E_USER_WARNING );
     
    Change the line to ..
     

    return 'index.php';
  10. Like
    FWR Media got a reaction from zooyork in ULTIMATE Seo Urls 5 - by FWR Media   
    This is for all pages? index.php or what?
     
    This should only happen for an incorrect page file name.
  11. Like
    FWR Media got a reaction from Dzines in ULTIMATE Seo Urls 5 - by FWR Media   
    I'm not saying it is possibly the issue I am stating that it IS the issue.
     
    Are you checking ..
     
    catalog/ADMIN/includes/functions/general.php
     
    or ..
     
    catalog/includes/functions/general.php
×