Latest News: (loading..)
spidometrs

[CONTRIBUTION] Ultimate SEO URLs v2.1 - by Chemo

7,337 posts in this topic

I want to do translit?

?=>a

?=>b

?=>v

?=>g

..........

As I can do this? In what file must I translit add?

Thanks!

Share this post


Link to post
Share on other sites

This is the support thread for the Ultimate SEO URLs v2.1 release.

 

I wanted to create a separate thread for this release as the contribution has been recoded from the ground up and is completely different from <=2.0b releases.

 

FEATURES

It's FREE

...some don't appreciate this fact. This release is over 1,700 lines of custom coded, golden sweet, search engine optimization goodness. I have spent an incredible amount of time not only creating the code but also testing, debugging, adding features, and of course making the best damn documentation of any contribution.

 

So, as a forward before you install or upgrade and ask for support remember this: ask nicely and say thank you. The increased search engine position and resulting traffic from this contribution may translate into thousands in revenue for your store...but for me it's a losing proposition as it is released for free, supported for free, and the only return I get is from positive feedback and the occassional donation. Thus, I have a pretty short fuse with those that feel I owe them anything.

 

Abstracted Code

The advantage to the abstraction is that the code can be used beyond the catalog side. The most immediate use will probably be for admin side data feeds like Froogle, Yahoo, etc. This adds the benefit of keyword relevant URLs for every link going out of your store to the world.

 

Integration of Addon Scripts

The Advanced Cache and Automatic Redirect classes are now native to the base class. This completes the development of those tools and makes the overall package easier to maintain, upgrade, and develop in the future.

 

Performance Optimization of the Code / Queries

There were a few store owners that had extremely large catalogs (greater than 50K products or categories) that were having issues with the 2.0b release. The code was not performance driven other than creating the SEO URLs. This release has been coded from the ground up to be a Porsche...fast, lean, and mean...no matter how large or small the catalog size. The code has been load tested on stores with over 100K products / categories and also some with less than 100. There is no difference in performance between the two extremes.

 

The heart of the performance is the use of efficient queries and code...but also the effective use of the cache functions. The available options allow a store owner to turn off cache completely (for large stores) or turn off cache for certain parts. This allows complete control of the performance of the code and the use of resources can be throttled at leisure.

 

As everyone knows, I am a performance obsessed coder. Naturally, I have performance analysis code native to the core that will help you fine tune the installation. What's the use of having options if you can't see what effect they are having on the overall page performance?

 

Better Support for Special Characters

I have added better regex code to strip characters but know the issue of international translations are pretty tricky. As a result, I have added the option of having the store owners define their own translations. These can be added through the admin control panel.

 

Simplied Installation / Upgrade Procedure

The contribution has been transformed into a more modular package which means fewer code edits. This means that initial installation is very much improved and easier. Also, in the future all upgrades will simply be overwriting 1 file. How much easier can it be? :)

 

As for the database settings: the contribution has an installer class that will automatically detect whether it needs to upgrade or install itself. Thus, there is no need to execute SQL files in phpMyAdmin or even call installer scripts through the browser. The only step needed to install / upgrade database settings is to call your store one time...neat, right? I hope the installer class proves to be as useful as I coded it to be...especially for future upgrades.

 

More Pages are SEO'd

The past releases focused squarely on the meat and bones of any store: the product and category pages. Since that is very mature it has come time to expand the family of natively supported parts of the store. As of this release the following pages have SEO URLs:

 

1) Product Pages

2) Category Pages

3) Article Topics

4) Article Info

5) Information Pages

6) Product Reviews

7) Product Review Info

8) Popup Images

 

The power of the contribution code is that the list can easily be expanded to include most anything.

 

SUMMARY

This release is a complete recode of the contribution and represents a step forward with development. It is the backbone of the eventual v3.X series and is transitional...meaning that when v3.0 is released upgrading will be as simple as overwriting 1 file.

 

There are many new features introduced but the enhanced peformance is enough to warrant upgrade / installation.

 

This first post is a placeholder for the actual download link. I wanted to create the documentation with a link directly to this thread...so, had to create this thread before posting the contribution to the download area. It's a backward way of doing things but until the osCommerce team fixes their contribution system that's how it is.

 

Please do not post a reply to this thread until I get the download link posted.

 

Bobby

lavieenrouge likes this

