Jump to content


Corporate Sponsors


Latest News: (loading..)

* * * * - 2 votes

[Contribution] Ultimate SEO URLs - by Chemo


1938 replies to this topic

#1181 Chemo

  • Banned
  • 2,486 posts
  • Real Name:Bobby
  • Location:/usa/kentucky/richmond/

Posted 05 June 2005, 20:32

I just wanted to drop a quick update note to everyone...

First, the Google XML Sitemap contribution is now fully compatible with Ultimate SEO URLs <= 2.0b. So, install away! :) I'm excited over the possibilities with the new XML sitemaps...I believe that it is cutting edge and will prove to be extremely beneficial to every store.

Second, I'm almost done with the last part of the Ultimate SEO URLs v2.1 release. Once I get the information pages coded it'll be ready for release. All those that wanted SEO URLs for articles will love this release! Here are the additional features with the v2.1 release:

1) More refined, optimized, and native cache logic
2) Ability to choose between cache and no cache (more queries)
3) Ability to turn of cache method for any area (products, cats, articles, etc)
4) Automatic redirection logic is native to the class
5) Redirect logic can be toggled on/off through AdminCP
6) Support for custom character conversions
7) Ability to remove all non-alphanumeric characters (very powerful)
8) Ability to use the class for admin side data feeds (Froogle, etc)
8) MORE SEO PAGES!
-- Products
-- Categories
-- Popup Images
-- Product Reviews
-- Product Reviews Info
-- Article Topics
-- Articles Info
-- Information Pages (almost done!)

Stay tuned for the release!

Bobby

#1182 Chemo

  • Banned
  • 2,486 posts
  • Real Name:Bobby
  • Location:/usa/kentucky/richmond/

Posted 06 June 2005, 06:49

Download Ultimate SEO URLs v2.1

I will no longer be supporting versions less than 2.1

New Support Thread

Bobby

#1183 JoeMcManus

  • Community Member
  • 168 posts
  • Real Name:Joe McManus

Posted 06 June 2005, 09:44

LOL, I came here to say thanks for the 2.1 release and also to inquire about a USEO URL supported contrib for the G Sitemap.

And it's already done by Mr Bobby himself already.

Well done and thanks!

Joe a.k.a. T0PS3O
Johan a.k.a. T0PS3O elsewhere.

Contributed Barclay's ePDQ Payment Module though not originally mine. Made it work though...

#1184 hakan haknuz

  • Community Member
  • 58 posts
  • Real Name:hakan haknuz
  • Location:holland

Posted 07 June 2005, 17:27

[quote name='Chemo' date='Jun 3 2005, 12:37 PM']
You have an unusual problem with cPath=0_* as that is not the usual form. The 0 indicates top level category and should be formed like cPath=1 and NOT cPath=0_1. Do you have a custom category menu?

Yes i suppose i do because this is the top/home link in the categorie box

I am interested in utilizing your store to finish development since it meets all of the requirements: articles, informations pages, and also has the added bonus of being a large product category with possible multiple languages.

Get with me on instant messenger and we'll work out the FTP credentials.

I have installed your contribution update 2.01 and the other upgrade i will start testing this later in the evening and i will e-mail my site-adres to you. I cannot give my ftp credentials due to the fact it is live and functioning, even i must inform my fellow shoprunners before modifying anything

BTW, do you have issues with special characters in the URLs? How many characters as an estimate?

I am not sure what you mean by this these caracters are also put in the rewrited url say example a trademark or copyright , will be parsed within the url . But the link will work when clicked on

Regards Hakan
Kind regards

Hakan Haknuz

#1185 Far \horizons

  • Community Member
  • 15 posts
  • Real Name:Darren Hendricks

Posted 07 June 2005, 17:49

Chemo, on Jun 3 2005, 09:10 AM, said:

Let me finish this 2.1 release and we'll approach the issue later...sounds like an issue somewhere with tep_get_all_params()

<{POST_SNAPBACK}>

I'm having the same problem with manufacturers. The It seems that once I've I click on the manufatcturer from the list and the products come up that if I click on the manufaturer I should go to the manufacturers URL. If not, then why did I put all those manufacturer URLs in? :blush: Instead, I get kicked back to the index. If it's not the fault of your script, you are truly forgiven, Hell if it IS the fault of your script I ain't bitchen, small price to pay. .....BUT (ya know that HAD to be in there) It would be nice having it work that way. I'm not absolutely certain it worked correctly even on a fresh install, I never tried clicking on a manufacturer the second time till after your script was installed. Just seems an awful waste adding all those URLs without it.

