Jump to content
FWR Media

ULTIMATE Seo Urls 5 - by FWR Media

Recommended Posts

Czech characters were quite tricky due to coding of the conversion file.

But how should I set the Rewritebase variable if it is running on address http://eshop.drinker.cz

URLs are re-written and working correctly but no images displayed :-( I tried to set it even like this: /home/www/drinker.cz/subdomeny/eshop/ (according to server info) but still have no idea

 

The urls are working fine having looked at that site.

 

This contribution has nothing to do with the display of images.

 

I think you have a .htaccess in the images directory that is creating a 500 server error or the directory is not readable.

Edited by FWR Media

Share this post


Link to post
Share on other sites

To work in Catalan language is necessary create a new file if you have selected catalan.php (CAT) in your shop.

 

This file catalan.php go to:

 

includes/modules/ultimate_seo_urls5/includes/character_conversion/catalan.php

 

The code:

 

<?php
/**
*
* ULTIMATE Seo Urls 5
*
* 
* @package Ultimate Seo Urls 5
* @license http://www.opensource.org/licenses/gpl-2.0.php GNU Public License
* @link http://www.fwrmedia.co.uk
* @copyright Copyright 2008-2009 FWR Media
* @copyright Portions Copyright 2005 Bobby Easland
* @author Robert Fisher, FWR Media, http://www.fwrmedia.co.uk 
* @lastdev $Author:: Rob                                              $:  Author of last commit
* @lastmod $Date:: 2010-12-01 11:12:10 +0000 (Wed, 01 Dec 2010)       $:  Date of last commit
* @version $Rev:: 187                                                 $:  Revision of last commit
* @Id $Id:: espanol.php 187 2010-12-01 11:12:10Z Rob                  $:  Full Details   
*/

 // Spanish
 $char_convert = array('á' => '', 'é' => '', 'í' => '', 'ñ' => '',
                       'à' => '', 'è' => '', 'l´' => '', 'd´' => '',
                       'ó' => '', 'ú' => '', 'ü' => '', 'Á' => '',
                       'É' => '', 'Í' => '', 'Ñ' => '', 'Ó' => '',
                       'Ú' => '', 'Ü' => '', '¿' => '', '¡' => '');
?>

 

Or add a line of code to the file espanol.php if we defined the Spanish language in our shop.

 

'à' => '', 'è' => '', 'l´' => '', 'd´' => '',

Share this post


Link to post
Share on other sites

To work in Catalan language is necessary create a new file if you have selected catalan.php (CAT) in your shop.

 

Thanks for sharing Ivan

 

Very nice to see somebody offering conversion files for use by others ( only 4 people have bothered so far ).

 

BTW the CAT worries me as the multi language system expects all languages to be just two characters ..

 

en, de, es, etc.

Edited by FWR Media

Share this post


Link to post
Share on other sites

Thanks for sharing Ivan

 

Very nice to see somebody offering conversion files for use by others ( only 4 people have bothered so far ).

 

BTW the CAT worries me as the multi language system expects all languages to be just two characters ..

 

en, de, es, etc.

Because the manufacturers_names in my shop have their origin in germany or in the czech republic, they contain many special characters.

To display all of them, I have to use the UTF-8 charset. As german customers see czech manufacturers I have to include the special czech characters in the german character conversion table german.php and for the czech customers I have to include the special german chars into the czech.php. I also had to include some more special signs, which are not automatically stripped away for the URI, when you use UTF-8.

 

So my $char_convert array for czech.php, german.php and english.php is the same:

 

 

$char_convert = array('ů' => 'u', 'á' => 'a', 'â' => 'v', 'ý' => 'y', 'ä' => 'ae',

'ž' => 'z', 'š' => 's', 'ť' => 't', 'č' => 'c', 'é' => 'e',

'ê' => 'k', 'Ť' => 't', 'ě' => 'e', 'í' => 'i', 'ď' => 'd',

'ï' => 'p', 'ð' => 'r', 'Ď' => 'd', 'ň' => 'n', 'ó' => 'o',

'Ť' => 't', 'Š' => 's', 'ö' => 'oe', '÷' => 'ch', 'ř' => 'r',

'ù' => 'u', 'ú' => 'u', 'ü' => 'ue', '™' => '', 'ÿ' => 'ia',

'À' => 'a', 'Á' => 'a', 'Â' => 'v', 'Ã' => 'g', 'Ä' => 'ae',

'Å' => 'e', 'Ý' => 'y', 'Ž' => 'z', 'Č' => 'c', 'É' => 'e',

'Ê' => 'k', 'Ů' => 'u', 'Ě' => 'e', 'Í' => 'i', 'Î' => 'o',

"´" => "", '°' => '', 'Ø' => '', 'Ň' => 'n', 'Ó' => 'o',

'Ô' => 'f', 'Õ' => 'h', 'Ö' => 'oe', '×' => 'ch', 'Ř' => 'r',

'Ù' => 'u', 'Ú' => 'u', 'Ü' => 'ue', '–' => '-', 'ß' => 'ss');

 

Hope it helps.

 

Manfred

Share this post


Link to post
Share on other sites

Regular expressions require delimiters . . there are lots of good tutorials on the web.

 

 

Good to know about @ as a delimeter. The problem for me seems to be that a string of "_" passes the regex (and the tep_not_null). I changed

 

if( preg_match( '@[0-9_]@', $detail['path'] ) ) {

to:

if( preg_match( '@[0-9_](?=.*\d)@', $detail['path'] ) ) {

 

and it seems to work since it forces the regex to match at least one digit so a category separator alone doesn't break it.

Share this post


Link to post
Share on other sites

Good to know about @ as a delimeter. The problem for me seems to be that a string of "_" passes the regex (and the tep_not_null). I changed

 

if( preg_match( '@[0-9_]@', $detail['path'] ) ) {

to:

if( preg_match( '@[0-9_](?=.*\d)@', $detail['path'] ) ) {

 

and it seems to work since it forces the regex to match at least one digit so a category separator alone doesn't break it.

 

Thanks for pointing that out.

 

I think the correct expression should be ..

 

if( preg_match( '@^[0-9]+(_[0-9]+)*$@', $detail['path'] ) ) {

 

Because ..

 

null string = no match

- ( lone underscore ) = no match

32 = match

32_ = no match

32_34 = match

32_34_ = no match

32_34_96 = match

 

etc etc.

Edited by FWR Media

Share this post


Link to post
Share on other sites

The urls are working fine having looked at that site.

 

This contribution has nothing to do with the display of images.

 

I think you have a .htaccess in the images directory that is creating a 500 server error or the directory is not readable.

 

You were right. I focused on advice given by technical support of the hosting. There was new .htaccesss in the image directory, there was no any before. I want to know how it could be uploaded in there.

 

Thank you very much for patient assistance :-)

Share this post


Link to post
Share on other sites

I focused on advice given by technical support of the hosting.

 

Good old level one support strikes again.

 

They know just about enough to be dangerous :)

Share this post


Link to post
Share on other sites

Hi Robert,

thanks for the great module.

I installed with my multilingual website www.gilda-tonelli.com, works beautifully, but I have some problemm: XML Sitemap (was there with Ultimate Seo Urls 5 PRO) and Google Feed V 2.5 generated only default language, but I need sitemap multilingual and feed. Can you please help me. I think that the other shop, the same developers have problemm. Thank you!

Share this post


Link to post
Share on other sites

Hi Robert,

thanks for the great module.

I installed with my multilingual website www.gilda-tonelli.com, works beautifully, but I have some problemm: XML Sitemap (was there with Ultimate Seo Urls 5 PRO) and Google Feed V 2.5 generated only default language, but I need sitemap multilingual and feed. Can you please help me. I think that the other shop, the same developers have problemm. Thank you!

 

Hi thanks for the feedback. This is the first feedback I've had from a multi language application .. good to see it is working as intended.

 

Would be very interested to hear how this affects the indexing of the site in the search engines.

 

Re: site maps and feeds there is currently only a site map for the default language, obviously I realise that multi language sites need multi language site maps but as yet this hasn't been implemented, the site map that is there really was an afterthought as opposed to a real part of the contribution.

 

In order to get the contribution released for Christmas I had to focus on the core functionality, I'm sure I'll hear a lot more requests like yours as the contribution gets used more by multi language shops and gets better known by the wider ( multi language ) osCommerce community.

 

Sorry that this doesn't solve your immediate problem but the initial focus had to be making available a robust initial multi language product.

Share this post


Link to post
Share on other sites

HTC is fine it just can't handle path based uris ( standard mode ).

 

Re: STS someone posted a few pages back a complete solution to using USU5 with STS.

 

what is the complete solution?, I have searched since 2 days, I can't find the detailed solution to make usu5 and sts works

STS product_info.php.html will not display with Ultimate SEO URLS 5 switched on

a lot of members like me is waiting for that, if someone found a solution, please share

 

thanks a lot

Share this post


Link to post
Share on other sites

what is the complete solution?, I have searched since 2 days, I can't find the detailed solution to make usu5 and sts works

STS product_info.php.html will not display with Ultimate SEO URLS 5 switched on

a lot of members like me is waiting for that, if someone found a solution, please share

 

thanks a lot

 

I don't and wont use STS so I can't comment.

 

Someone may chip up here and offer advice but I really think your support request would be better placed in the STS support thread as USU5 and USU5 PRO work fine.

Share this post


Link to post
Share on other sites

Hi thanks for the feedback. This is the first feedback I've had from a multi language application .. good to see it is working as intended.

 

Would be very interested to hear how this affects the indexing of the site in the search engines.

 

Re: site maps and feeds there is currently only a site map for the default language, obviously I realise that multi language sites need multi language site maps but as yet this hasn't been implemented, the site map that is there really was an afterthought as opposed to a real part of the contribution.

 

In order to get the contribution released for Christmas I had to focus on the core functionality, I'm sure I'll hear a lot more requests like yours as the contribution gets used more by multi language shops and gets better known by the wider ( multi language ) osCommerce community.

 

Sorry that this doesn't solve your immediate problem but the initial focus had to be making available a robust initial multi language product.

Hi,

I will report how the search engines to index the multilingual website, if presented google one more time going through the page. Nevertheless, I hope you make some point it is possible to generate the sitemap and feed multilingual.

Share this post


Link to post
Share on other sites

Hi,

I will report how the search engines to index the multilingual website, if presented google one more time going through the page. Nevertheless, I hope you make some point it is possible to generate the sitemap and feed multilingual.

 

Ok .. don't forget that for search engines to index the other language(s) you need to have a link on the site pointing to that language .. in your case somewhere you need.

 

index.php/de

 

somewhere as a link to the German language.

Edited by FWR Media

Share this post


Link to post
Share on other sites

Hi!

I tryed to upgrade my previous version of USU to this one. I got one problem so far thou. As fast as i do this adjustment:

 

2) catalog/index.php Find ( this is within a block of code ) ...

tep_draw_form('filter', FILENAME_DEFAULT, 'get')

Replace with ...

tep_draw_form('filter', tep_href_link( FILENAME_DEFAULT ), 'get')

 

The language at the headings is changing standards, it cant no more read swedish letters aåö.

 

Does that make sense? :)

 

Please help me:)

 

Best Regards

Andreas

Share this post


Link to post
Share on other sites

Hi!

I tryed to upgrade my previous version of USU to this one. I got one problem so far thou. As fast as i do this adjustment:

 

2) catalog/index.php Find ( this is within a block of code ) ...

