Jump to content



Latest News: (loading..)

* * * * - 10 votes

ULTIMATE Seo Urls 5 - by FWR Media


  • Please log in to reply
3897 replies to this topic

#2561   svobodicz

svobodicz
  • Members
  • 16 posts
  • Real Name:Martin

Posted 04 January 2011 - 05:08 PM

View PostFWR Media, on 03 January 2011 - 09:06 PM, said:

I don't think you are using Ultimate SEO Urls 5 or USU5 PRO.

Perhaps you are using the old 2005 version by Chemo.

Ohh yeah, sorry for mistake, it was downloaded from here http://addons.oscommerce.com/info/2823
I didn't notice the difference. Is it possible to upgrade it or shall I replace it somehow?

#2562   FWR Media

FWR Media
  • Community Sponsor
  • 6,836 posts
  • Real Name:Robert Fisher
  • Gender:Male
  • Location:Stowmarket - Suffolk - UK

Posted 04 January 2011 - 05:25 PM

View Postsvobodicz, on 04 January 2011 - 05:08 PM, said:

Ohh yeah, sorry for mistake, it was downloaded from here http://addons.oscommerce.com/info/2823
I didn't notice the difference. Is it possible to upgrade it or shall I replace it somehow?

Whether you upgrade or not is entirely up to you .. if you do upgrade there are full upgrade instructions in the package, which is here ...

http://addons.oscommerce.com/info/6768

#2563   svobodicz

svobodicz
  • Members
  • 16 posts
  • Real Name:Martin

Posted 04 January 2011 - 06:08 PM

View PostFWR Media, on 04 January 2011 - 05:25 PM, said:

Whether you upgrade or not is entirely up to you .. if you do upgrade there are full upgrade instructions in the package, which is here ...

http://addons.oscommerce.com/info/6768
I've just finished the upgrade, but it doesn't work at all. When I try run my eshop start page, there is error message:
Fatal error: Class 'Usu_Main' not found in /home/www/drinker.cz/subdomeny/eshop/includes/application_top.php on line 314

in the application_top file it is like this (line 314 starts with Usu_Main...):
/**
  * ULTIMATE Seo Urls 5 PRO by FWR Media
  */
  Usu_Main::i()->setVar( 'languages_id', $languages_id )
			   ->setVar( 'request_type', $request_type ) 
			   ->setVar( 'session_started', $session_started ) 
			   ->setVar( 'sid', $SID ) 
			   ->setVar( 'language', $language )
			   ->setVar( 'filename', $PHP_SELF )
			   ->initiate( ( isset( $lng ) && ( $lng instanceof language ) ) ? $lng : array(), $languages_id, $language );
// include the language translations
  require(DIR_WS_LANGUAGES . $language . '.php');


#2564   FWR Media

FWR Media
  • Community Sponsor
  • 6,836 posts
  • Real Name:Robert Fisher
  • Gender:Male
  • Location:Stowmarket - Suffolk - UK

Posted 04 January 2011 - 06:17 PM

View Postsvobodicz, on 04 January 2011 - 06:08 PM, said:

I've just finished the upgrade, but it doesn't work at all.

Contributions tend not to work when you haven't installed them properly.

Why did I react like that? because your immediate reaction was that the contribution was broken rather than you may have made a mistake which annoys me a bit.

Anyway on to your problem.

If the class doesn't exist it simply means you haven't added the code correctly in the file ..

catalog/includes/functions/html_output.php

Edited by FWR Media, 04 January 2011 - 06:18 PM.


#2565   Guritza2010

Guritza2010
  • Members
  • 2 posts
  • Real Name:Laurentiu

Posted 04 January 2011 - 06:45 PM

Hello,
I've installed your last contribution USU 5 PRO.
I have a development in my website that permit me multiple interogation on index page.

I'm working for two days on that and I just can't figured it out.
If I am in a specific category, for example
/index.php?cPath=360
my manufacturers_box is modified to filter only those manufacturers who belong to this category and the link is:
/index.php?cPath=360&manufacturers_id=53
But the new contribution save all these links like this: /index.php?cPath=360 (removing my manufacturers_id key)

Question is: how can I make a new URL for this link, combining the two keys? Is it possible?

I am using the rewrite method. And if you want you can take a look at my website: http://www.e-audio.ro
Hope that you can help me. Thanks.

#2566   FWR Media

