Page 8 of 506 FirstFirst ... 6789101858108 ... LastLast
Results 71 to 80 of 5054
  1. #71
    Join Date
    Dec 2007
    Posts
    15
    Plugin Contributions
    0

    Default Re: Simple SEO URL [support thread]

    Quote Originally Posted by CJPinder View Post
    If you re-read my original post you will see that I said that you can rebuild the full cPath from the category ID.
    Right. My point anyway was that "you have to rebuild the full cPath" in addition to "you can rebuild the full cPath" which some mods forget to do.

    And I forgot, nice code suggestion!

  2. #72
    Join Date
    Apr 2007
    Location
    Herts. UK
    Posts
    890
    Plugin Contributions
    4

    Default Re: Simple SEO URL [support thread]

    Quote Originally Posted by yellow1912 View Post
    No, if I ever decide to do that, I wont use[FONT=monospace] zen_get_parent_categories because it will require mysql query. I will store the category tree in file which can be retrieved later.

    Example:
    17_19_21 will be stored in file t21
    [/FONT]
    Exactly, the code is there to show how the cPath can be rebuilt. Once it has been then cache it in a file or db table. Depending on the server setup, db caching may provide better performance then file caching, but maybe not.

    Regards,
    Christian.

  3. #73
    Join Date
    Apr 2007
    Location
    Herts. UK
    Posts
    890
    Plugin Contributions
    4

    Default Re: Simple SEO URL [support thread]

    Quote Originally Posted by skaimauve View Post
    Right. My point anyway was that "you have to rebuild the full cPath" in addition to "you can rebuild the full cPath" which some mods forget to do.
    The best option for product URLs is to not include the cPath at all except on linked products which require special consideration for SEO anyway.

    Regards,
    Christian.

  4. #74
    Join Date
    Oct 2006
    Posts
    5,477
    Plugin Contributions
    11

    Default Re: Simple SEO URL [support thread]

    Some people prefer having the category name in the link, and even want to have more than 1 name. Now I dont know which one should I listen to, lol
    I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

  5. #75
    Join Date
    Apr 2007
    Location
    Herts. UK
    Posts
    890
    Plugin Contributions
    4

    Default Re: Simple SEO URL [support thread]

    Quote Originally Posted by yellow1912 View Post
    Some people prefer having the category name in the link, and even want to have more than 1 name. Now I dont know which one should I listen to, lol
    I meant remove the cPath except on linked products to help control duplicate content issues (and keep the URLs short). As for keyword stuffing in the URLs, well that is purely a personal preference and you will never please everyone

    Regards,
    Christian.

  6. #76
    Join Date
    Dec 2007
    Posts
    15
    Plugin Contributions
    0

    Default Re: Simple SEO URL [support thread]

    Quote Originally Posted by CJPinder View Post
    The best option for product URLs is to not include the cPath at all except on linked products which require special consideration for SEO anyway.
    Exactly.

    For my own education, what is a "linked product"?

  7. #77
    Join Date
    Oct 2006
    Posts
    5,477
    Plugin Contributions
    11

    Default Re: Simple SEO URL [support thread]

    A product that is in more than 1 categories. For instance, I have a book which is in both science and fiction categories.
    I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

  8. #78
    Join Date
    Dec 2007
    Posts
    15
    Plugin Contributions
    0

    Default Re: Simple SEO URL [support thread]

    Here is a patch for revision @123 to get the following URL style:

    Code:
    http://localhost/site/c2s6-mens-clothing/p4-shirt/product_info.html
    PHP Code:
    diff includes/init_includes/init_ssu.php /www/site/includes/init_includes/init_ssu.php
    31
    ,33c31,32
    <         $this->cache_folder DIR_FS_SQL_CACHE."/ssu/";
    <         
    $this->extension SSU_FILE_EXTENSION;
    <         
    $this->extension trim($this->extension);
    ---
    >         
    $this->cache_folder DIR_FS_SQL_CACHE.'/ssu/';
    >         
    $this->extension '.'.trim(SSU_FILE_EXTENSION);
    36c35,37
    <         $this->mr trim(($this->catalog_dir=='/' && empty($this->extension)) ? getenv('REQUEST_URI') : preg_replace(array($this->catalog_dir,'/\.'.$this->extension.'/'),'',getenv('REQUEST_URI'), 1),'/ ');
    ---
    >         
    $this->mr getenv('REQUEST_URI');
    >         if(
    substr($this->mr,0,strlen($this->catalog_dir)) == $this->catalog_dir)
    >             
    $this->mr substr($this->mr,strlen($this->catalog_dir));
    63,74c64,80
    <         // first element is always main_page
    <         // even if this is a "static" page, assigning first element to
    <         $_GET['main_page'] = $this->mr_parts[0];
    <         for(
    $i1$i $this->mr_parts_count$i++){
    <             
    // TODO: a more efficient way to do this?
    <             if(strstr($this->mr_parts[$i],'c'.SSU_ID_DELIMITER)){
    <                 
    $cPath explode(SSU_ID_DELIMITER$this->mr_parts[$i]);
    <                 
    $_GET['cPath'] = $cPath[count($cPath)-1];
    <             }
    <             elseif(
    strstr($this->mr_parts[$i],'p'.SSU_ID_DELIMITER)){
    <                 
    $products_id explode(SSU_ID_DELIMITER$this->mr_parts[$i]);
    <                 
    $_GET['products_id'] = $products_id[count($products_id)-1];
    ---
    >         if(
    $debug)
    >         
    print_r($this->mr_parts);
    >         
    // element with extension is always main_page 
    >         for($i0$i $this->mr_parts_count$i++){
    >             
    $part $this->mr_parts[$i];
    >             
    // TODO: an more efficient way to do this?
    >             $part_break strpos($part,SSU_ID_DELIMITER);
    >             if(
    $part_break>0){
    >               
    // Use cache to validate structure
    >                 $file_name substr($part,0,$part_break);
    >                 if(
    file_get_contents($this->cache_folder.$file_name) != substr($part,$part_break)){
    >                     if (
    $file_name[0] == 'c'
    >                         
    $_GET['cPath'] = str_replace('s','_',substr($file_name,1));                     
    >                     elseif (
    $file_name[0] == 'p'
    >                         
    $_GET['products_id'] = substr($file_name,1);
    >                 continue;
    >                 }
    75a82,84
    >             if(substr($part,strlen($part)-strlen($this->extension )) == $this->extension ){
    >                 
    $_GET['main_page'] = substr($part,0,strlen($part)-strlen($this->extension ));
    >             }                    
    77c86
    <                 $_GET[$this->mr_parts[$i]] = $this->mr_parts[($i 1)];
    ---
    >                 
    $_GET[$part] = $this->mr_parts[($i 1)];
    81c90
    <                 $_GET[$this->mr_parts[$i]] = '';
    ---
    >                 
    $_GET[$part] = '';
    111,113c120
    <         $link HTTP_SERVER;
    <         if (
    $connection == 'SSL' && ENABLE_SSL == 'true')
    <         
    $link HTTPS_SERVER ;
    ---
    >         
    $link = ($connection == 'SSL' && ENABLE_SSL == 'true') ? HTTPS_SERVER HTTP_SERVER;
    116,122c123,124
    <         if ($use_dir_ws_catalog) {
    <             if (
    $connection == 'SSL' && ENABLE_SSL == 'true') {
    <                 
    $link .= DIR_WS_HTTPS_CATALOG;
    <             } else {
    <                 
    $link .= DIR_WS_CATALOG;
    <             }
    <         }
    ---
    >         if (
    $use_dir_ws_catalog)
    >       
    $link .= ($connection == 'SSL' && ENABLE_SSL == 'true') ? DIR_WS_HTTPS_CATALOG DIR_WS_CATALOG;
    171,182c173,180
    <         // Any param? No? return page.extension
    <         if(empty($parameters)){
    <             if(empty(
    $sid))
    <             return 
    $link.$page.(trim(SSU_FILE_EXTENSION)=='' '' '.'.SSU_FILE_EXTENSION);
    <             else
    <             return 
    $link.$page.'/'.$sid;
    <         }

    <         
    $parameters zen_output_string($parameters);
    <         
    $link .= $page.'/'.$parameters;

    <         while (
    substr($link, -1) == '/'$link substr($link0, -1);
    ---
    >         
    // Any param? 
    >         if(!empty($parameters)){
    >         
    $parameters zen_output_string($parameters);
    >           
    $link .= $parameters.'/';
    >         }
    >         
    >         
    // return page.extension
    >       $link .= $page.((trim(SSU_FILE_EXTENSION)=='') ? '' '.'.trim(SSU_FILE_EXTENSION)); 
    200c198
    <         return 'c'.SSU_ID_DELIMITER.$content.SSU_ID_DELIMITER.$cPath;
    ---
    >         return 
    $file_name.SSU_ID_DELIMITER.$content;
    225c223
    <         return "c$cPath";
    ---
    >         return 
    'c'str_replace('_','s',$cPath);
    227c225

    ---
    >     
    234c232
    <         return 'p'.SSU_ID_DELIMITER.$content.SSU_ID_DELIMITER.$products_id;
    ---
    >         return 
    $file_name.SSU_ID_DELIMITER.$content

  9. #79
    Join Date
    Oct 2006
    Posts
    5,477
    Plugin Contributions
    11

    Default Re: Simple SEO URL [support thread]

    Here is what I'm thinking:
    we either: remove cpath completely from product_info links, rebuild later
    or: we make sure the cPath will always be the same, and always be there for a specific product.
    I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

  10. #80
    Join Date
    Dec 2007
    Posts
    15
    Plugin Contributions
    0

    Default Re: Simple SEO URL [support thread]

    My take is that we've disquised cPath in the URL so far to make things prettier while and not sacrifice speed. If we can do without cPath in the URL, then great!

    The question is to choose the ultimate URL format. The code will follow.

 

 
Page 8 of 506 FirstFirst ... 6789101858108 ... LastLast

Similar Threads

  1. v151 Simple SEO URLs for ZC 1.5.x [Support Thread]
    By cvhainb in forum All Other Contributions/Addons
    Replies: 46
    Last Post: 8 Jun 2022, 09:42 AM
  2. Simple SEO URL, Ultimate SEO URLs, Ceon URI Mapping SEO
    By pizza392 in forum All Other Contributions/Addons
    Replies: 13
    Last Post: 21 Jan 2015, 10:49 AM
  3. How do I tell what version my Simple SEO URL addon mod, and others, are?
    By kevinmc3 in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 6 May 2010, 01:32 AM
  4. Can't create new thread in Simple SEO URL forum
    By gseiber in forum General Questions
    Replies: 1
    Last Post: 3 Apr 2010, 01:56 PM
  5. Re: Simple SEO URL [support thread]
    By creamcrackers in forum General Questions
    Replies: 2
    Last Post: 16 Aug 2009, 03:02 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