Share this post


Link to post
Share on other sites

Hi Bobby,

 

have installed the new SEO URL and get an fatal error:

 

Fatal error: Call to a member function on a non-object in /homepages/14/d13488967/htdocs/includes/functions/html_output.php on line 19

 

Please help me ....

 

Best,

Panzz

Share this post


Link to post
Share on other sites

Hello Bobby,

 

I have the same error :

 

Fatal error: Call to a member function on a non-object in /var/www/html/includes/functions/html_output.php on line 8

 

Line 8 is: return $seo_urls->href_link($page, $parameters, $connection, $add_session_id);

}

 

Thx,

 

Hans

Share this post


Link to post
Share on other sites

Hi Bobby,

 

Thanks for this new release of this excellent contribution.

Was very easy to install, but 2 problems remain for me :

 

1. Get this message on top of every page :

 

Warning: ereg(): Invalid content of \{\} in /path-to-my-site/includes/classes/seo.class.php on line 1329

 

Here is the line 1329:

  if ( ereg("{|}", $this->real_uri) ){

 

2. Problem with special characters :

 

In French, the ' is used very often. In the mySQL DB, it is stored as "'".

I tried to put in SEO Admin "Enter special character conversions" :

'=>'

'=>\'

"'"=>"'"

"'"=>"\'"

 

But the result is always the same, ' will be displayed as 39.

 

Any idea of what I did wrong ?

 

And a last question: Will this release work with "Page Cache v1.0 - MS2" ?

 

Thanks in advance for your help.

 

Pierre

Edited by anatolius

Share this post


Link to post
Share on other sites

Just installed it without errors, but this is my first time installing SEO and I wanted to ask if someone can check my site if it's ok please.

 

My Webpage

Share this post


Link to post
Share on other sites
Just installed it without errors, but this is my first time installing SEO and I wanted to ask if someone can check my site if it's ok please.

 

Misa, I just had a look, seems to work fine!

Share this post


Link to post
Share on other sites

Thanks for your reply.

 

Have installed the 2 new contri's from Chemo now and let's hope the best from it.

 

(Ultimate SEO and Google XML Sitemap Feed)

Share this post


Link to post
Share on other sites
Just installed it without errors, but this is my first time installing SEO and I wanted to ask if someone can check my site if it's ok please.

 

My Webpage

 

I get Session ID's on your site. Might be due to my own tight firewall settings though which not always allow stuff like cookies etc.

Share this post


Link to post
Share on other sites

Another error message to add to my last topic:

 

on product_listing.php:

 

Warning: eregi(): Unmatched \{ in /path-to-mysite/includes/classes/seo.class.php on line 699

 

Seems to be related to previous error ?

Share this post


Link to post
Share on other sites

This is most likely the easiest to install and most thorough contribution ever.

 

The only thing I found odd was that when 'Enter special character conversions' AND 'Remove all non-alphanumeric characters' were enabled, only the latter was applied. Maybe more logical way would be to first apply 'Enter special character conversions' for those characters that are useful on the URL (like ?=>a,?=>o,?=>A,?=>O) and after that bulletproof the rest with 'Remove all non-alphanumeric characters' ?

 

If I understand the code correctly this function handles both of those tasks:

 

	function strip($string){
 $pattern = $this->attributes['SEO_REMOVE_ALL_SPEC_CHARS'] == 'true'
     ?	"([^[:alnum:]])+"
     :	"([[:punct:]])+";
 $anchor = ereg_replace($pattern, '', strtolower($string));
 $pattern = "([[:space:]]|[[:blank:]])+"; 
 $anchor = ereg_replace($pattern, '-', $anchor);
 if ( is_array($this->attributes['SEO_CHAR_CONVERT_SET']) ) $anchor = strtr($anchor, $this->attributes['SEO_CHAR_CONVERT_SET']);
 return $this->short_name($anchor); // return the short filtered name 
} # end function

 

Any tips on how to make this happen ? I tried changinc the order of code but it not work.

Share this post


Link to post
Share on other sites

Bobby,

Great contribution, RESPECT!!

It is the backbone of the eventual v3.X series and is transitional...meaning that when v3.0 is released upgrading will be as simple as overwriting 1 file.
Great news! (means I don't have to wait for v3.0)

But; My development-Shop is on an Windows server. I guess I'll still have to wait a while(?).

I know your opinion about STS, but for my design needs I must use STS.

Does this contribution work with STS?

 

Regards

Edited by osCshop

Share this post


Link to post
Share on other sites

I have a set of categories that are the alphabet to sort our bulk herbs and the category for the letter P does not display the products. Is there a way I can change the rewrite rule so that the P category will still work? My .htaccess file is as follows

 

Options +FollowSymLinks

RewriteEngine On

RewriteBase /

RewriteRule ^(.*)-p-(.*).html$ product_info.php?products_id=$2&%{QUERY_STRING}

RewriteRule ^(.*)-c-(.*).html$ index.php?cPath=$2&%{QUERY_STRING}

RewriteRule ^(.*)-m-(.*).html$ index.php?manufacturers_id=$2&%{QUERY_STRING}

 

Thanks!

Millie

Share this post


Link to post
Share on other sites

I have updated to this version earlier on this morning without any problems. Just read the instruction carefully and you cannot go wrong !!

 

Chemo, you mention that this version works better for multinlingual sites .. do you refer to the special character conversion or is there something else more related to a discussion we had in another thread ;) ?

Share this post


Link to post
Share on other sites

hi everyone. I have just got off of instant messenger with chemo, who for as yet unexplained reasons has been banned from this forum. He cannot post any comments, nor can he even view the problems that others have posted. Obviously it is too early to pass judgement on the powers that be as to why this has happened, but Chemo wanted me to post this comment to all people looking for his valuable support and help. The comment below is his work, and if as a result of posting it I get banned, then you can make your own decisions about what that says about the state of the osc forums. Anyway, this is what he says:

 

osCommerce Community,

 

I was banned from the forum and will no longer be able to offer support for my contributions.  I apologize to the osC community members that would have benefited from not only my future support but also the contributions that would have been released.

 

Good luck in the future and I wish you all the best in achieving your goals.

 

Cordially,

 

Bobby

 

Sorry to everybody who would have benefitted from his expertise, and hopefully we can sort out any differences between him and the osc team to get such a valuable community member back into the osc family.

Share this post


Link to post
Share on other sites

None of my language files are plugging in.... all of the cart text is just variables anyone know what to do here? :blink:

Share this post


Link to post
Share on other sites

Hello I noticed this difference.

 

http://www.misterbling.com/bling-skull-necklace-p-18.html

 

http://www.misterbling.com/bling-skull-nec...8.html?cPath=14

 

I thought was just me but the post earlier in this thread about a newly installed store showed the same thing in a deeply listed product

 

http://www.bruinenfit.nl/shop/corsa-p-29.html?cPath=21_22

 

Just installed and am going to tinker with it on a test site but just curious about this.

Share this post


Link to post
Share on other sites

Well that sucks a lot.

 

Let's not get more people banned though.

 

In an attempt to stay OT.

 

Misa, I see SEOed URLs but with the session ID behind them. Your logs should be able to tell whether I'm one of few or whether you left them on for all to see.

 

I just upgraded frmo 1.3 to 2.1 following the UPGRADE instruction inc the 1.4 notes. All is fine but the product links. Manufacturer and category links are great. The product links look like this though:

 

domain.com/ripple-mattress-topper-p-34.html?cPath=21_22_25

 

Strangely it's just the links to product_info. I did hack products_info myself but I can;t see how that would affect this. It just does some str_replaces before eoching the product_description.

 

.htaccess is fine as well.

 

Anyone perhaps a clue as to why this might be happening?

 

PS yes I cleared the cache a couple of times too. And judging by the post before me, I'm not the only one...

Edited by JoeMcManus

Share this post


Link to post
Share on other sites

another great contrib from Chemo, Congrats& thank you once again!

 

I have installed this contrib but run into the following error.

 

Fatal error: Call to a member function on a non-object in /home/kenstant/public_html/Products/includes/meta_tags.php on line 57

 

 

after everything seems to go finer on the install. Anyone have any idea what is causing this.?.

 

also anyone have an directions on how to uninstall completly till I can figure out what the issue is?

 

many thanks.

Share this post


Link to post
Share on other sites

Hey guys..

 

Great contribution, easy install... but im having one problem. When I try to add a product or edit an existing product, click preview... and then when I click save I get this:

 

------------------------------

Warning: main(includes/reset_seo_cache.php): failed to open stream: No such file or directory in /home/fmarket/public_html/store/admin/categories.php on line 22

 

Warning: main(): Failed opening 'includes/reset_seo_cache.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/fmarket/public_html/store/admin/categories.php on line 22

 

Warning: Cannot modify header information - headers already sent by (output started at /home/fmarket/public_html/store/admin/categories.php:22) in /home/fmarket/public_html/store/admin/includes/functions/general.php on line 18

 

 

-------------------------------------

 

It seems simple enough.... But i'm not sure what to do. I am using the "UltraPics v1.1, WYSIWYG HTML Editor" addon if this makes a difference.

 

 

Please help me out, its the only thing keeping me from completing this store.

 

 

Thanx in advance,

Zurv

Share this post


Link to post
Share on other sites

Chemo, if you're reading this, man thats gotta stink.

 

To everyone that is having the problem where it displays ?cpath=# for the product info page:

 

On mine, it actually breaks it and says no product found, others it seems to work but displays the unneeded ?cpath=# (like for the person that posted their website.

 

I did some hacking around the code, and figured out a real quick fix. Keep in mind, this is NOT FULLY TESTED and it probably breaks some other functionality... Now with that disclamer out of the way, here is the fix:

 

in the file catalog/includes/classes/seo.classes.php find the code starting on line 340:

   	 } elseif ( !$this->is_product_string($params) ) {
     $container[$p2[0]] = $p2[1];
  	 }

 

This is the code that is causing it to add the extra cpath at the end. So I commented it out, like so (so replace it with this code)

   	 } elseif ( !$this->is_product_string($params) ) {
     //$container[$p2[0]] = $p2[1];
  	 }

 

