Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

XC SEO v1.1.0 Released

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #241  
Old 05-02-2007, 07:38 AM
 
groovedis groovedis is offline
 

Advanced Member
  
Join Date: Apr 2005
Posts: 52
 

Default 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.
__________________
X-Cart version 4.0.13 (unix)
Reply With Quote
  #242  
Old 05-03-2007, 09:16 AM
 
Cefko Cefko is offline
 

Advanced Member
  
Join Date: Nov 2002
Posts: 69
 

Default 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); } }
__________________
X-cart version 4.1.7
Apache/2.0.52 (CentOS)
My SQL 5.0.58
PHP Version 5.1.6
Reply With Quote
  #243  
Old 05-03-2007, 01:53 PM
 
Cefko Cefko is offline
 

Advanced Member
  
Join Date: Nov 2002
Posts: 69
 

Default Cloaking

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

Why exactly? Does that not present the danger of being pennalized?
__________________
X-cart version 4.1.7
Apache/2.0.52 (CentOS)
My SQL 5.0.58
PHP Version 5.1.6
Reply With Quote
  #244  
Old 05-03-2007, 11:15 PM
  2019's Avatar 
2019 2019 is offline
 

Advanced Member
  
Join Date: Dec 2004
Posts: 76
 

Default 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...
__________________
// x-cart 4.1.9

X-CART CSS SKIN
XC SEO
IP Addresses in Users Online for all users
Color coded order status
Reply With Quote
  #245  
Old 05-03-2007, 11:26 PM
 
Cefko Cefko is offline
 

Advanced Member
  
Join Date: Nov 2002
Posts: 69
 

Default 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?
__________________
X-cart version 4.1.7
Apache/2.0.52 (CentOS)
My SQL 5.0.58
PHP Version 5.1.6
Reply With Quote
  #246  
Old 05-04-2007, 01:17 AM
  2019's Avatar 
2019 2019 is offline
 

Advanced Member
  
Join Date: Dec 2004
Posts: 76
 

Default 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
__________________
// x-cart 4.1.9

X-CART CSS SKIN
XC SEO
IP Addresses in Users Online for all users
Color coded order status
Reply With Quote
  #247  
Old 05-07-2007, 04:15 AM
 
bluecat bluecat is offline
 

X-Adept
  
Join Date: Nov 2002
Posts: 674
 

Default Re: XC SEO v1.1.0 Released

I just wanted to say thank you very much for the terrific mod! Very appreciative.
__________________
--------------------
X-Cart Gold 4.1.11
Linux/Apache
--------------------
Reply With Quote
  #248  
Old 05-07-2007, 04:50 AM
  2019's Avatar 
2019 2019 is offline
 

Advanced Member
  
Join Date: Dec 2004
Posts: 76
 

Default 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
__________________
// x-cart 4.1.9

X-CART CSS SKIN
XC SEO
IP Addresses in Users Online for all users
Color coded order status
Reply With Quote
  #249  
Old 05-08-2007, 01:48 AM
 
Cefko Cefko is offline
 

Advanced Member
  
Join Date: Nov 2002
Posts: 69
 

Default 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
__________________
X-cart version 4.1.7
Apache/2.0.52 (CentOS)
My SQL 5.0.58
PHP Version 5.1.6
Reply With Quote
  #250  
Old 05-08-2007, 02:35 AM
 
Cefko Cefko is offline
 

Advanced Member
  
Join Date: Nov 2002
Posts: 69
 

Default 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.
__________________
X-cart version 4.1.7
Apache/2.0.52 (CentOS)
My SQL 5.0.58
PHP Version 5.1.6
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 01:27 PM.

   

 
X-Cart forums © 2001-2020