#1186 hakan haknuz

  • Community Member
  • 58 posts
  • Real Name:hakan haknuz
  • Location:holland

Posted 07 June 2005, 19:35

One thing i found was that when using the default settings .
The reset option didn't work.
The turn seo off switch didn't work, when i turned it off my site wasn't able to load normal cpath values this means they entire categorie box.Also products wouldn't load.
I tried putting oscdefaultcache off and page_cache also your 7 caches in configuration.
I deleted all cache files and cleared cache in database.
No help there, it seems like im tied to put seo on.
I shall put things back on and test this later in the evening because i really don't want to bother visitors or spiders
Come to think of it maybe this is because the htacces file has still rewrite on..
I suppose the switch set SEO off cannot remove these rules from the htacces file..but i will test some more this night

regards hakan

Edited by hakan haknuz, 07 June 2005, 19:38.

Kind regards

Hakan Haknuz

#1187 willross

  • Community Member
  • 149 posts
  • Real Name:Will Ross
  • Gender:Male
  • Location:Minneapolis, MN

Posted 07 June 2005, 21:20

Chemo

Quote

KNOWN ISSUES
==============
1) Class is not compatible with page_cache contribution. Plans are to offer support in the next release.
Shouldn't changing 'in_array' to '@in_array' in 'seo.class.php' do the trick? I encountered similar issues with page_cache and one of my contributions.

#1188 Danuel

  • Community Member
  • 2 posts
  • Real Name:Daniel

Posted 09 June 2005, 05:28

Possible Bug
Bobby, excellent job. Thank you for your work and contributions.

After installing ultimate SEO v2.1, I tried to get rid of the "?osCsid=xxxxxxxxxxxxx" portion of the url by forcing cookie use ... with either IE or firefox, both accepting cookies, customers cannot login and get the "cookies must be enabled" warning. This does not happen without SEO.

Regards,
-D

#1189 jazzter

  • Community Member
  • 37 posts
  • Real Name:Ben Rugers

Posted 10 June 2005, 11:08

Hey Bobby, I read on one of the forums that you have been banned. I hope that isn't the case.

Thanks for the new SEO contribution, great job. It fixed my problems that I had when the buy now button was clicked it was taking me to a different category.

#1190 Floob

  • Community Member
  • 424 posts
  • Real Name:Allen
  • Gender:Male
  • Location:UK

Posted 21 June 2005, 20:12

cdi-buy.com, on May 23 2005, 07:40 AM, said:

Sheesh.  I'm an idiot.  First I didn't even provide the correct line of code.  Second, I figure it out.  heh.

Sorry for all the posts!

<{POST_SNAPBACK}>


Can you tell me how you got Froogle feed to work with this?

#1191 higgalls

  • Community Member
  • 315 posts
  • Real Name:Higgalls
  • Location:Australia

Posted 12 July 2005, 09:29

shaunam, on Mar 18 2005, 02:31 AM, said:

found the problem with the buynow stuff.  i had been searching the posts and had tried various things people had recommended before posting and one of them was to change application_top.php in the case for buy_now from GET to POST or vice versa - don't recall.  Anyway, changed it back and all is well.  sorry for the trouble.  thanks for the quick assistance on this too.

<{POST_SNAPBACK}>


Hi,

What was your solution with the buy_now going to an empty shopping cart when not logged in? I am experiencing the same problem, and it only started since I installed this SEO contribution (even though it is currently turned off).

I was hoping to launch the new website with the SEO this week but with this now not working I obviously cannot launch it.

Any help will be greatly appreciated.

Cheers,
Chris

#1192 higgalls

  • Community Member
  • 315 posts
  • Real Name:Higgalls
  • Location:Australia

Posted 12 July 2005, 09:58

From reading some posts in these forums, and looking into it further, I believe the problem is that the URL uses &amp (instead of just & to pass on the values). How does this get fixed?

Is there any SEO disadvantages of changing it from &amp to just &
?


Cheers,
Chris

#1193 higgalls

  • Community Member
  • 315 posts
  • Real Name:Higgalls
  • Location:Australia

Posted 12 July 2005, 22:30

I think I have worked out the problem.

This site helped me to fix it: http://www.faqts.com/knowledge_base/view.p.../aid/1151/fid/8