FWR Media
  • Community Sponsor
  • 6,836 posts
  • Real Name:Robert Fisher
  • Gender:Male
  • Location:Stowmarket - Suffolk - UK

Posted 04 January 2011 - 06:58 PM

View PostGuritza2010, on 04 January 2011 - 06:45 PM, said:

Hello,
I've installed your last contribution USU 5 PRO.
I have a development in my website that permit me multiple interogation on index page.

I'm working for two days on that and I just can't figured it out.
If I am in a specific category, for example
/index.php?cPath=360
my manufacturers_box is modified to filter only those manufacturers who belong to this category and the link is:
/index.php?cPath=360&manufacturers_id=53
But the new contribution save all these links like this: /index.php?cPath=360 (removing my manufacturers_id key)

Question is: how can I make a new URL for this link, combining the two keys? Is it possible?

I am using the rewrite method. And if you want you can take a look at my website: http://www.e-audio.ro
Hope that you can help me. Thanks.

Hi

The reason this is happening is that manufacturers_id is a dependency of the index page ( showing the manufacturers listings ) .. therefore it is stripped from the querystring.

Were you to use ANYTHING except cPath or manufacturers_id then it would work.

An example for you to try ..

Create a new file in your shop root named testurl.php containing: -

<?php
  include_once 'includes/application_top.php';
  
  echo 'Adding manufacturers_id: <b>' . tep_href_link( FILENAME_DEFAULT, 'cPath=360&manufacturers_id=52' ) . '</b><br />' . PHP_EOL;
  
  echo 'Adding aardwark_id: <b>' . tep_href_link( FILENAME_DEFAULT, 'cPath=360&aardwark_id=52' ) . '</b><br />' . PHP_EOL;
  
  include_once DIR_WS_INCLUDES . 'application_bottom.php';

Browse to the file like www.mysite.com/testurl.php and view the output.

Where you are meant to collect the manufacturers_id from _GET you could just do something like: -

  $manufacturers_id = array_key_exists( 'aardwark_id', $_GET ) ? (int)$_GET['aardwark_id'] : '';

Hope that helps you out.

Edited by FWR Media, 04 January 2011 - 07:08 PM.


#2567   Guritza2010

Guritza2010
  • Members
  • 2 posts
  • Real Name:Laurentiu

Posted 04 January 2011 - 07:08 PM

View PostFWR Media, on 04 January 2011 - 06:58 PM, said:

Hi

The reason this is happening is that manufacturers_id is a dependency of the index page ( showing the manufacturers listings ) .. therefore it is stripped from the querystring.

Were you to use ANYTHING except cPath or manufacturers_id then it would work.

An example for you to try ..

Create a new file in your shop root named testurl.php containing: -

<?php
  include_once 'includes/application_top.php';
  
  echo 'Adding manufacturers_id: <b>' . tep_href_link( FILENAME_DEFAULT, 'cPath=360&manufacturers_id=52' ) . '</b><br />' . PHP_EOL;
  
  echo 'Adding aardwark_id: <b>' . tep_href_link( FILENAME_DEFAULT, 'cPath=360&aardwark_id=52' ) . '</b><br />' . PHP_EOL;
  
  include_once DIR_WS_INCLUDES . 'application_bottom.php';

Browse to the file like www.mysite.com/testurl.php and view the output.

Hope that helps you out.

