Contributions
Ultimate SEO URLs
#################################
NOTE: Versions 2.1d and later of this contribution contained works under the "Open Public License" which is not compatible with the GNU General Public License and therefor had to be removed. Please check that further additions to this contribution package are LEGAL and are released under the GNU General Public License.
#################################
I am proud to announce the release of Ultimate SEO URLs for osCommerce-MS2.
This contribution builds on the cName & pName code to give an even more flexible, search engine friendly, and cross server compatible SEO URLs.
Once installed, Ultimate SEO URLs will give the store owner the choice of the v1.X style cName or new v2.X style static HTML file. This setting is incorporated into the admin control panel so can be toggled on, off, cName, or Rewrite at will.
This contribution will work for any store on any server. It is compatible with not only *NIX based servers but also Windows/IIS servers (although IIS is limited to cName).
In addition, this contribution is compatible with all other contributions by me including Page Cache (directions included in install package).
This release supports multiple languages, unlimited nested categories, and duplicates with ease.
Expand All / Collapse All
This package contains a small fix for the newsdesk contribution but is mainly meant as a place holder above the last upload to prevent all of the problems that one caused.
This is a full package.
The support thread is at
http://forums.oscommerce.com/topic/154166-contribution-ultimate-seo-urls-v21-by-chemo/
Polish pack with seo.class.php translated into polish (add all configuration options to database in polish language). If you don't want to have seo configuration in polish language do not use it.
Przetlumaczony plik seo.class.php dodaje wszystkie opcje konfiguracyjne do bazy danych w jezyku polskim. Pelna paczka. Polska instrukcja instalacji dostepna na stronie oscommerce2.pl
- Added code to redirect category child so it uses the full path, i.e., parent ID = 3, child ID = 4, url -c-4.html changes to -c-3_4.html
- Added code to redirect category id = 0 to home page and issue a 404 error
- Fixed problem that caused code to fail with oscommerce SEO urls ( /cPath/ID )
- Fixed on/off switch in admin. The first setting now turns off the whole module
- Removed unused variable
- Updated instructions regarding .htaccess file
- Updated instructions regarding upgrading from a previous version
This is a full package.
The support thread is at
http://forums.oscommerce.com/topic/154166-contribution-ultimate-seo-urls-v21-by-chemo/
Replaced the includes/classes/seo.class.php
This is a full package.
The support thread is at
http://forums.oscommerce.com/index.php?showtopic=154166
- Added check for updating configure settings to remove warnings
- Added url verification code - works for categories and products - rest is still to be done
- Added option to add cPath ID to url back in per several requests
- Fixed typo for the articles topic cache code
- Replaced eregi call in admin/categories.php
This is a full package.
The support thread is at
http://forums.oscommerce.com/index.php?showtopic=154166
Traduction de la contrib et guide d'installation en FR
Nécessite php5.2+
Support Français : http://www.oscommerce-fr.org/viewtopic.php?f=11&t=7
After you finish install SEO, some osc template maybe will redirect all link to index.php page when you click catalog & product.
You need check you header.php
and delete the similar code
"
print("<script type='text/javascript'>window.location='index.php';</script>");
"
Minor changes only to this stable version.
Upgrading just overwrite the seo.class.php
When setting cron jobs with this (google base etc) ensure to use wget.
If you have PHP5 I would recommend Ultimate Seo Urls 5 instead.
http://addons.oscommerce.com/info/6768
Unless you specifically require header tags code then this is the version I would recommend if you have to stay with series 2.
- Added in missing code that was accidentally deleted while updating the last version
- Corrected preg_match code
This is a full package.
The support thread is at
http://forums.oscommerce.com/index.php?showtopic=154166
- Added code for FAQDesk contribution
- Added code for NewsDesk contribution
- Added code for Pollbooth contribution
- Added option to turn performance code on and off to increase page load times
- Fixed coding error that affected manufacturers on some servers
- Fixed problem with product notifications
- Fixed problem with short name filter not working with category names on products
- Fixed caching problem for categories
- Fixed caching problem for products
- Fixed caching problem for Links Manager
- Fixed caching problem for Page Editor (http://addons.oscommerce.com/info/2841)
- Fixed various small coding problems
- Removed the code for caching All Products SEO since it wasn't necessary
- Replaced all ereg type calls with preg_ type
This is a full package.
The support thread is at
http://forums.oscommerce.com/index.php?showtopic=154166
*** PHP 5 users ***
If your server is running on PHP 5.2 I recommend Ultimate Seo Urls 5 / 5 PRO instead - a different, far more modern and capable contribution (producing the same seo urls if need be) with a seperate support topic.
http://forums.oscommerce.com/topic/336702-ultimate-seo-urls-5-by-fwr-media/
STABLE VERSIONS:
My 2.1d ORIGINAL updated is the current stable version, this version should take over that mantle as it is massively improved but needs validation by usage.
BEWARE OF BROKEN VERSIONS:
A particular example is 2-2.2d-5 which breaks the core cache/database funtionality
What's new:
A total rewrite of the same codebase cleaned out from top to bottom.
2400 lines of code reduced to just 1016 (this is with added functionality NOT less) for faster parsing + easier to read.
Propper validation added for ALL Seo Urls
404 page functionality added for inexistant products/categories etc.
Redundant database class removed.
Replicated osCommerce functions removed.
Improved logic on 301 redirects.
Stripped the unnecessary code from the cumbersome cache methods.
Added improved delete logic.
Includes ALL bug fixes from the stable 2.1d ORIGINAL updated version I created.
Complete tidying of the messy code, neat indentation etc. much easier to read. (code should be viewed with word wrap off).
Removed the cumbersome commenting written specifically for "phpDocumentor" - while I am a fan of this type of commenting it is best used in small file modular structures not huge files containing 2400 lines making the file impossible to read/follow.
- Added option to handle urls for All Products SEO
- Added a limit to the category name code to provide a small speed increase
- Fixed coding mistake in getting category name
- Changed pattern matching code to cover more possibilities and to handle hyphens
- Changed pattern matching code to use preg_replace instead of ereg_replace
- Changed code in admin/functions/general.php to clear cache when the uninstall options is used
This is a full package.
The support thread is at
http://forums.oscommerce.com/index.php?showtopic=154166
- Added an uninstall option to allow resetting the Ultimate SEO database entries to default
- Added code to handle Articles Manager authors
- Changed the add cPath to end option to add categories parent to products
- Changed add categories parent option so all categories are added
- Changed filter method so categories with spaces will display correctly
- Fixed mistake in code for information pages that prevented the name of the page from being seen.
The support thread is at
http://forums.oscommerce.com/index.php?showtopic=154166
English__________
Little code added in application_bottom.php to validate if $seo_urls is an object.
When SEO URL was to False in admin, stepped a Warning.
Español_________
Pequeño código añadido en application_bottom.php para validar si $seo_urls es un object.
Cuando SEO URL estaba a False en el admin, saltaba un Warning.
- Fixed automatic install code so it handles the updates correctly
- Added an option to use the title from Header Tags for the url
- Added fixed to allow code to work with all languages
- Fixed long standing problem with code for Links Manager cache
The support thread is at
http://forums.oscommerce.com/index.php?showtopic=154166
- Fixed code that would cause the deletion of configuration settings for other contributions.
- Fixed short words code.
- Fixed include category name code.
- Fixed changed url code (if name of the url doesn't match the actual name, it redirects).
This is a full package.
The support thread is at
http://forums.oscommerce.com/index.php?showtopic=154166
English_____________
-Added 2 functions in includes/classes/seo.class.php to disconnect MySQL
-Added a function's call in includes/application_bottom.php to disconnect MySQL's session of SEO_DataBase
We had problems with a shop with a lot of customers online without this functions
Español_____________
-Añadidas 2 funciones en includes/classes/seo.class.php para desconectar MySQL
-Añadida una llamada a una función en includes/application_bottom.php para desconectar la sesión MySQL creada por SEO_DataBase
Tuvimos problemas en una tienda con bastantes clientes online sin estas funciones
Instruction for Autoinstaller to set "safe URLs" to false was added. As I see people forget to do it.
The message "you should create an empty .htaccess file" was added to be shown if the .htaccess file doesn't exist.
If you start a new store on PHP5 I suggest you to use
ULTIMATE Seo Urls 5 (http://addons.oscommerce.com/info/6768)
because the Chemo's seo.class.php become old and not supported
The Auto Installer script requires PHP5 !
Few lines of code were added to list all the files that should have 777 permissions.
If you start a new store on PHP5 I suggest you to use
ULTIMATE Seo Urls 5 (http://addons.oscommerce.com/info/6768)
because the Chemo's seo.class.php become old and not supported
The Auto Installer script requires PHP5 !
The "insert into configuration" query was corrected for MySql 5.1.30
If you start a new store on php5 I suggest you to use
ULTIMATE Seo Urls 5 (http://addons.oscommerce.com/info/6768)
because the Chemo's seo.class.php become old and not supported
The extend.php file was modified to rely on catalog/includes/configure.php settings.
Download this package instead of the previous
The title of the autoinstaller script was corrected.
Download this package instead of previous.
This package contains:
Ultimate SEO URLs v2.7 - FullPackage by faaliyet (23 Mar 2009)
+ seo.class.php was modified.
The function do_redirect was changed to not pass GET parameters through htmlspecialchars()
+ few osCommerse forms were modified.
The "Product List Filter" and "Currencies" select were changed to not send cPath, products_id and manufacturers_id GET variables when Seo Urls is enabled.
+ uninstallation query was corrected.
The "delete from configuration ... " query was updated to delete only the SEO URLs contribution configuration entries.
+ after installation instructions were updated.
Solution by KathyK for the "Extra pages-info box w-admin" contribution was added. (posted on: Jan 25 2009, 04:24 AM on the "Ultimate SEO URLs v2.1 - by Chemo" forum)
+ Auto Installer 2.12 script
The Auto Installer script requires PHP5 !
This package contains:
Ultimate SEO URLs v2.7 - FullPackage by faaliyet (23 Mar 2009)
+ seo.class.php was modified.
The function do_redirect was changed to not pass GET parameters through htmlspecialchars()
+ few osCommerse forms were modified.
The "Product List Filter" and "Currencies" select were changed to not send cPath, products_id and manufacturers_id GET variables when Seo Urls is enabled.
+ Auto Installer 2.7 script
The Auto Installer script requires PHP5 !
The fix by miroI (29 Apr 2009) included
The purpose of 2.5 version is to fix Pektsekye's issue with the uninstall.xml write permissions.
This fix is very important because next install steps will ask you to set write permissions to several existing files and directories. After you set the write permissions and click retry if uninstall.xml is not writable autoinstaller will add the code again to the already changed existing files which makes syntax errors.
Added write permission warning if backup directory is not writable to prevent possible unwanted overwrite of your files. In the 2.4 version of this uninstaller if backup directory is not writable your files are not saved as backup as Pektsekye says in his readme file.
This package contains:
Ultimate SEO URLs v2.7 - FullPackage by faaliyet (23 Mar 2009)
+ seo.class.php was modified.
The function do_redirect was changed to not pass GET parameters through htmlspecialchars()
+ few osCommerse forms were modified.
The "Product List Filter" and "Currencies" select were changed to not send cPath, products_id and manufacturers_id GET variables when Seo Urls is enabled.
+ Auto Installer 2.4 script
The Auto Installer script requires PHP5 !
This package contains:
Ultimate SEO URLs v2.7 - FullPackage by faaliyet (23 Mar 2009)
+ BUY NOW Button Fix by amchstudios (1 Apr 2009)
+ Auto Installer 2.1 script
The Auto Installer script automatically install the contribution: copy files, edit files, alter database tables.
It saves a backup before any action.
The script automatically install the contribution: copy files, edit files, alter database tables.
It saves a backup before any action.
The aim of the script is to speed up the contribution installation.
And to make possible to uninstall it.
You will need to do manually only what the script cannot.
It was tested on hostgator.com host (PHP:5.2.4 MySQL 5.0.67) and osCommerce Online Merchant v2.2 RC2a
Here is a quick fix because in the latest versions the BUY NOW Button adds a amp character to the url and takes a user to an empty shopping cart. If you remove it it works fine.
I have tested the latest version by faaliyet added 23 Mar 2009 and everything else is working so with this addition package is safe!
ENJOY!
-Sorry, I just forget to add .htaccess file changes. Please use this package.
More information about Ultimate SEO URLs v2.7 look at my previous update.
Seyhun Cavus (faaliyet)
Ultimate SEO URLs v2.7 - FullPackage
-It's good idea to add manufacturer name to urls of products(update by shadowrider)
-A file of this version added for users of the contribution SID Killer.
-SEO Urls for "article authors"(by mazoerkam) added for the user of the contribution Article Manager.
-The update of avanser "UTF problem fixing" added.
-Canonical Urls are important for SEO. But Canonical URLs not added because:
"
I thought to add Canonical URLs to this contribution.
Firstly thought webshoptimizer's solution. But it adds some canonical urls and removes osCsid=xxxxxxxxxxxxxxxxxxxxxxxx from somepages, nothing else.
It's good to remove osCsid=xxxxxxxxxxxxxxxxxxxxxxxx from url but the contribution sid killer(http://www.oscommerce.com/community/contributions,952) is better for this job.
On the other side Jack's new version of Header Tags SEO (V 3.1.2) has a support for Canonical Urls.
And I can say it's better from webshoptimizer's solution (http://www.oscommerce.com/community/contributions,6578).
For Canonical URLs and more support on SEO for your shop:
Go to Header Tags SEO (http://www.oscommerce.com/community/contributions,5851) and install.
*Thanks to Jack for his great contributions and solutions.
More information about Canonical URLs :
http://www.mattcutts.com/blog/canonical-link-tag-video/
http://www.mattcutts.com/blog/canonical-link-tag/
"
This is a Full Package.
Seyhun Cavus (faaliyet)
I was experiencing problems with switching currencies while in product listing.
& was still there, included fix did not work for me.
So I made a little adjustment using bchecketts fix.
If You are experiencing this problem find in seo.class.php
$params = ( sizeof($params) > 1 ? implode('&', $params) : $params[0] );
$url = $this->href_link($this->uri_parsed['path'], $params, 'NONSSL', false);
After this add:
# BC Redirects shouldn't have '&'s in them
$url = preg_replace('/&/','&',$url);
And delete this two lines from the bottom of file.
Default package didn't work properly for me so I spent long day to find out how it works. This mod only adds manufacturer to product url, so if you had default:
yourshop.com/productname-p-1.html
you can have:
yourshop.com/manufacturer-productname-p-1.html
Based on this mod you can easily replace manufacturer to category name.
Feel free to change this code.
Enjoy!
The problem with ultimate SEO URL is that pages with different language can have the same URL :
http://www.yoursite.com/matrix-p-29.html (english version)
http://www.yoursite.com/matrix-p-29.html (french version)
which is confusing for a search engine and your site will not be indexed properly...
Basically this mod will add ?language=XX or &language=XX to all URL that have been modified with Ultimate SEO URL.
Now URL will become :
http://www.yoursite.com/matrix-p-29.html?language=en (english version)
http://www.yoursite.com/matrix-p-29.html?language=fr (french version)
Included file explains the modifications in seo.class.php
if you use utf-8 encodind, then you must replace in function function strip($string){}
strtolower($string) TO mb_convert_case($string, MB_CASE_LOWER, "utf-8") in file sea.class.php
no file, only fix
from the last SOE contribution
add article authors
http://namesite/articleauthors-au-1.html
only change 2 file..
SEO class and .htaccess
Ultimate SEO URLs v2.6 (FullPackage) - faaliyet
+ seo.class.php typo/bug fix - php4hosting
To download only 1 package, rather than trying to fix this error beast.
People who developed and contributed to this add "Ultimate SEO URLs" Thank you, helped me ... BRAZILLLLLLLLL 1st Place hehe ...
I changed the function parse_parameters() in seo.class.php in order to encode the url in the right format with urlencode().
Now if you use japanese or chinese letters, it will appear correctly in the link instead of weird signs.
Same for all the éàè ... letters.
recommended for anyone using UTF-8 in their catalog.
This updates contains the following changes:
- Changed code to prevent the mass deletion of any group in the database that ends in SEO. This is breaking other contribution.
- Added code from an earlier version so that it works with Links Manager
This is a full package.
The support thread is at
http://forums.oscommerce.com/index.php?showtopic=154166
It's a shame, but this great contribution is being ruined imo.
I attach this file not to add to the carnage but in the hope that it'll get people back to using Chemos ORIGINAL great script. To my knowledge this was the last version wholely worked on by Chemo.
Update: Mildy doctored seo.class.php otherwise standard.
Works with MySQL5 (Strict mode)
Works with PHP5
Added tep_output_string($_sid)
Update 7th Nov 2008:
The only issue remaining seemed to be where some servers reported PATH_INFO differently .. this is corrected in this package.
Errors removed when running in error_reporting E_ALL.
Included is the validation contribution which is optional not essential.
I took the file from an earlier entry and updated it with the new features; also added ?: to unused regular expression groups (for performances).
ATTENTION: NOT THOROUGHFULLY TESTED!
Im using Ultimate SEO v2.6 running on PHP5, MySql5.
And adding , [coma] on -pm-, im including package seo.class.php in here
I hope this is could be solved problem.
im sorry for my bad english..
There was a typo in the last package
includes/classes/seo.class.php
Line 624
'pages_id' => '-pm-'
Has a missing , should be
'pages_id' => '-pm-',
Version 2.6 News:
-Added Contribution "Google Duplicate Content Manager" of FWR_Media (great work by FWR_Media).
-Modified and added another seo.class.php file for "SID Killer" users.
*Contribution "SID Killer" is useful for Seo Urls. For more information follow the link
http://www.oscommerce.com/community/contributions,952
-Added "Extra pages-info box w/ admin" SUpport by faaliyet (and Bobby).
-Modified/corrected installation steps.
-Added: Upgrade Docs + History Logs.
-------------------------- What is "Google Duplicate Content Manager" ? --------------------------
**The previous packages have a problem about urls (at currencies, languages and pages by product listing)
For an example:
/my-great-product-c-47.html?page=2&sort=2a
/my-great-product-c-47.html?page=3&sort=3d
/my-great-product-c-47.html?language=en
/my-great-product-c-47.html?currency=GBP
This problem is fixed by FWR_Media's solution/contribution.
For more information about this contribution, look at the page: "http://www.oscommerce.com/community/contributions,6214"
--------------------------------------------------------------------------------------------------
------------------------------------ After Installation: ------------------------------------
To Notice: If you are contribution user of the
Header Tags SEO [or]
Header Tags Controller [or]
Meta information
You must apply steps of after_install.html page.
--------------------------------------------------------------------------------------------------
See the support thread for more details:
http://forums.oscommerce.com/index.php?showtopic=154166&st=3060
Ultimate Seo Urls v2.5 FullPackage:
Version News:
-Added seo urls for products attributes (by kokanut82@hotmail.com)
-Added new Lines into .htaccess file to block bad bots
-Changed .htaccess file
-Added FAQDesk Support
-Added another seo.class.php file for "SID Killer" users
*Contribution "SID Killer" is useful for Seo Urls. For more information follow the link
http://www.oscommerce.com/community/contributions,952
-Full Upgraded/Added Previous Updates/Fixes
-Modified/corrected installation steps
(upgraded steps from 8 steps to 10 steps)
(added information for supported contributions and history)
(changed Support Thread link)
See the support thread for more details:
http://forums.oscommerce.com/index.php?showtopic=130999&st=1820
***Now Supported !!!
-"Block Bad Bots" Support by faaliyet (15 Aug 2008)
-"FAQDesk(for v1.49)" Support by faaliyet (15 Aug 2008)
-"NewsDesk" and "Poll Booth" Support by lavoriamopervoi (7 Jul 2008)
-"Information Pages Unlimited" Support by Chemo and luckyno (16 Feb 2008)
-"Product Attributes"(on shopping_cart.php, product_info.php pages) Support by kokanut82@hotmail.com (15 May 2008)
-"Links Manager II"(http://www.oscommerce.com/community/contributions,5272) Support by Jack_mcs (5 Oct 2007)
-Supported Contributions Links -
-Links Manager II - http://www.oscommerce.com/community/contributions,5272
-Extra pages-info box w/ admin - http://www.oscommerce.com/community/contributions,202
-Information Pages Unlimited - http://www.oscommerce.com/community/contributions,1026
-NewsDesk - http://www.oscommerce.com/community/contributions,934
-Poll Booth - http://www.oscommerce.com/community/contributions,20
-FAQDesk - http://www.oscommerce.com/community/contributions,1106
-Article Manager - http://www.oscommerce.com/community/contributions,1709
History:
_And Special Thanks to Chemo for this Great Contribution_
-"Information Pages Unlimited" Support by "Chemo" (creator of contirbution) and "luckyno"
-"Product Reviews"Support by "Chemo" (creator of contribution)
-"Popup Images" Support by "Chemo" (creator of contirbution)
-"Manufacturers , Categories , Products" Support by "Chemo" (creator of contirbution)
-"Article Manager" Support by "Chemo" (creator of contribution)
This is FullPackage.
Ultimate SEO URLs v2.4
The last package for this contribution.
-Added all fixes and updates.
faaliyet
Added to Seo Urls:
pollbooth.php
newsdesk_index.php
newsdesk_info.php
newsdesk_reviews_info.php
newsdesk_reviews_article.php
file changed:
includes/classes/seo.class.php
.htaccess
No all packpage
only file changed
Related to the below update regarding URL redirection, you could also make the change in /includes/functions/html_output.php to not output the OSC session id on the first page. I've tested this and there are no issues when this is done. The url that was beign redirected to with this "bug" was similar to:
-c-16?osCsid.html
Note that it put the ?osCsid before the .html.
Change:
function tep_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true) {
to:
function tep_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = false, $search_engine_safe = true) {
See that I changed $add_session_id to false. That's it.
while I was listing products on ultimate seo contribution, I realize that the link for the following pages doesn't work.
Instead of searching for the bug I search on internet and find the solution quickly.
Example links:
.html?page=2&sort=2a ----> replace to that, in link it was up to html. ?page=2&sort=2a and similar things on the link were not working.
index.php?manufacturers_id=14&sort=2a&page=2
For those who have the same problem as me: ;
In seo.class.php, (at lines 1060 and 1061)
Find This Lines:
header("HTTP/1.0 301 Moved Permanently"); //let the SE's know to not use this link
header("Location: $link"); //redirect to the real page
And Replace With:
// header("HTTP/1.0 301 Moved Permanently"); //let the SE's know to not use this link
// header("Location: $link"); //redirect to the real page
That's All (No file).
Ultimate SEO URLs Version 2.1e
This is the entire package, with Update Instructions included.
What's changed in this version?
Fixed: Ugly URLs in the Shopping Cart
Description of the Problem:
Products with Attributes appear in your cart as "product_info.php?products_id=5{1}10{2}20{3}30".INSTEAD of the SEO url!
This problem might appear elsewhere, too (eg. Reviews, Add to Cart).
The attributes are the numbers that appear after the first {curly brace}.
This fix will turn urls with attributes into: "product-name-p-5.html?options={1}10{2}20{3}30" so that users do not see the ugly urls in their shopping carts.
Current Version: 2.1e
Derived from: "2.1d ORIGINAL updated"
Updated to support newer version of Informationpages unlimited.
Minor changes to SQL names in seo.class.php
I attach this file not to add to the carnage but in the hope that it'll get people back to using Chemos ORIGINAL great script. To my knowledge this was the last version wholely worked on by Chemo.
Update: Mildy doctored seo.class.php otherwise standard.
Works with MySQL5 (Strict mode)
Works with PHP5
Added tep_output_string($_sid)
Included is the validation contribution which is optional not essential.
Reloaded version with fix for the last versions of Information Pages applied.
Users of information pages unlimited using the newer version or using older version, please see:
http://www.yoja.nl/kb/index.php/Oscommerce_ultimate_seo_urls_-i-1.html_and_-c-1.html_fixes
This package includes Ultimate SEO URLs 2.2.2e, .htaccess patch by dp.ramone, and 3chaitanya bugfix. This a full package with corrected install instructions.
Bugfix from umarov_t is not included because it isn't for this version.
PLEASE UPLOAD ONLY FULL PACKAGES!
Have you seen easypopulate contribution page? Have you found the right working version? No? So Upload ONLY Full Packages!
redirects to same Product info page.
In /catalog/includes/classes/seo.class.php
Under function ValidateName
Find:
if ((strpos($parts[count($parts) - 2], $type)) !== FALSE)
Replace with:
if ($parts[count($parts) - 2] == $type)
This package includes Ultimate SEO URLs 2.2.2e, .htaccess patch by dp.ramone, and pre-edited files. There are no other patches included in this package. I put this together to help out the novice and save some time.
This saves you from having to make all the changes yourself. If you have made changes to any of the following files, this package is not for you:
includes/application_top.php
includes/functions/html_output.php
admin/categories.php
admin/includes/functions/general.php
.htaccess
Just upload the /catalog/ directory to your store and enjoy. The /catalog/ directory in this package has the required SEO files already in place.
If your store is not located in /catalog/, please be sure to update the .htaccess file in the /catalog/ directory with the path to your store.
The link manager code in seo.class.php is ok, but to work correctly requires an additional rewrite rule in .htaccess that is missing from the documentation.
Not a full package.
This patch add the parent category name before the product name in URL, to get url path as http://mystore.com/games-strategy-disciples-sacred-lands-p-24.html
This is not for everybody. But if you're getting URL's for your categories like this:
http;//www.yoursite.com/-c-2.html
instead of:
http://www.yoursite.com/categoryname_keyword-c-2.html
Then your version of mysql needs a new seo.class.php.
Just upload it to your (catalog)/includes/classes/ folder and your categories names will again appear!
This file contains only the seo.class.php file, and nothing else, so this is not the complete contribution -- this fix only for those who had the problem mentioned above.
Find
$sql = "SELECT cd.categories_seo_url, c.categories_id, c.parent_id, cd.categories_name as cName,
cd2.categories_name as pName
FROM ".TABLE_CATEGORIES." c,
".TABLE_CATEGORIES_DESCRIPTION." cd
LEFT JOIN ".TABLE_CATEGORIES_DESCRIPTION." cd2
ON c.parent_id=cd2.categories_id AND
cd2.language_id='".(int)$this->languages_id."'
WHERE c.categories_id='".(int)$single_cID."'
AND cd.categories_id='".(int)$single_cID."'
AND cd.language_id='".(int)$this->languages_id."'
LIMIT 1";
Change it to:
$sql = "SELECT cd.categories_seo_url, c.categories_id, c.parent_id, cd.categories_name AS cName, cd2.categories_name AS pName
FROM ".TABLE_CATEGORIES." c
INNER JOIN ".TABLE_CATEGORIES_DESCRIPTION." cd ON cd.categories_id = '".(int)$single_cID."'
AND cd.language_id='".(int)$this->languages_id."'
LEFT JOIN ".TABLE_CATEGORIES_DESCRIPTION." cd2 ON c.parent_id = cd2.categories_id
AND cd2.language_id = '".(int)$this->languages_id."'
WHERE c.categories_id = '".(int)$single_cID."'
LIMIT 1";
Admin
http://www.oscommerce-packages.com
Scope: Bug in Ultimate SEO 2-2.2e.
I am not sure if it exists or added in this version.
Bug description: When one clicks to check review page by clicking review link on product_info page, it
redirects to same Product info page.
In /catalog/includes/classes/seo.class.php
Under function ValidateName
Find:
if ((strpos($parts[count($parts) - 2], $type)) !== FALSE)
Replace with:
if ($parts[count($parts) - 2] == $type)
This is the last full version, that I know of by Chemo. It contains the following changes:
- added code to handle Links Manager links (not my code)
- added code to fix problem with invalid names in the url's.
This is a full package but is based on the version mentioned above. It does not contain all of the changes everyone is making. The only file that was changed is the classes/seo_class.php so you can compare that to your file if you want to have these options. See the support thread for more details:
http://forums.oscommerce.com/index.php?showtopic=130999&st=1440
This is full package of Ultimate SEO URLs - 2.1d (29 Aug 2007) with all fixes, by Cpedit , with support of russian (cyrillic) names of products, categories etc. All cyrilic characters converting to latin. Shoud work with any cyrillic language, just check substitution arrays in /catalog/includes/classes/seo.class.php (search for string "$trdic = array" in the code, there are 7 entrys of this string).
1] Problem found when a product has been added to the shopping cart, the cart remains empty.
line 653 :
MODIFY >> return htmlspecialchars (utf8_encode ($link));
IN >> return htmlentities (utf8_encode ($link), ENT_QUOTES);
2] Modify INSTALL instructions
Bug SQL line 976 :
MODIFY >> JOIN ".TABLE_CATEGORIES_DESCRIPTION." cd
ON >> LEFT JOIN ".TABLE_CATEGORIES_DESCRIPTION." cd
Original Package : Ultimate SEO URLs - 2.1d (25/11/2006) with all fix.
Can somebody please make a full package of this great contribution
The option "Add category parent to begining of URLs?" resulted in adding always the parents name and not the value of the seo field of the parent category if available.
this is fixed in the attached seo.class.php. The class is based on Ultimate SEO URLs Contribution - osCommerce MS-2.2 and simply has to be put in the includes/classes directory. Find a description of the changes included to the zip archive.
All the best
benjamin
My last post was a bit premature.
Here is the actual dutch language files for Ultimate SEO URLs.
This modest contribution enables you to view the SEO Admin panel in Dutch.
This version is a modification on the one uploaded by Glcustoms on 8 Jul 2007.
It fixes the missing table fields products_seo_url and categories_seo_url.
At installation time, their existence is checked. They are added, just in case they are not found.
For those that use page manager 1.7 & up :
http://www.oscommerce.com/community/contributions,2021/category,all/search,pages_html_t
ext
Here is the code to make your urls work with that. Just overwrite seo.class php
and in htaccess find:
RewriteRule ^(.*)-i-([0-9]+).html$ information.php?info_id=$2&%{QUERY_STRING}
change to:
RewriteRule ^(.*)-pm-([0-9]+).html$ info_pages.php?pages_id=$2&%{QUERY_STRING}
TO DO:
Make links in infobox show as html, as of now only the url is showing as HTML.
I've overlooked one SQL statement for the cache further down in the SEO class.
Here'e a link to the complete fix (thanks to CraXyOW3 for posting it to the forum's SEO URL thread):
http://www.yoja.nl/kb/index.php/Oscommerce_ultimate_seo_urls_-i-1.html_and_-c-1.html_fixes
Or download the attached seo.class.php file if you prefer.
More recent versions of IPU (info pages unlimited) have changed the field names of the information table resulting in SEO URLs such as http://www.your-store.com/-i-8.html
In order to fix this you have to make two minor changes to the sql query in seo.class.php betweenlines 1144 to 1148 like so:
$sql = "SELECT information_title as iName
FROM ".TABLE_INFORMATION."
WHERE information_id='".(int)$iID."'
AND language_id='".(int)$this->languages_id."'
LIMIT 1";
I've uploaded only the seo.class.php file for those who don't want to manually change the sql statement.
Sorry to embarass those who were expecting a full package.
With so many updates and bug fixes, any chance of someone releaseing a full working updated fixed version in a full package?
Best SEO contribution our.
when using Ultimate SEO URLs contribution , account creation page gives error, this small code change FIXes this big poblem
in includes/functions/database.php
find tep_db_insert_id function near 110
and replace function to:
function tep_db_insert_id( $link = 'db_link') {
global $$link;
return mysql_insert_id($$link);
}
thats all.. you can create account if you live this problem wth seo url
If you install Ultimate SEO URLs for the first time, run the following MySQL-query in your osC database:
ALTER TABLE `categories_description` ADD `categories_seo_url` VARCHAR( 100 ) NOT NULL ;
ALTER TABLE `products_description` ADD `products_seo_url` VARCHAR( 100 ) NOT NULL ;
( otherwise in the admin-catalog area you may get error: 1054 - Unknown column 'cd.categories_seo_url' in 'field list' )
There should be an exit after 301 redirect.
header("HTTP/1.0 301 Moved Permanently");
header("Location: $url"); // redirect...bye bye
exit;
break;
TIPS
-----
seo.class.php start with "<?"
change it by "<?php"
Maybe it can help you
look at your logs from apache and php, they can help you
Be careful with ".htaccess" file, specially with "RewriteBase" line. Because it can be :
- RewriteBase /
- RewriteBase /catalog/
- RewriteBase /MyStore/
- etc
for cookies look at :
http://forums.oscommerce.com/index.php?showtopic=137940&st=0&gopid=940437&#entry940437
Use the forum
Good luck
Here is part of the lighttpd config used to rewrite SEO URLs to internal addresses. Adapted from .htaccess mod_rewrite rules included in 2.1d package.
Now that we have a new release of Ultimate SEO with customs url's, the prior fix for the seo.class.php file for mysql5 is now out of date. I have updated this.
This is not a full contribution.
if you're getting an error "memory exhausted", while script memory consumption is much lower
than memory limit and you have many products in your store (more than 10000 estimated). It happens rarely and not on all servers. Don't know on what server setting it relies, but here is the fix, helped in my case. This package contains fix only.
Fix applied to application_top.php file code.
Thanks to Nelus.
Full Package Here.
Now includes the ability to create your own Product and Category URLs.
a) Product examples:
www.domain.com/product-name-p-32.html
www.domain.com/product-name-extra-text-p-32.html
www.domain.com/my-text-p-32.html
b) Category examples:
www.domain.com/category-name-c-44.html
www.domain.com/category-name-extra-text-c-44.html
www.domain.com/my-text-c-44.html
If you do not set your own url then the url reverts back to being dynamically created.
------
As per 2.1d release - this is released under GNU General Public License.
The documentation (not the code) on the previous uploads (2.1d and anything built on that code base) was covered under Open Public License.
Bobby Easland (Chemo) has agreed to allow the full contribution to be released under GNU General Public License - code and documentation. This is applicable to 2.1d as versions previous to this were already released that way.
The Open Public License has been removed from this upload.
Thanks goes to Bobby Easland.
This is not for everybody. But if you're getting URL's for your categories like this:
http;//www.yoursite.com/-c-2.html
instead of:
http://www.yoursite.com/categoryname_keyword-c-2.html
Then your version of mysql needs a new seo.class.php. And guess what? Here it is!
Just upload it to your (catalog)/includes/classes/ folder and your categories/keywords will once again appear!
This file contains only the seo.class.php file, and nothing else, so this is not the complete contribution -- it's merely a fix for those who had the problem mentioned above.
SEO doesn't work on sub-articles when using the rewrite method in 2.1
# Added to fix article glitch on sub-articles (lonniew at gmail dot com)
RewriteRule ^(.*)-t-([0-9]+_[0-9]+).html$ articles.php?tPath=$2&%{QUERY_STRING}
Building redirection links was leading into problems when using additional parameters.
[CHANGED]
removed the usage of 'htmlspecialchars' from the function href_link() and stock_href_link() . This was causing the issue and I do not see any need for this function here, and if it must be included it should be implemented as a switchable option in order to be aligned with the standard of the other functions within the same Class.
Cheers,
Tony Tromp
I had a problem with SEO enabled whereby, having viewed a manufacturers products using the manufacturers drop down in the manufacturers infobox and then choosing the 'Please select' in the dropdown, a page not found error would occur. The fix appears below:
Cheers - moosey_jude
In file catalog/includes/classes/seo.class.php
Find (about line 820-830 depending on other fixes applied):
case 'manufacturers_id':
switch(true){
case ($page == FILENAME_DEFAULT && !$this->is_cPath_string($params) && !$this->is_product_string($params) ):
and change to:
case 'manufacturers_id':
switch(true){
case ($page == FILENAME_DEFAULT && !$this->is_cPath_string($params) && !$this->is_product_string($params) && strlen($this->get_manufacturer_name($p2[1]))>0 ) :
When redirecting to the rewritten url, it may contain & strings, which are only valid for the html page, not for a redirect.
For example, http://www.mysite.com/catalog/some-item-c-49_23.html?sort=4&page=2
should be
http://www.mysite.com/catalog/some-item-c-49_23.html?sort=4&page=2
the '&' character is valid when it is displayed on a page because the browser intreprets it correctly. However when it is used in a redirect, the browser doesn't intrepret the '&' into just '&', so it shows up incorrectly in the url
Added these two lines to includes/classes/seo.class.php line #1890
# BC Redirects shouldn't have '&'s in them
$url = preg_replace('/&/','&',$url);
This is an awesome contribution! But, when it's turned off in the admin console the website stops working. This update fixes the problem. I just wrapped the original code & chemo's code in an 'if' statement. Two files must be updated:
includes/application_top.php
includes/functions/html_output.php
This is for v2.1c
-Randelia
This maintenance release fixes 1 bug (for STS stores) and adds compatibility with 2 external contributions.
BUG FIX
==============================
1) Some stores with STS installled were reporting an error like the following:
Fatal error: Call to a member function on a non-object in /path/to/html_output.php on line xx
This release uses better and more redundant logic for initializing the class.
CONTRIBUTION COMPATABILITY
==============================
1) Page Cache is now fully compatible natively. No special or alternate code to install. Follow normal upgade directions.
2) STS is now fully compatible natively. No special or alternate code to install. Follow normal upgrade directions.
KNOWN ISSUES
==============
1) Redirect code needs better logic for PHP CGI mode servers. SAPI module is fully supported.
DOCUMENTATION
==============
Upgrade directions are in the documentation
NOTE TO THE DEVELOPERS
==============
The code is THOROUGHLY documented...don't be shy...get in there and start tweaking the code! :-)
Enjoy!
Bobby
This maintenance release corrects several small bugs and adds 2 new options.
OPTIONS
==============
1) Ability to choose the option of appending the cPath parameter to the end of product info URLs (some-product-p-1-html?cPath=xx).
2) Ability to choose if parent category is included in category URLs (parent-cateogory-current-ctegory-c-1.html).
Both of these settings are able to be toggled through the admin control panel.
BUG FIXES
==============
1) Corrected code for attribute check (regex)
2) Corrected install directions
KNOWN ISSUES
==============
1) Class is not compatible with page_cache contribution. Plans are to offer support in the next release.
DOCUMENTATION
==============
Upgrade directions are in the documentation
NOTE TO THE DEVELOPERS
==============
The code is THOROUGHLY documented...don't be shy...get in there and start tweaking the code! :-)
Enjoy!
Bobby
This release introduces a completely recoded contribution designed from the ground up to be high performance in all respects.
The code has been abstracted so as to be used on the admin side for feeds. In addition, it has been optimized for speed and the absolute lowest server load possible.
The automatic 301 header redirect script has been integrated and is now native to the base class. To use the new functionality it is as easy as an admin control panel switch.
The performance cache engine has been retooled and offers many features such as the ability to choose to use the cache for one, all, or any combination of functional areas (products, categories, etc).
There is now better support for international or multi-lingual stores with the introduction of several new options.
Lastly, more areas are supported with SEO URLs. This release offers the ability to generate SEO URLs for the following:
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
==============
# DOCUMENTATION #
==============
This release also marks my intent on increasing the overall quality of the documentation for my contrbutions. Be sure to give me some feedback on the format and level of completeness.
Enjoy the 2.1 release...the v3.X series is already under development :-)
Bobby
This is the beta-3 release of the automatic redirect script. This corrects a bug and forming redirect URLs from the shopping cart.
INSTALLATION
============
Read the file...it is contained within the script. Very easy installation. Upload the file and add one line of code to application_top.php
NOTES
======
Please test this thoroughly and report any bugs in the support thread.
This is the beta-2 release of the automatic redirect script. The code has been completely reworked from the ground up.
INSTALLATION
============
Read the file...it is contained within the script. Very easy installation. Upload the file and add one line of code to application_top.php
NOTES
======
Please test this thoroughly and report any bugs in the support thread.
Bobby
This is a one file patch to address the issue of URLs that are indexed with search engines and should be redirected.
HOW THIS PATCH WORKS
====================
This patch automatically detects which old URL was used (regular stock osC, SEF URLs, or even cName) and sends a 301 moved permanently redirect to the proper page.
NOTES
====================
This is beta code. I have tested this patch thoroughly but there is no way for me to catch every possible scenario. If you experience difficulties or errors please post in the support thread.
Bobby
This is a full release package with additional directions for those store owners that:
1) Are upgrading from version 1.4
or
2) Have a CRE Loaded store
====================================
RELEASE NOTES:
If you have less than version 1.4 installed you are encouraged to upgrade FRIST to 1.4 then to version 2.0
This release is bundled with the new osC Advanced Cache Class. This moves the cache off the filesystem and into the database.
Why store cache in the database? Well, there were some store owners that had trouble with setting up a cache directory and also getting the permissions correct. This is an elegant solution to those problems since there is no need to enter any path or setup any directory with the right permissions. Also, the cache class will serve as the backbone of my future releases (osC Advanced Templating Engine, osC Search Engine / Spider, more performance enhancements, etc).
===========
= BUG FIXES =
===========
1) Fixed logic problem on admin side with resetting cache. Change is located in admin/categories.php
========
= NOTES =
========
This is a full package release and is bundled (files and directions) with the osC Advanced Cache Class. As such, I wanted to move the support to a new thread to keep the versions separate. If you have a support request please post it in the Ultimate SEO URLs v2.0 thread.
Enjoy!
Bobby
This release corrects a bug in the filter short words option.
SYMPTOM: if the category / product name is completely filtered out (i.e. - all words are less than the short words limit) then it would give an error about bad arguments in the implode function.
FIX: check to see if the entire string was filtered and if so pass the original string
This release adds the option of filtering short words from the URLs. Admin control panel setting allows filter word length to be configured conveniently.
Also, fixed a small issue of admin delete cache file compatibility on certain FreeBSD servers.
This release corrects 2 bugs:
1) "buy now" button did not return to the correct category and gave a product not found message
2) "buy now" column would have the same products_id for every product on the page with cName option
Also, update install directions page and gave WebPixie and Fred Doherty credit for additions.
Ok, I think I have this documented ok.
It adds manufacturers to the mod, so they will be
http://yourdomain.com/sony-products-m-49.html
just like products and categories. I did this for my site and it's working fine, hopefully I didn't miss anything when I pulled it out of my script. I DID NOT add the manufacturers code into the page cache user's code as I do not use it and didn't want to break anything. Please BACKUP your files, if I missed anything I can't be responsible.
Basic changes are in .htaccess, html_output.php code, application_top.php code, and seo-cache.php. Also, make sure you clear your seo-cache after adding it so it will add the manufacturers too.
Fixed a missing instruction for the upgrade from Cname and created an instruction guide just for upgraders. Everything else is as the previous contibution file.
I am proud to announce the release of Ultimate SEO URLs for osCommerce-MS2.
This contribution builds on the cName & pName code to give an even more flexible, search engine friendly, and cross server compatible SEO URLs.
Once installed, Ultimate SEO URLs will give the store owner the choice of the v1.X style cName or new v2.X style static HTML file. This setting is incorporated into the admin control panel so can be toggled on, off, cName, or Rewrite at will.
This contribution will work for any store on any server. It is compatible with not only *NIX based servers but also Windows/IIS servers (although IIS is limited to cName).
In addition, this contribution is compatible with all other contributions by me including Page Cache (directions included in install package).
This release supports multiple languages, unlimited nested categories, and duplicates with ease.
Note: Contributions are used at own risk.