I needed to change my php.ini:
Change session.save_path=/tmp to session.save_path= ;

Now it is accepting &amp; in the URL's. Woohoo.

Cheers,
Chris :)

#1194 higgalls

  • Community Member
  • 315 posts
  • Real Name:Higgalls
  • Location:Australia

Posted 12 July 2005, 22:31

stonebridgecomputing, on Jul 12 2005, 10:30 PM, said:

I think I have worked out the problem.

This site helped me to fix it: http://www.faqts.com/knowledge_base/view.p.../aid/1151/fid/8

I needed to change my php.ini:
Change session.save_path=/tmp to session.save_path= ;

Now it is accepting &amp; in the URL's. Woohoo.

Cheers,
Chris :)

<{POST_SNAPBACK}>


Actually, I had to change it from session.save_path = "C:\php4\sessions" to session.save_path = ;

Any idea whether this will cause any problems on my development computer?

Cheers,
Chris

#1195 clarocque

  • Community Member
  • 559 posts
  • Real Name:Chris
  • Location:VT/USA

Posted 12 July 2005, 22:48

stonebridgecomputing, on Jul 12 2005, 06:31 PM, said:

Actually, I had to change it from session.save_path = "C:\php4\sessions" to session.save_path = ;

Any idea whether this will cause any problems on my development computer?

Cheers,
Chris

<{POST_SNAPBACK}>



SEO URLS using mod rewrite will not work on windows... you will have to use cName (older version)


New version has settings (Enable automatic redirects?)


Chris
osC Contributions I have published.

Note: Some I only provided minor changes, updates or additions!

#1196 Kamil

  • Community Member
  • 9 posts
  • Real Name:Kamil

Posted 25 July 2005, 15:19

I have a problem... since I installed Ultimate SEO URLs v2.0b my Header Tag Controller don´t work. There are always the default title, keyword and description but not the title, keyword an description from the products or the categories.

I check the Ultimate SEO installation... but I couldn´t find any error at the installation.
I think there must been an error in the catalog/includes/application_top.php in this part:

Quote

# include the cache class
include('includes/classes/cache.class.php');
$cache = new cache($languages_id);
# include the Ultimate SEO URLs cache file
include('includes/seo_cache.php');
# Get the cache - no parameters will get all GLOBAL cache entries for this language
$cache->get_cache('GLOBAL');


if ( isset($HTTP_GET_VARS['cName']) && defined(urldecode($HTTP_GET_VARS['cName'])) ) {
$cPath = str_replace( 'cPath=', '', constant(urldecode($HTTP_GET_VARS['cName'])) );
$HTTP_GET_VARS['cPath'] = $cPath;
}
if (isset($HTTP_GET_VARS['pName']) && defined(urldecode($HTTP_GET_VARS['pName'])) ) {
$pid = str_replace('products_id=', '', constant(urldecode($HTTP_GET_VARS['pName'])));
$HTTP_GET_VARS['products_id'] = (int)$pid;
}

or in the catalog/includes/functions/html_output in this part:

Quote

function implode_assoc($array, $inner_glue='=', $outer_glue='&') {
      $output = array();
      foreach( $array as $key => $item )
              $output[] = $key . $inner_glue . $item;

      return implode($outer_glue, $output);
}

function short_name($str, $limit=3){
if (defined('SEO_URLS_FILTER_SHORT_WORDS')) $limit = SEO_URLS_FILTER_SHORT_WORDS;
$foo = explode('-', $str);
foreach($foo as $index => $value){
  switch (true){
  case ( strlen($value) <= $limit ):
    continue;
  default:
    $container[] = $value;
    break;
  } 
} # end foreach
$container = ( sizeof($container) > 1 ? implode('-', $container) : $str );
return $container;
}