tep_draw_form('filter', FILENAME_DEFAULT, 'get')

Replace with ...

tep_draw_form('filter', tep_href_link( FILENAME_DEFAULT ), 'get')

 

The language at the headings is changing standards, it cant no more read swedish letters aåö.

 

Does that make sense? :)

 

Please help me:)

 

Best Regards

Andreas

 

Sorry I don't understand the point .. this code is changing the form action .. nothing else.

Share this post


Link to post
Share on other sites

Thank you very much with this great contribution. I used ULTIMATE Seo Urls 5 before and recently upgraded to PRO but I had problem when using ULTIMATE Seo Urls 5 PRO.

There is Mojibake in URL when the category or product is Chinese. The Chinese URL could be shown properly when ULTIMATE Seo Urls 5. It is fine when using English. Could you please help?

 

OSC version: osCommerce Online Merchant v2.2 RC2a

PHP version: 5

MySQL version: 5

Share this post


Link to post
Share on other sites

Thank you very much with this great contribution. I used ULTIMATE Seo Urls 5 before and recently upgraded to PRO but I had problem when using ULTIMATE Seo Urls 5 PRO.

There is Mojibake in URL when the category or product is Chinese. The Chinese URL could be shown properly when ULTIMATE Seo Urls 5. Could you please help?

 

