Page 7 of 506 FirstFirst ... 567891757107 ... LastLast
Results 61 to 70 of 5054
  1. #61
    Join Date
    Oct 2006
    Posts
    5,477
    Plugin Contributions
    11

    Default Re: Simple SEO URL [support thread]

    Basically, we will parse the url to rebuild all $_GET elements, if the link is changed intentionally (heck, you can even do so with the original query string), $_GET will not contain the expected values. But then the user will not gain anything from it, he will get to a page-not-found or an error page depend on the situation. No harm done.
    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

  2. #62
    Join Date
    Dec 2007
    Posts
    15
    Plugin Contributions
    0

    Default Re: Simple SEO URL [support thread]

    Here is the patch on the latest 2.6 code to provide links such as:

    Code:
    http://localhost/site/index/c2s4s6-vinyl-albums/p6-led-zep-ii

    PHP Code:
    diff Simple_SEO_URL/includes/init_includes/init_ssu.php site/includes/init_includes/init_ssu.php 
    34
    ,39c34,35
    <         if ($request_type == 'SSL'
    <             
    $catalog_dir DIR_WS_CATALOG;
    <         else
    <             
    $catalog_dir DIR_WS_HTTPS_CATALOG;
    <             
    $extension SSU_FILE_EXTENSION;
    <             
    $extension trim($extension);
    ---
    >         
    $catalog_dir =  ($request_type == 'SSL') ? DIR_WS_CATALOG DIR_WS_HTTPS_CATALOG;
    >         
    $extension trim(SSU_FILE_EXTENSION);
    47a44
    >                 $file_name current(explode(SSU_ID_DELIMITER$mr_parts[$i],2));
    49,51c46,48
    <                 if(strstr($mr_parts[$i],'c'.SSU_ID_DELIMITER)){
    <                     
    $cPath explode(SSU_ID_DELIMITER$mr_parts[$i]);
    <                     
    $_GET['cPath'] = $cPath[count($cPath)-1];                     
    ---
    >                 if(
    $file_name[0] == 'c') {
    >                     if(
    file_get_contents($this->cache_folder.$file_name) !== false)
    >                         
    $_GET['cPath'] = str_replace('s','_',substr($file_name,1));                     
    53,55c50,52
    <                 elseif(strstr($mr_parts[$i],'p'.SSU_ID_DELIMITER)){
    <                     
    $products_id explode(SSU_ID_DELIMITER$mr_parts[$i]);
    <                     
    $_GET['products_id'] = $products_id[count($products_id)-1];                     
    ---
    >                 elseif(
    $file_name[0] == 'p') {
    >                     if(
    file_get_contents($this->cache_folder.$file_name) !== false)
    >                         
    $_GET['products_id'] = substr($file_name,1);                     
    200d196
    <         $result 'c'.SSU_ID_DELIMITER.$result.SSU_ID_DELIMITER.$cPath;
    201a198
    >         $result $file_name.SSU_ID_DELIMITER.$result;
    208c205
    <         return "c$cPath";
    ---
    >         return 
    'c'str_replace('_','s',$cPath);
    226c223
    <         $result 'p'.SSU_ID_DELIMITER.$result.SSU_ID_DELIMITER.$products_id;
    ---
    >         
    $result $file_name.SSU_ID_DELIMITER.$result

  3. #63
    Join Date
    Dec 2007
    Posts
    15
    Plugin Contributions
    0

    Default Re: Simple SEO URL [support thread]

    Oh, and I forgot, thanks again yellow1912!

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

    Default Re: Simple SEO URL [support thread]

    If you want to keep your URLs ultra simple then you don't actually need to include the full cPath. The only bit that is needed is the final category ID. e.g. if the cPath is 1_2_3_4 then you only need the 4. The full cPath can then be rebuilt from the category ID. This also helps if you move categories around which confuses the heck out of Google.

    In fact you don't need the cPath at all except on linked products (and category pages of course).

    Regards,
    Christian.

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

    Default Re: Simple SEO URL [support thread]

    It's a good idea, will do that on the next release.
    Will ZC handles the cPath rebuild, or we must do that on the mod?

    Also, it would be interesting to see someone comes up with a proper 301 redirect method that should work in most cases. Being an open source mod, SSU is open for anyone to modify and improve it to suit their needs. And hopefully any code improvement will be posted back here so that everyone can benefit from it.

    Expecting more and more code/feature suggestions will come in. And maybe this mod can be incorporated into the new version of ZC, or can be of any help for the developers to build an even better one.

    Quote Originally Posted by CJPinder View Post
    If you want to keep your URLs ultra simple then you don't actually need to include the full cPath. The only bit that is needed is the final category ID. e.g. if the cPath is 1_2_3_4 then you only need the 4. The full cPath can then be rebuilt from the category ID. This also helps if you move categories around which confuses the heck out of Google.

    In fact you don't need the cPath at all except on linked products (and category pages of course).

    Regards,
    Christian.
    Last edited by yellow1912; 30 Jan 2008 at 01:12 AM.
    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

  6. #66
    Join Date
    Oct 2006
    Posts
    5,477
    Plugin Contributions
    11

    Default Re: Simple SEO URL [support thread]

    New version with minor changes in codes:

    Change some local params to class params to allow re-use.
    Redirect site.com/index.php or site.com/index.php? or site.com/? to site.com
    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

  7. #67
    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 want to keep your URLs ultra simple then you don't actually need to include the full cPath.
    Not exactly. If you don't have the full cPath, the menus will not show properly, which was a problem of a previous version.

    More precisely, you would not have access to menu Level 3 because the engine would not know which path to display.

    Steps to reproduce the bug:
    1. Click on Level 1:
    > the page refresh with Level 1 opened becasue cPath = ID of Level 1
    2. Click on Level 2:
    > the page refresh with Level 1 closed because cPath = ID of Level 2

  8. #68
    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
    Not exactly. If you don't have the full cPath, the menus will not show properly, which was a problem of a previous version.
    If you re-read my original post you will see that I said that you can rebuild the full cPath from the category ID.

    Regards,
    Christian.

  9. #69
    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
    Will ZC handles the cPath rebuild, or we must do that on the mod?
    You would need to do it on the mod but it is pretty straight forward. The following code will do it...
    PHP Code:
      $current_category_id = <insert category id here>
      
    $rebuild_categories = array();
      
    zen_get_parent_categories($rebuild_categories$current_category_id);
      
    $rebuild_categories array_reverse($rebuild_categories);
      
    $cPath implode('_'$rebuild_categories);
      if (
    zen_not_null($cPath)) $cPath .= '_';
      
    $cPath .= $current_category_id
    As there is a one-to-one mapping between category IDs and cPaths the process could be cached pretty easily.

    Regards,
    Christian.

  10. #70
    Join Date
    Oct 2006
    Posts
    5,477
    Plugin Contributions
    11

    Default Re: Simple SEO URL [support thread]

    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]
    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

 

 
Page 7 of 506 FirstFirst ... 567891757107 ... 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