////
// The HTML href link wrapper function
  function tep_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true) {
    global $request_type, $session_started, $SID;

$seo = ( defined('SEO_URLS') ? SEO_URLS : false );
$seo_rewrite_type = ( defined('SEO_URLS_TYPE') ? SEO_URLS_TYPE : false );
$seo_pages = array('index.php', 'product_info.php');
if ( !in_array($page, $seo_pages) ) $seo = false;

    if (!tep_not_null($page)) {
      die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine the page link!<br><br>');
    }

if ($page == '/') $page = '';

    if ($connection == 'NONSSL') {
      $link = HTTP_SERVER . DIR_WS_HTTP_CATALOG;
      $seo_link = HTTP_SERVER . DIR_WS_HTTP_CATALOG;
  $seo_rewrite_link = HTTP_SERVER . DIR_WS_HTTP_CATALOG;
    } elseif ($connection == 'SSL') {
      if (ENABLE_SSL == true) {
        $link = HTTPS_SERVER . DIR_WS_HTTPS_CATALOG;
        $seo_link = HTTPS_SERVER . DIR_WS_HTTPS_CATALOG;
        $seo_rewrite_link = HTTPS_SERVER . DIR_WS_HTTPS_CATALOG;
      } else {
        $link = HTTP_SERVER . DIR_WS_HTTP_CATALOG;
        $seo_link = HTTP_SERVER . DIR_WS_HTTP_CATALOG;
        $seo_rewrite_link = HTTP_SERVER . DIR_WS_HTTP_CATALOG;
      }
    } else {
      die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine connection method on a link!<br><br>Known methods: NONSSL SSL</b><br><br>');
    }

    if (tep_not_null($parameters)) {
      $link .= $page . '?' . tep_output_string($parameters);     
  $separator = '&';

  # Start exploding the parameters to extract the values
  # Also, we could use parse_str($parameters) and would probably be more clean
  if ($seo == 'true'){
  $p = explode('&', $parameters);
  krsort($p);
  $params = array();
 
  if ( $seo_rewrite_type == 'Rewrite' ){
    foreach ($p as $index => $valuepair) {
    $p2 = explode('=', $valuepair);   
    switch ($p2[0]){   
    case 'products_id':
      $rewrite_product = true;     
      if ( defined('PRODUCT_NAME_'.$p2[1]) ){
      $rewrite_page_product = short_name(constant('PRODUCT_NAME_'.$p2[1])) . '-p-' . $p2[1] . '.html';
      } else { $seo = false; }
      break; 
   
    case 'cPath':
      $rewrite_category = true;
      if ( defined('CATEGORY_NAME_'.$p2[1]) ){
      $rewrite_page_category = short_name(constant('CATEGORY_NAME_'.$p2[1])) . '-c-' . $p2[1] . '.html';
      } else { $seo = false; }
      break;
// manufacturer addition by WebPixie
    case 'manufacturers_id':
      $rewrite_manufacturer = true;
      if ( defined('MANUFACTURER_NAME_'.$p2[1]) ){
      $rewrite_page_manufacturer = short_name(constant('MANUFACTURER_NAME_'.$p2[1])) . '-m-' . $p2[1] . '.html';
      } else { $seo = false; }
      break;
// end manufacturer addition by WebPixie
    default:
      $params[$p2[0]] = $p2[1];
      break;
    } # switch
    } # end foreach
    $params_stripped = implode_assoc($params);
    switch (true){
    case ( $rewrite_product && $rewrite_category ):
    case ( $rewrite_product ):
      $rewrite_page = $rewrite_page_product;
      $rewrite_category = false;
      break;
    case ( $rewrite_category ):
      $rewrite_page = $rewrite_page_category;
      break;
// manufacturer addition by WebPixie
    case ( $rewrite_manufacturer ):
      $rewrite_page = $rewrite_page_manufacturer;
      break;
// end manufacturer addition by WebPixie
    default:
      $seo = false;
      break;
    } #end switch true
    $seo_rewrite_link .= $rewrite_page . ( tep_not_null($params_stripped) ? '?'.tep_output_string($params_stripped) : '' ); 
    $separator = ( tep_not_null($params_stripped) ? '&' : '?' );
  } else {
    foreach ($p as $index => $valuepair) {
    $p2 = explode('=', $valuepair);   
    switch ($p2[0]){   
    case 'products_id':     
      if ( defined('PRODUCT_NAME_'.$p2[1]) ){
      $params['pName'] = constant('PRODUCT_NAME_'.$p2[1]);
      } else { $seo = false; }
      break; 
   
    case 'cPath':
      if ( defined('CATEGORY_NAME_'.$p2[1]) ){
      $params['cName'] = constant('CATEGORY_NAME_'.$p2[1]);
      } else { $seo = false; }
      break;
// manufacturer addition by WebPixie
    case 'manufacturers_id':
      if ( defined('MANUFACTURER_NAME_'.$p2[1]) ){
      $params['mName'] = constant('MANUFACTURER_NAME_'.$p2[1]);
      } else { $seo = false; }
      break; 
// end manufacturer addition by WebPixie 
    default:
      $params[$p2[0]] = $p2[1];
      break;
    } # switch
    } # end foreach 
    $params_stripped = implode_assoc($params);
    $seo_link .= $page . '?'.tep_output_string($params_stripped); 
    $separator = '&';
  } # end if/else
  } # end if $seo
} else {
      $link .= $page;
      $separator = '?';
  $seo = false;
    } # end if(tep_not_null($parameters)

    while ( (substr($link, -1) == '&') || (substr($link, -1) == '?') ) $link = substr($link, 0, -1);

// Add the session ID when moving from different HTTP and HTTPS servers, or when SID is defined
    if ( ($add_session_id == true) && ($session_started == true) && (SESSION_FORCE_COOKIE_USE == 'False') ) {
      if (tep_not_null($SID)) {
        $_sid = $SID;
      } elseif ( ( ($request_type == 'NONSSL') && ($connection == 'SSL') && (ENABLE_SSL == true) ) || ( ($request_type == 'SSL') && ($connection == 'NONSSL') ) ) {
        if (HTTP_COOKIE_DOMAIN != HTTPS_COOKIE_DOMAIN) {
          $_sid = tep_session_name() . '=' . tep_session_id();
        }
      }
    }

    if ( (SEARCH_ENGINE_FRIENDLY_URLS == 'true') && ($search_engine_safe == true) ) {
      while (strstr($link, '&&')) $link = str_replace('&&', '&', $link);
      while (strstr($seo_link, '&&')) $seo_link = str_replace('&&', '&', $seo_link);

      $link = str_replace('?', '/', $link);
      $link = str_replace('&', '/', $link);
      $link = str_replace('=', '/', $link);
      $seo_link = str_replace('?', '/', $seo_link);
      $seo_link = str_replace('&', '/', $seo_link);
      $seo_link = str_replace('=', '/', $seo_link);
      $seo_rewrite_link = str_replace('?', '/', $seo_rewrite_link);
      $seo_rewrite_link = str_replace('&', '/', $seo_rewrite_link);
      $seo_rewrite_link = str_replace('=', '/', $seo_rewrite_link);

      $separator = '?';
    }

if (isset($_sid)) {
  $link .= $separator . $_sid;
    $seo_link .= $separator . $_sid;
    $seo_rewrite_link .= $separator . $_sid;
}
 
if ($seo == 'true') {
  return ($seo_rewrite_type == 'Rewrite' ? $seo_rewrite_link : $seo_link);
} else {
  return $link;
}
  }