OSC version: osCommerce Online Merchant v2.2 RC2a

PHP version: 5

MySQL version: 5

Server: Apache

 

Screen Cap

http://picasaweb.google.com/mingwatrading/YOErsI?feat=directlink

Share this post


Link to post
Share on other sites

Thank you very much with this great contribution. I used ULTIMATE Seo Urls 5 before and recently upgraded to PRO but I had problem when using ULTIMATE Seo Urls 5 PRO.

There is Mojibake in URL when the category or product is Chinese. The Chinese URL could be shown properly when ULTIMATE Seo Urls 5. Could you please help?

 

OSC version: osCommerce Online Merchant v2.2 RC2a

PHP version: 5

MySQL version: 5

Server: Apache

 

Screen Cap

http://picasaweb.goo...feat=directlink

 

I am afraid that I have no knowledge or experience of dealing with the Chinese language.

 

USU5 was designed to remove any non latin characters as well as replace non latin characters that are present in a character conversion file as key => value pairs. Does the internet in China not follow the RFC3986 standard?

Share this post


Link to post
Share on other sites

Thanks for this nice contribution!

 

I have successfully installed this on OSC 2.3.1, had one problem with norwegian language though. The special characters would not convert - saving the norwegian.php from the character_conversion_pack as UTF-8 fixed the problem.

