Jump to content



Photo
* * * * - 10 votes

ULTIMATE Seo Urls 5 - by FWR Media


  • Please log in to reply
4280 replies to this topic

#1   FWR Media

FWR Media
  • Members
  • 6,839 posts
  • Real Name:Robert Fisher
  • Gender:Male
  • Location:Stowmarket - Suffolk - UK

Posted 21 May 2009 - 15:10

ULTIMATE Seo Urls 5
by FWR Media

New - Modern - More Efficient - Faster - Compatible - Less Queries

Author: Robert Fisher - www.fwrmedia.co.uk
Thanks to the beta testers:
Tom Hodges-Hoyland, Jan Zonjee, toyicebear, GLCustoms

Requirements:
Server: *nix or Windows/IIS

PHP requirements:
Version: 5.2.0+ (actually 5.1.3+ I believe at time of launch)
Zlib
filter_var
SPL (Standard PHP Library)

Traditional Rewrite URIs require:
*nix server (Windows/IIS does not have mod_rewrite)
mod_rewrite (as part of the apache build)
AllowOveride All (php.ini setting)

Compatibility:
MySQL 5 (Strict Trans Tables)
Traditional rewrite uris (*nix) produce exactly the same uris as the old 2 series (assuming the same settings)
The above means that should you upgrade from 2 series you don't have to worry about changed links

Installation difficulty:

There are only eight small changes to just seven files so this is easy and quick. (2 minute "drop on top" install for devs/testers)
Simple database installer.

Upgrade from old series 2 seo urls:
Upgrade instructions included.
Removal script for old database entries.
Simple database installer.

New:
Works on Windows/IIS (BETA at time of launch due to lack of extensive testing)
Two seo uri choices .. standard and rewrite .. Windows/IIS can only use standard
error free - error_reporting(E_ALL | E_STRICT)
Modular design
Plug in modules for contributions
Simple database installer
Inbuilt uri validation
301 redirects
Custom 404 Page not found
Zero queries or database use after cache fully loaded
Cache saving is sequential rather than one big DB hit
Admin selectable debug output
File (array) based character conversion (BETA at time of launch)
Simple cache life in admin based on "cache days"
Extensive security measures to safeguard the querystring
Series 2 database removal tool
Ability to switch between uri types via admin without changing any code as below:
On: standard seo uris - rewrite seo uris
Off: standard osC uris - experimental search engine safe uris

Included Modules:
Products
Categories
Manufacturers
Popup image

Included contribution modules (ALPHA at time of release as untested):
Information Pages
Articles, Article Info
Links
Newsdesk Index, Newsdesk Info, Newsdesk Reviews Info, Newsdesk Reviews Article

Features Removed (from old 2 series):
Page cache compatibility - the original author suggests that this should not be installed.

The contribution can be found at: -

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

#2   FWR Media

FWR Media
  • Members
  • 6,839 posts
  • Real Name:Robert Fisher
  • Gender:Male
  • Location:Stowmarket - Suffolk - UK

Posted 21 May 2009 - 17:51

Now that it is finally up a few notes.

The new BETA character replace system:
Although you can still use the old character replace system in admin .. if you put a language file in the folder "character_conversion" naming it the same as your main langauge file e.g. danish.php, espanol.php etc etc this file will override the admin settings when that language has been chosen. These files hold an array of character conversions.

I have tried to add some special characters in the files but many have corrupted so you'll have to do this yourself. It was pointed out to me by Pektsekye (thanks) that my Russian file was probably nearer to Swahili :D

Contribution addon modules:
All of these have been written with due care but with no testing .. I just haven't had the time to load up all these contributions so we'll have to deal with any issues if and when they arise.

Windows/IIS BETA:
Exciting this but has only been tested on a single IIS server so will have to wait on your feedback.

Any issues please let me know and I'll solve them as quickly as I can .. any feature requests please use the contribution development post http://forums.oscomm...howtopic=335433

Edited by FWR Media, 21 May 2009 - 17:52.


#3   FWR Media

FWR Media
  • Members
  • 6,839 posts
  • Real Name:Robert Fisher
  • Gender:Male
  • Location:Stowmarket - Suffolk - UK

Posted 22 May 2009 - 11:07

New upload

Update from revision 50 to 59:

A couple of initial minor issues were found (thanks Debs)

Updating to this revision is simple and can be found in the folder usu5_updates/r50_to_r59.txt

