X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   XC SEO v1.1.0 Released (https://forum.x-cart.com/showthread.php?t=25297)

groovedis 05-02-2007 07:38 AM

Re: XC SEO v1.1.0 Released
 
I just installed this mod and it is working as far as meta tags go. However it is not changing the links from php to html. Anyone have this problem as well or know a solution? Thanks.

Cefko 05-03-2007 09:16 AM

Re: XC SEO v1.1.0 Released
 
If you have problems with special characters in URLS you can change function normalize_name in Outputfilter.seo.php with next lines:

Outputfilter.seo.php
Code:

        function _normalize_name($name, $search=false) {
                $this->_cur_name = '';
                $name = trim($name);
                $name=strtr($name,"┼▄▌ °·÷╔╣юабцдефгхийклмнопярстужьызшэщъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖЬЫЗШЭЩЪ",
                        "SOZsozYYuAAAAAAACEEEEIIIIDNOOOOOOUUUUYsaaaaaaaceeeeiiiionoooooouuuuyy");
                if (!$search){
                        $this->_cur_name = preg_replace($this->_norm_match, $this->_norm_repl, substr($name, 0, $this->_max_name_length));
                        return strtolower($this->_cur_name);
                }else{
                        $string = explode(' ',$name);
                        $name = array();
                        foreach($string AS $k=>$v){
                                $name[] = $this->_normalize_name($v);
                        }
                        $name = substr(implode('+',$name), 0, $this->_max_name_length);
                        $this->_cur_name = strtolower(str_replace('+',' ',$name));
                        return strtolower($name);
                       
                }
        }


Code:

        function _normalize_name($name, $search=false) {
                $this->_cur_name = '';
                $name = trim($name);

                $find = array("č"," ","·","Č","┼","▌","đ","Đ","ć","Ć");
                $replace = array("c","s","z","c","s","z","d","d","c","c");

                $name = str_replace($find, $replace, $name);


                $name=strtr($name,"┼▄▌ °·÷╔╣юабцдефгхийклмнопярстужьызшэщъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖЬЫЗШЭЩЪ",
                        "SOZsozYYuAAAAAAACEEEEIIIIDNOOOOOOUUUUYsaaaaaaaceeeeiiiionoooooouuuuyy");
                if (!$search){
                        $this->_cur_name = preg_replace($this->_norm_match, $this->_norm_repl, substr($name, 0, $this->_max_name_length));
                        return strtolower($this->_cur_name);
                }else{
                        $string = explode(' ',$name);
                        $name = array();
                        foreach($string AS $k=>$v){
                                $name[] = $this->_normalize_name($v);
                        }
                        $name = substr(implode('+',$name), 0, $this->_max_name_length);
                        $this->_cur_name = strtolower(str_replace('+',' ',$name));
                        return strtolower($name);
                       
                }
        }


Cefko 05-03-2007 01:53 PM

Cloaking
 
There is some cloaking going on in this script...

Why exactly? Does that not present the danger of being pennalized?

2019 05-03-2007 11:15 PM

Re: Cloaking
 
Quote:

Originally Posted by Cefko
There is some cloaking going on in this script...

Why exactly? Does that not present the danger of being pennalized?


what do you mean? you also talk very mysterious... :o

Cefko 05-03-2007 11:26 PM

Re: XC SEO v1.1.0 Released
 
The script generates different URLs for normal browsers and different URLs for robots (GoogleBot.. Yahoo, etc).

The "customer URL" to the product on category page has page number and category number in it, and "robots URL" does not have that.

How can you see that?
If you came to product from category it looks like this
http://www.soundchoicestore.com/brick-karaoke-c-18-p-1-pr-651.html
and it is UNRANKED in google (NO PR)

But if you search for the same product/url in google, you'll find URL
http://www.soundchoicestore.com/brick-karaoke-pr-651.html with PR2

These means that script is serving different URLs to customers and different to robots.
It is called cloaking and it is what big SE frown upon. Although is very minor cloaking, but are you prepared to take chances with it?

2019 05-04-2007 01:17 AM

Re: XC SEO v1.1.0 Released
 
Dear Cefko,

I applied your solution but still my urls are showing like i dont make any changes.
i modified the code under modules/xcseo
e.g

havuz-boyalary-c-8.html

i want this show like

havuz-boyalari-c-8.html

Code:

function _normalize_name($name, $search=false) {
                $this->_cur_name = '';
                $name = trim($name);

                $find = array("İ","ı");
                $replace = array("i","i");
               
                $name = str_replace($find, $replace, $name);


                $name=strtr($name,"ŠŒŽšœžŸ¥µÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýÿ",
                        "SOZsozYYuAAAAAAACEEEEIIIIDNOOOOOOUUUUYsaaaaaaaceeeeiiiionoooooouuuuyy");
                if (!$search){
                        $this->_cur_name = preg_replace($this->_norm_match, $this->_norm_repl, substr($name, 0, $this->_max_name_length));
                        return strtolower($this->_cur_name);
                }else{
                        $string = explode(' ',$name);
                        $name = array();
                        foreach($string AS $k=>$v){
                                $name[] = $this->_normalize_name($v);
                        }
                        $name = substr(implode('+',$name), 0, $this->_max_name_length);
                        $this->_cur_name = strtolower(str_replace('+',' ',$name));
                        return strtolower($name);
                       
                }
        }


Thank you

bluecat 05-07-2007 04:15 AM

Re: XC SEO v1.1.0 Released
 
I just wanted to say thank you very much for the terrific mod! Very appreciative.

2019 05-07-2007 04:50 AM

Re: XC SEO v1.1.0 Released
 
no need to add any additional code to fit your language special chars

just on Outputfilter.seo.php

Code:



$name=strtr($name,"ŠŒŽšœžŸ¥µÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏĞÑÒÓÔÕÖØÙÚÛÜİßàáâãäåæçèéêëìíîïğñòóôõöøùúûüıÿİIı",
                        "SOZsozYYuAAAAAAACEEEEIIIIDNOOOOOOUUUUYsaaaaaaaceeeeiiiionoooooouuuuyyiii");


just change this line to suit your needs.

For example i add İIi to change to iii at the end of the line bolded

Cefko 05-08-2007 01:48 AM

Re: XC SEO v1.1.0 Released
 
Yes I tried that... but it didn't work for my characters, it seemed like strtr does not recognize my characters.

I will try again though

Cefko 05-08-2007 02:35 AM

Re: XC SEO v1.1.0 Released
 
Has anyone tried this mod with settings in Smart.class.php

var $force_compile = false; ?

If i set this to "FALSE" which should greatly increase speed, every page that loads is the same, they don't change anymore.


All times are GMT -8. The time now is 09:50 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.