Share this post


Link to post
Share on other sites

Hi,

Thank you for this update, it's really interesting contribution. It work fine.

 

I see a difference between the old contribution seo and the new on html generation on the first line code

I think it's the contribution but i am not sure.

When I edit the source we see in first the ligne

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

 

In the old there is no space in the first line: ex

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

In the new code the 3 spaces before the first line

...<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

 

If you generate a xml (google sitemap ou rss.php) it's does'nt work fine and you have an error xml generated because there is

the space before the first line code.

 

Erreur d'analyse XML : instruction de traitement XML ou texte pas au début d'une entité externe

Emplacement : http:/mysite.com/boutique/google_sitemap_products.php

Numéro de ligne 1, Colonne 3 : <?xml version="1.0" encoding="UTF-8"?>

--^

==> but you see the code generated in the source

 

Source Generated
....<?xml version="1.0" encoding="UTF-8"?>
<urlset 
  	xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
  	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  	xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
  	http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">

Correct source
<?xml version="1.0" encoding="UTF-8"?>
<urlset 
  	xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
  	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  	xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
  	http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">

 

 

 

Could you look your code if you have the same problem. Just edit the source and look the first line in html code and xml code.

 

Thank

Edited by Gyakutsuki


Regards
-----------------------------------------
Loïc

Contact me by skype for business
Contact me @gyakutsuki for an answer on the forum

 

Share this post


Link to post
Share on other sites

I am afraid that I have no knowledge or experience of dealing with the Chinese language.

 

USU5 was designed to remove any non latin characters as well as replace non latin characters that are present in a character conversion file as key => value pairs. Does the internet in China not follow the RFC3986 standard?

 

I did not use conversion file but simply set 'Output W3C valid URLs?' to false when using 'ULTIMATE Seo Urls 5'(not PRO), then the Chinese URL was shown and the Chinese hyperlink work fine. I traced the code and found out that 'Output W3C valid URLs?' could not work properly in 'ULTIMATE Seo Urls 5 PRO'. It always 'return htmlspecialchars(utf8_encode($link))' even 'Output W3C valid URLs?' set to false in 'ULTIMATE Seo Urls 5 PRO'. I removed the uft8_encode for testing purpose. The Chinese URL had shown properly, however, the Chinese hyperlink could not redirect to desired page. I am still tracing the redirect code.

Share this post


Link to post
Share on other sites

Hi,

Thank you for this update, it's really interesting contribution. It work fine.

 

I see a difference between the old contribution seo and the new on html generation on the first line code

I think it's the contribution but i am not sure.

 

No this has nothing to do with USU5 PRO. You probably have introduced white space to the top of a file somewhere.

Share this post


Link to post
Share on other sites

Thanks for this nice contribution!

 

I have successfully installed this on OSC 2.3.1, had one problem with norwegian language though. The special characters would not convert - saving the norwegian.php from the character_conversion_pack as UTF-8 fixed the problem.

 

Yes .. although I have included character conversion files for the convenience of users most of these are saved as ISO-8859-1 and often require saving as a different character set.

Share this post


Link to post
Share on other sites

I traced the code and found out that 'Output W3C valid URLs?' could not work properly in 'ULTIMATE Seo Urls 5 PRO'. It always 'return htmlspecialchars(utf8_encode($link))'

 

Good catch.

 

catalog/includes/modules/ultimate_seo_urls5/abstracts/page_modules.php

 

Lines 142/143

 

Find ...

 

  	switch ( defined( 'USU5_USE_W3C_VALID' ) && USU5_USE_W3C_VALID ) {
   	case 'true':

 

Change to ...

 

  	switch ( defined( 'USU5_USE_W3C_VALID' ) && ( USU5_USE_W3C_VALID == 'true' ) ) {
   	case true:

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×