Here is the search engine friendly ScreenURL() function that resides in
modules/utility/standard_library.  This is for FT2.  The sid kicks on only
when the users either puts something in thier cart or logs in (if they can't
accept cookies).  This allows the search engines spiders to avoid the url
based sid.  After studying a couple of sites I have indexed by google, I
have come the preliminary conclusion that the prescence of a sid will
prevent indexing (if someone can show me otherwise, let me know).  I have a
site with an FT store - the site is indexed and the store is not.  I have a
site done in php/mysql without sids - the entire thing is indexed.

Would it make make sense to modify GENERATE_SID so that it didn't kick out
new sids constantly if the user doesn't have cookies turned on? It seems
that a sid has to be ready for the moment a user either adds an item to the
cart or logs in.  Since we can't predict when those will occur, my guess
would be to leave GENERATE_SID alone.......

So....here it is, no brain surgery but it's kind of neat :).  If anyone can
come up with a better way to detect that an item has been placed in the
basket, let me know.  Seems a bit over the top to call getBasket *everytime*
a screen is called, but it works.

 function ScreenURL($screen, $secure=FALSE, $extra=FALSE)
 {
  global $sid;
  global $UserInfo;

  $navBasket = getBasket($sid);

  if(USE_SSL AND $secure)
  {
   $URL = "https://";;
  }
  else
  {
   $URL = "http://";;
  }

  $URL .= SERVER_NAME . EXTERNAL_PATH . SCRIPT_NAME . "/SCREEN/$screen";

  if((!USE_COOKIES) OR (!COOKIE_FOUND))
  {
   if((count($navBasket)>0) OR ($UserInfo["ID"] > 0))
   {
    $URL .= "/sid/$sid";
   }
  }

  if(is_array($extra))
  {
   for(reset($extra); $key=key($extra); next($extra))
   {
    $URL .= "/$key/" . prepareText($extra[$key]);
   }
  }

  return($URL);
 }

_______________________________________________
FreeTrade-dev mailing list
[EMAIL PROTECTED]
http://share.whichever.com/mailman/listinfo/freetrade-dev

Reply via email to