or maybe there is a problem in the includes/seo_cache.php or the includes/classes/cache.class.php

#1197 shahed

  • Community Member
  • 160 posts
  • Real Name:shahed

Posted 25 July 2005, 15:55

After i apply this. Buy Now button on product display page is not working. It takes me to shopping cart page but shows shopping cart empty.. any idea what was wrong with it?

#1198 crash3903

  • Community Member
  • 1,822 posts
  • Real Name:Mark Reynolds
  • Location:United Kingdom

Posted 25 July 2005, 16:08

Kamil

Turn off search engine safe urls in admin and see if that changes anything

The error you have unable to determine page link I have seen before and that is what was causing it

regards

mark
Regards

Mark A Reynolds

#1199 higgalls

  • Community Member
  • 315 posts
  • Real Name:Higgalls
  • Location:Australia

Posted 25 July 2005, 21:43

shahed, on Jul 25 2005, 03:55 PM, said:

After i apply this. Buy Now button on product display page is not working. It takes me to shopping cart page but shows shopping cart empty.. any idea what was wrong with it?

<{POST_SNAPBACK}>


The same thing has happened to me. I have no idea how to fix it.

Does anyone else know how to get the buy now button back working? The code all looks fine.

It has only stopped working since installing the Ultimate SEO contribution.

Any help would be greatly appreciated.

Cheers,
Chris :)

#1200 Kamil

  • Community Member
  • 9 posts
  • Real Name:Kamil

Posted 26 July 2005, 07:58

crash3903, on Jul 25 2005, 04:08 PM, said:

Kamil

Turn off search engine safe urls in admin and see if that changes anything

The error you have unable to determine page link I have seen before and that is what was causing it

regards

mark

<{POST_SNAPBACK}>


Hi Mark,

no that wasn´t the problem. The search engine safe urls are off.
Did you have any other ideas?


-Kamil