As you can see all I did was comment out that one line, it seems to work. I'm sure a better fix would be to find out what is causing it to go into this elseif statement and fix it. Since I am in a hurry right now, I could not investigate further to produce a better fix at this time.

 

I recomend not doing this fix if your site works with the extra cpath=# at the end, until someone comes up with a better fix that finds out why it is going into this loop in the first place.

 

btw I have ultimate image pack installed, that might ahve something to do with it.

 

I'm not getting the errors people are talking about so I don't know how to fix those.

 

Hope someone can take this and find a better fix, maybe if we are lucky it will be Chemo but from the sound of that post probably not soon. Later tonight or some time within the next week I'll try to better fix it (if someone else does not beat me to it) and post the fix here as well as on the contrib section. (no promises though :P )

 

Oh yeah, and as always, backup your files before doing this...

Share this post


Link to post
Share on other sites
another great contrib from Chemo, Congrats& thank you once again!

 

I have installed this contrib but run into the following error.

 

Fatal error: Call to a member function on a non-object in /home/kenstant/public_html/Products/includes/meta_tags.php on line 57

after everything seems to go finer on the install. Anyone have any idea what is causing this.?.

 

also anyone have an directions on how to uninstall completly till I can figure out what the issue is?

 

many thanks.

 

@ RocksIT, to quickly overcome the error. Do a Database recovery and upload your backup of the modified files. So I managed to bring up my shop again.

 

I have the same problem I tried the upgrade from Version 2.0b. I see that changes which where carried out in the native install of 2.0b are not carried out in 2.1

 

Files touched in 2.0b which appear not to be modified in 2.1 are:

 

3 changes in catalog/includes/application_top.php only 1 change in 2.1

 

catalog*/includes/functions/html_output.php depending on cache type in 2.0b variance in code only 1 change in 2.1

 

includes/modules/product_listing.php modification was carried out in 2.0b no modification in 2.1

 

From my point of view it appears that the upgrade from 2.0b is not described propperly. Currently trying to do some reverse engineering to get rid of 2.0b and start with the new 2.1 modifications.

 

If someone knows a quick hint for the line 57

 

here it is line 54 to 64 could it be that the cache handling changed?

################################################################################
#############
# Check to see what type of cache if any and run with it...
$cache_type == 1
  ? $meta_cache_code = $cache->get_cache($meta_cache_file)
  : NULL;
  
if ($meta_cache_code){ echo $meta_cache_code;
}else if ($cache_type == 2 && file_exists($meta_cache_file_full)) {
echo base64_decode(gzinflate(file_get_contents($meta_cache_file_full)));
}else{
ob_start();

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