Changelog:
1) Fixed issue where on occasion the Seo Urls 5 class was not instantiated in application_top.php
2) Fixed issue where iterating directories pulled out bad files (like frontpage files)
3) Contribution Information Pages now tested and working
4) Contribution articles corrected and can now deal with paths with underscores
Other general tidying

#4   FWR Media

FWR Media
  • Members
  • 6,839 posts
  • Real Name:Robert Fisher
  • Gender:Male
  • Location:Stowmarket - Suffolk - UK

Posted 22 May 2009 - 13:39

Small omission found in the database installer.

Run in phpMyAdmin

UPDATE `configuration` SET use_function = 'tep_reset_cache_data_seo_urls'
WHERE `configuration_key` = 'SEO_URLS_CACHE_RESET';


#5   Debs

Debs
  • Members
  • 133 posts
  • Real Name:Debs
  • Gender:Female
  • Location:Fargo, ND UNITED STATES

Posted 22 May 2009 - 14:56

What a well supported contribution to have such a quick update.

I am now eagerly ready to install

One step that may cause someone an issue...
I am using osCommerce Online Merchant v2.2 RC2a
in step #3 (in Upgrade from old Series )

My catalog/includes/functions/general.php (I'll include the function in question below)
and instructions to find:

////
// Redirect to another page or site
function tep_redirect($url) {
if ( (strstr($url, "\n") != false) || (strstr($url, "\r") != false) ) {
etc. etc. etc................

/////////////////////////////////////////////////////////////////////////////////

Notice below (my function in v2.2 RC2a) the extra line just above the function. It may be questionable to remove it because it is below the comments to be found

////
// Redirect to another page or site
if (!defined('NO_REDIRECT')) { <-------------------------------------------------------------------
function tep_redirect($url) {
if ( (strstr($url, "\n") != false) || (strstr($url, "\r") != false) ) {
tep_redirect(tep_href_link(FILENAME_DEFAULT, '', 'NONSSL', false));
}

if ( (ENABLE_SSL == true) && (getenv('HTTPS') == 'on') ) { // We are loading an SSL page
if (substr($url, 0, strlen(HTTP_SERVER)) == HTTP_SERVER) { // NONSSL url
$url = HTTPS_SERVER . substr($url, strlen(HTTP_SERVER)); // Change it to SSL
}
}

header('Location: ' . $url);

tep_exit();
}
}

What gets replaced? Just the function starting below: "if (!defined('NO_REDIRECT')) {"

I myself would initially just replace the function but try both ways and test for issues. Is the correct way to replace the block starting under the comments, or to rather replace mearly the function ignoring the starting comments.
I will finish my install now and test while hoping for advice to this as well.
Thank you again

#6   FWR Media

FWR Media
  • Members
  • 6,839 posts
  • Real Name:Robert Fisher
  • Gender:Male
  • Location:Stowmarket - Suffolk - UK

Posted 22 May 2009 - 15:11

What a well supported contribution to have such a quick update.

I am now eagerly ready to install

One step that may cause someone an issue...
I am using osCommerce Online Merchant v2.2 RC2a
in step #3 (in Upgrade from old Series )

My catalog/includes/functions/general.php (I'll include the function in question below)
and instructions to find:

////
// Redirect to another page or site
function tep_redirect($url) {
if ( (strstr($url, "\n") != false) || (strstr($url, "\r") != false) ) {
etc. etc. etc................

/////////////////////////////////////////////////////////////////////////////////

Notice below (my function in v2.2 RC2a) the extra line just above the function. It may be questionable to remove it because it is below the comments to be found

////
// Redirect to another page or site
if (!defined('NO_REDIRECT')) { <-------------------------------------------------------------------
function tep_redirect($url) {
if ( (strstr($url, "\n") != false) || (strstr($url, "\r") != false) ) {
tep_redirect(tep_href_link(FILENAME_DEFAULT, '', 'NONSSL', false));
}

if ( (ENABLE_SSL == true) && (getenv('HTTPS') == 'on') ) { // We are loading an SSL page
if (substr($url, 0, strlen(HTTP_SERVER)) == HTTP_SERVER) { // NONSSL url
$url = HTTPS_SERVER . substr($url, strlen(HTTP_SERVER)); // Change it to SSL
}
}

header('Location: ' . $url);

tep_exit();
}
}

What gets replaced? Just the function starting below: "if (!defined('NO_REDIRECT')) {"

I myself would initially just replace the function but try both ways and test for issues. Is the correct way to replace the block starting under the comments, or to rather replace mearly the function ignoring the starting comments.
I will finish my install now and test while hoping for advice to this as well.
Thank you again


That is non standard .. RC2a does not have such a thing.

I cannot advise on such a thing as I don't even know why it is there.

It is also a very dangerous bit of code .. most uses of tep_redirect() do not have the exit() as required by header redirects because it is included within the function. This code could kill the redirect and the script could fall through to parts of files it just shouldn't be reaching.

Edited by FWR Media, 22 May 2009 - 15:16.


#7   Debs

Debs
  • Members
  • 133 posts
  • Real Name:Debs
  • Gender:Female
  • Location:Fargo, ND UNITED STATES

Posted 22 May 2009 - 15:33

I guess I should have checked first to see if my includes/functions/general.php was different then standard.
I did not mean to add complications by bringing up that unrelated issue.

That aside.
Now I must say I LOVE this new contribution! A-M-A-Z-I-N-G

The install was soooo quick and easy!

I can feel the quicker response your well written code brings to the site.
You put alot of thought into improving the URLs sequence, and it looks like you accomplished it all.

I did not think anyone could have improved what we already had to work with. I was so wrong. Thank you again for releasing your amazing code. Very impressive Robert!


#8   FWR Media

FWR Media
  • Members
  • 6,839 posts
  • Real Name:Robert Fisher
  • Gender:Male
  • Location:Stowmarket - Suffolk - UK

Posted 22 May 2009 - 16:09

I guess I should have checked first to see if my includes/functions/general.php was different then standard.
I did not mean to add complications by bringing up that unrelated issue.

That aside.
Now I must say I LOVE this new contribution! A-M-A-Z-I-N-G

The install was soooo quick and easy!

I can feel the quicker response your well written code brings to the site.
You put alot of thought into improving the URLs sequence, and it looks like you accomplished it all.

I did not think anyone could have improved what we already had to work with. I was so wrong. Thank you again for releasing your amazing code. Very impressive Robert!


Well I don't know (I've just realised) whether I am speaking to Rick or Debs but thanks you very much for your kind words.

Rob

#9   jwatts

jwatts
  • Members
  • 40 posts
  • Real Name:Justin Watts

Posted 22 May 2009 - 18:25

Hi Robert,

I am very excited about implementing your contribution in my store. Your installation instructions are awesome!! I do have a fairly modified store already, but so far I haven't run into any real problems with the installation... except for this... ;)

In install_modify_files.html, step 6, you are supposed to modify the 'buy now' button with your code.

I replaced the 'buy now' button with a 'details' link that will take users to the product info page. It may be a little much to ask you, since this is my own modded code, but would you be able to tell me how to change this line (this is the one that I replaced the original 'buy now' code with):

$lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '" style="display:block; padding-bottom:10px; padding-top:2px;">' . tep_image_button('button_buy_now.gif', 'Details') . '</a>';

I understand if that's beyond the scope of your support, but I figured I'd ask! Thanks again!
Justin

#10   FWR Media

FWR Media
  • Members
  • 6,839 posts
  • Real Name:Robert Fisher
  • Gender:Male
  • Location:Stowmarket - Suffolk - UK

Posted 22 May 2009 - 18:36

Hi Robert,

I am very excited about implementing your contribution in my store. Your installation instructions are awesome!! I do have a fairly modified store already, but so far I haven't run into any real problems with the installation... except for this... ;)

In install_modify_files.html, step 6, you are supposed to modify the 'buy now' button with your code.

I replaced the 'buy now' button with a 'details' link that will take users to the product info page. It may be a little much to ask you, since this is my own modded code, but would you be able to tell me how to change this line (this is the one that I replaced the original 'buy now' code with):

$lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '" style="display:block; padding-bottom:10px; padding-top:2px;">' . tep_image_button('button_buy_now.gif', 'Details') . '</a>';

I understand if that's beyond the scope of your support, but I figured I'd ask! Thanks again!
Justin


Hmmm that looks ok as it is actually .. when installed add a product to cart from product_listing (long line of products) then in the cart click continue which should take you back to the list of products.

Hover over all the products and make sure they don't all have the same products_id.

this mod was actually nothing to do with this module but eradicated a bug in osCommerce . . the bug only showed itself with ultimate seo urls 2 and your code may well have been a fix for it already.

Edited by FWR Media, 22 May 2009 - 18:41.


#11   Jonojamesmac

Jonojamesmac
  • Members
  • 146 posts
  • Real Name:Jono

Posted 22 May 2009 - 18:40

I've just installed this over a fresh copy of 2.2a, followed the instructions in the documentation and enabled SEO URL's in the admin however, there doesn't seem to be any change, i've checked and doubled checked everything and it just doesn't seem to work for me.

#12   FWR Media

FWR Media
  • Members
  • 6,839 posts
  • Real Name:Robert Fisher
  • Gender:Male
  • Location:Stowmarket - Suffolk - UK

Posted 22 May 2009 - 18:44

I've just installed this over a fresh copy of 2.2a, followed the instructions in the documentation and enabled SEO URL's in the admin however, there doesn't seem to be any change, i've checked and doubled checked everything and it just doesn't seem to work for me.


Nothing is something that CAN'T happen lol .. it either would work or if installed incorrectly would kick errors .. the only thing that would do nothing is if you hadn't applied the code in catalog/includes/application_top.php OR you haven't changed the tep_href_link() function in catalog/includes/functions/html_output.php so check that the correct code is in place.

More likely the tep_href_link function.

Edited by FWR Media, 22 May 2009 - 18:45.


#13   Jonojamesmac

Jonojamesmac
  • Members
  • 146 posts
  • Real Name:Jono

Posted 22 May 2009 - 20:04

Ok, for some reason the top on files didnt overwrite.

I can see things are working as they should, but, AllowOverride All is causing an internal server error.

#14   FWR Media

FWR Media
  • Members
  • 6,839 posts
  • Real Name:Robert Fisher
  • Gender:Male
  • Location:Stowmarket - Suffolk - UK

Posted 22 May 2009 - 20:13

Ok, for some reason the top on files didnt overwrite.

I can see things are working as they should, but, AllowOverride All is causing an internal server error.


What do you mean?

AllowOverride All is a setting in php.ini not .htaccess

#15   Jonojamesmac

Jonojamesmac
  • Members
  • 146 posts
  • Real Name:Jono

Posted 22 May 2009 - 20:23

What do you mean?

AllowOverride All is a setting in php.ini not .htaccess

It's a .htaccess setting i just can't seem to be able to get it working properly, adding it to .htaccess causes an internal server error

#16   Jonojamesmac

Jonojamesmac
  • Members
  • 146 posts
  • Real Name:Jono

Posted 22 May 2009 - 20:27

Sorted now i had to set a seperate directory for it, weird i know but it is wamp server i was using :)

#17   FWR Media

FWR Media
  • Members
  • 6,839 posts
  • Real Name:Robert Fisher
  • Gender:Male
  • Location:Stowmarket - Suffolk - UK

Posted 22 May 2009 - 20:28

It's a .htaccess setting i just can't seem to be able to get it working properly, adding it to .htaccess causes an internal server error


DELETED due to above post

Edited by FWR Media, 22 May 2009 - 20:38.


#18   steve_s

steve_s
  • Members
  • 1,583 posts
  • Real Name:steve
  • Gender:Male
  • Location:London

Posted 22 May 2009 - 22:27

Hi Robert,

Will this work with SID killer? and also non standard latin chars?

im using chemos 2.1d ORIGINAL updated by yourself with special chars converted to standard latin ones

Thanks
Steve

#19   FWR Media

FWR Media
  • Members
  • 6,839 posts
  • Real Name:Robert Fisher
  • Gender:Male
  • Location:Stowmarket - Suffolk - UK

Posted 22 May 2009 - 22:48

Hi Robert,

Will this work with SID killer? and also non standard latin chars?

im using chemos 2.1d ORIGINAL updated by yourself with special chars converted to standard latin ones

Thanks
Steve


Hi Steve

Imo SID killer should be shot and then buried without due ceremony .. special characters can be done in two ways.

1) put nothing in the includes/modules/ultimate_seo_urls5/includes/character_conversion directory
Then use the admin settings as per the old seo urls 2
2) create a file to put in character_conversion filling the array with the necessary character converts (the benefit being no space limitation and the fact that these files are called based on user selected language) the file has to be saved as the same name as the language in osC e.g. danish.php, espanol.php etc

Edited by FWR Media, 22 May 2009 - 22:49.


#20   gnowell

gnowell
  • Members
  • 15 posts
  • Real Name:Guy Nowell

Posted 23 May 2009 - 13:22

Hi Robert,
I asked you about implementing More Categories into ULTIMATE Seo Urls 5 in your other forum and you told me if it was strictly query based it should not be affected. When I was testing other links on my site I noticed my Reviews link is doing the exact same thing. It is not dropping the ?reviews_id=1 query like it is suppose to. Is there anything you might be able to think of that I can try to make it drop the query. Sorry to bug you about this but this is an important contribution on my site and if I can get it working that would be great.
Thanks
Guy