Thanks for your answer. So there is no way to combine both keys and "translate" them into an url like "category-name-c-45_40_365-manufacturer-name-m-53.html" ? :(

#2568   FWR Media

FWR Media
  • Community Sponsor
  • 6,836 posts
  • Real Name:Robert Fisher
  • Gender:Male
  • Location:Stowmarket - Suffolk - UK

Posted 04 January 2011 - 07:09 PM

View PostGuritza2010, on 04 January 2011 - 07:08 PM, said:

Thanks for your answer. So there is no way to combine both keys and "translate" them into an url like "category-name-c-45_40_365-manufacturer-name-m-53.html" ? :(

[edited]

Yes but it's messy.

Create a new file as before ( testurl.php ) but containing: -

<?php
  include_once 'includes/application_top.php';
  
  echo '<a href="' . str_replace( '.html', '', tep_href_link( FILENAME_DEFAULT, 'cPath=45_40_365' ) ) . '-' . str_replace( HTTP_SERVER . DIR_WS_CATALOG, '', tep_href_link( FILENAME_DEFAULT, 'manufacturers_id=53' ) ) . '">Click</a><br />';
  
  echo '<pre>' . print_r( $_GET, true ) . '</pre><br />';
  
  include_once DIR_WS_INCLUDES . 'application_bottom.php';

Then add the following RewriteRule to .htaccess: -

  RewriteRule ^([a-z0-9-/]+)-c-([0-9_]+)-([a-z0-9-/]+)-m-([0-9]+).html$ testurl.php?cPath=$2&manufacturers_id=$4&%{QUERY_STRING}

That should do it.

Edited by FWR Media, 04 January 2011 - 07:24 PM.


#2569   cdarst

cdarst
  • Members
  • 8 posts
  • Real Name:Cody

Posted 04 January 2011 - 07:32 PM

Tried diligently to find a previous answer to this so forgive me if there is one.  

Just installed USU5 Pro.  Everything works fine with the URLs.  My issue is with the sitemap generator that is in the extras.  I tried using it because the Google XML Sitemaps contribution wasn't working.  I'm getting this error when I try to run http..../usu5sitemaps/index.php:

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND cd.language_id = 1' at line 1

SELECT cd2.categories_name AS pName, cd.categories_name AS cName FROM categories c LEFT JOIN categories_description cd2 ON c.parent_id = cd2.categories_id AND c.parent_id = cd2.categories_id AND cd2.language_id = 1, categories_description cd WHERE c.categories_id = cd.categories_id AND c.categories_id = AND cd.language_id = 1

[TEP STOP]



#2570   cdarst

cdarst
  • Members
  • 8 posts
  • Real Name:Cody

Posted 04 January 2011 - 07:34 PM

View Postcdarst, on 04 January 2011 - 07:32 PM, said:

Tried diligently to find a previous answer to this so forgive me if there is one.  

Just installed USU5 Pro.  Everything works fine with the URLs.  My issue is with the sitemap generator that is in the extras.  I tried using it because the Google XML Sitemaps contribution wasn't working.  I'm getting this error when I try to run http..../usu5sitemaps/index.php:

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND cd.language_id = 1' at line 1

SELECT cd2.categories_name AS pName, cd.categories_name AS cName FROM categories c LEFT JOIN categories_description cd2 ON c.parent_id = cd2.categories_id AND c.parent_id = cd2.categories_id AND cd2.language_id = 1, categories_description cd WHERE c.categories_id = cd.categories_id AND c.categories_id = AND cd.language_id = 1

[TEP STOP]

Just had a duh moment.  Errors are easier to catch when they're not on a white background I guess.   :o

Seems that after "c.categories_id =" there is something missing.

#2571   FWR Media

FWR Media
  • Community Sponsor
  • 6,836 posts
  • Real Name:Robert Fisher
  • Gender:Male
  • Location:Stowmarket - Suffolk - UK

Posted 04 January 2011 - 07:59 PM

View Postcdarst, on 04 January 2011 - 07:34 PM, said:

Just had a duh moment.  Errors are easier to catch when they're not on a white background I guess.   :o

Seems that after "c.categories_id =" there is something missing.

Looks like a corrupt categories table then.

Try this ..

open up the sitemap index.php file ..


Find ..

  $categories = buildCategoriesCache();
  foreach ( $categories as $cid => $detail ) {
	if( preg_match( '@[0-9_]@', $detail['path'] ) ) {

Change to ..

  $categories = buildCategoriesCache();
  foreach ( $categories as $cid => $detail ) {
	if( preg_match( '@[0-9_]@', $detail['path'] ) ) {
  	if ( !tep_not_null( $detail['path'] ) ) continue;

that may ignore the corrupt category( s )

#2572   cdarst

cdarst
  • Members
  • 8 posts
  • Real Name:Cody

Posted 04 January 2011 - 08:57 PM

View PostFWR Media, on 04 January 2011 - 07:59 PM, said:

Looks like a corrupt categories table then.

Try this ..

open up the sitemap index.php file ..


Find ..

  $categories = buildCategoriesCache();
  foreach ( $categories as $cid => $detail ) {
	if( preg_match( '@[0-9_]@', $detail['path'] ) ) {

Change to ..

  $categories = buildCategoriesCache();
  foreach ( $categories as $cid => $detail ) {
	if( preg_match( '@[0-9_]@', $detail['path'] ) ) {
  	if ( !tep_not_null( $detail['path'] ) ) continue;

that may ignore the corrupt category( s )


Hmmm didn't work ...  What do those @'s in the regex accomplish?

#2573   FWR Media

FWR Media
  • Community Sponsor
  • 6,836 posts
  • Real Name:Robert Fisher
  • Gender:Male
  • Location:Stowmarket - Suffolk - UK

Posted 04 January 2011 - 09:28 PM

View Postcdarst, on 04 January 2011 - 08:57 PM, said:

What do those @'s in the regex accomplish?

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

#2574   svobodicz

svobodicz
  • Members
  • 16 posts
  • Real Name:Martin

Posted 04 January 2011 - 10:52 PM

View PostFWR Media, on 04 January 2011 - 06:17 PM, said:

Contributions tend not to work when you haven't installed them properly.

Why did I react like that? because your immediate reaction was that the contribution was broken rather than you may have made a mistake which annoys me a bit.

Anyway on to your problem.

If the class doesn't exist it simply means you haven't added the code correctly in the file ..

catalog/includes/functions/html_output.php

Thank you for quick response. The contribution itself was installed correctly, but there was other piece of code that caused the problem. I wasn't able to identify the file.
I have to deal with special czech characters (conversion pack doesn't work in this moment) and finaly with the correct path in the .htaccess file, as my path is not shown in the Rewritebase variable.

#2575   FWR Media

FWR Media
  • Community Sponsor
  • 6,836 posts
  • Real Name:Robert Fisher
  • Gender:Male
  • Location:Stowmarket - Suffolk - UK

Posted 04 January 2011 - 11:21 PM

View Postsvobodicz, on 04 January 2011 - 10:52 PM, said:

Thank you for quick response. The contribution itself was installed correctly, but there was other piece of code that caused the problem. I wasn't able to identify the file.

Nope .. your error was ..

Fatal error: Class 'Usu_Main' not found in /home/www/drinker.cz/subdomeny/eshop/includes/application_top.php on line 314

This means you hadn't added the relevant code to the file I mentioned.

Quote

I have to deal with special czech characters (conversion pack doesn't work in this moment)

The conversion files work perfectly .. all you have to do is add the correct characters and their replacements to the array and then do two other things ..

  • 1] Save the file under the same name as the language in osCommerce ( e.g. language = czech then file = czech.php )
  • 2] Ensure that you save the conversion file as the correct character set

Quote

and finaly with the correct path in the .htaccess file, as my path is not shown in the Rewritebase variable.

There are guide instructions for the correct data to put as RewriteBase both in the instructions and in the htaccess.txt file itself.

Good luck getting it workling.

#2576   svobodicz

svobodicz
  • Members
  • 16 posts
  • Real Name:Martin

Posted 04 January 2011 - 11:25 PM

View Postsvobodicz, on 04 January 2011 - 10:52 PM, said:

Thank you for quick response. The contribution itself was installed correctly, but there was other piece of code that caused the problem. I wasn't able to identify the file.
I have to deal with special czech characters (conversion pack doesn't work in this moment) and finaly with the correct path in the .htaccess file, as my path is not shown in the Rewritebase variable.
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

#2577   FWR Media

FWR Media
  • Community Sponsor
  • 6,836 posts
  • Real Name:Robert Fisher
  • Gender:Male
  • Location:Stowmarket - Suffolk - UK

Posted 05 January 2011 - 08:21 AM

View Postsvobodicz, on 04 January 2011 - 11:25 PM, said:

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, 05 January 2011 - 08:24 AM.


#2578   arcadia128

arcadia128
  • Members
  • 57 posts
  • Real Name:ivan

Posted 05 January 2011 - 11:22 AM

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´' => '',



#2579   FWR Media

FWR Media
  • Community Sponsor
  • 6,836 posts
  • Real Name:Robert Fisher
  • Gender:Male
  • Location:Stowmarket - Suffolk - UK

Posted 05 January 2011 - 12:03 PM

View Postarcadia128, on 05 January 2011 - 11:22 AM, said:

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, 05 January 2011 - 12:04 PM.


#2580   Manniman

Manniman
  • Members
  • 30 posts
  • Real Name:Manfred

Posted 05 January 2011 - 02:57 PM

View PostFWR Media, on 05 January 2011 - 12:03 PM, said:

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