It works very well.  As it uses variable variables, you're not tied into a
specific url structure other than variable = value.  The only thing you have
to do is modify the links/ScreenURL in ft to reflect /bla/blabla/ instead of
?bla=blabla.

If you want to turn the sid off for the search engines then you have to
further modify the ScreenURL function.  Here's what I did:

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

  if(!($FullBasket)) $FullBasket= $HTTP_POST_VARS["ACTION"];

  if ((isset($FullBasket)) OR (isset($showsid)))
  {
   $FullBasket="TRUE";
  }


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

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

  if((!USE_COOKIES) OR (!COOKIE_FOUND))
  {

   if(($FullBasket))
   {
    $URL .= "/showsid/1/sid/$sid";
    //passing showsid keeps the sid up in the url
    //there is probably a more elegant solution but this is simple and works
well IMO
   }
  }
Also, on login and basket screens, you have to pass the sid in a hidden
field or FT creates a new sid as the state is lost.

Oh, and you'll need to use the location directive in your apache httpd
config file to direct all requests to the main file.  Also, you'll need to
set php to parse that file within the location directive.  In the case of my
store, the main file is named go.



Probably more info than you wanted or needed.

Cheers,

Kevin


----- Original Message -----
From: Nick Lo <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, August 27, 2001 12:22 AM
Subject: Re: [FreeTrade-dev] New Store and Cheap Stuff--URL parsing


Hi Kevin,

I was sitting on Ron's "URL parsing stuff" as he mentioned it was intended
for FreeTrade2 but planned on getting stuck in later...How much if anything
did you need to do to 1.4 it and it seems to work fine but were there any
quirks...? I may use it in current stuff.

Nick

Kevin wrote:

> I have some computer products left over from my eBay auction days, so I
> created a store to get rid of it.  This store/site is Free Trade 1.4 and
> uses the url parsing stuff offered by Ron Dyck.  Also, it won't shoot a
sid
> into the url (provided your cookies are turned off) until you add a
product
> to your basket or log in.  Very search engine friendly.

----------------------
Lab2 Design-Unit
URL: http://www.lab2.com.au
e-mail: [EMAIL PROTECTED]
----------------------


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


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

Reply via email to