Jump to content
spidometrs

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

Recommended Posts

Thanks Jack_mcs

 

I've upgraded to new version, changed the options and changed the hyphen to slash, and it all works great!

But I'm a bit worried about the extensions

 

Now the link to the category page would look like this

h ttp://shop.com/category-c-31.html

 

and to the product in this category

h ttp://shop.com/category/product-p-349.html

 

Wouldn't it be better for google if it was

h ttp://shop.com/category/

and

h ttp://shop.com/category/product/

??

 

What would be the best way to get rid of the extensions ?

Can you please let me know how did you make this change?

 

From '-' to '/'

Share this post


Link to post
Share on other sites

Have you checked that persons account? He may no longer be active on the forums. If he is, he may not see this thread so you could try pm'ing him.

 

I'm curious why making this change is important to you? I don't see that It would be of any benefit. Actually, it may be less of one. Google is shifting how it ranks a page by using more specific phases. So if you sell Dell computes and there is a model 1300, google will give more weight to a url that reads dell-1300 over dell/1300, in my opinion, since the latter breaks the string. This can be mostly mitigated by mentioning Dell 1300 on the page and in the title but every little bit helps.

 

With all of that said, I will probably add the option to use a slash instead of a dash to the next version since others have asked for it. But that won't be for quite a while due to the holidays, tax season and paid-for work coming first.

Share this post


Link to post
Share on other sites

Have you checked that persons account? He may no longer be active on the forums. If he is, he may not see this thread so you could try pm'ing him.

 

I'm curious why making this change is important to you? I don't see that It would be of any benefit. Actually, it may be less of one. Google is shifting how it ranks a page by using more specific phases. So if you sell Dell computes and there is a model 1300, google will give more weight to a url that reads dell-1300 over dell/1300, in my opinion, since the latter breaks the string. This can be mostly mitigated by mentioning Dell 1300 on the page and in the title but every little bit helps.

 

With all of that said, I will probably add the option to use a slash instead of a dash to the next version since others have asked for it. But that won't be for quite a while due to the holidays, tax season and paid-for work coming first.

Thank you so much Jack. I will wait for your support.

 

But really it is very important to me......

 

 

Thanks in advance

Share this post


Link to post
Share on other sites

Thank you so much Jack. I will wait for your support.

 

But really it is very important to me......

 

 

Thanks in advance

Hi Jack, any updates on the changes?

 

 

Thanks in advance

Share this post


Link to post
Share on other sites

No, nothing is planned for any time soon. I will post here when an update is available,.

Share this post


Link to post
Share on other sites

Hi Jack,

I have installed the add-on and it seems to work fine...but i cant make the specials characters to work..i use utf8 and seccond language greek characters..

α=>a,β=>v,γ=>g,δ=>d,ε=>e,ζ=>z,η=>i,θ=>th,ι=>i,κ=>k,λ=>l,μ=>m,ν=>n,ξ=>j,ο=>o,π=>p,ρ=>r,σ=>s,τ=>t,υ=>u,φ=>f,χ=>x,ψ=>ps,ω=>w,ά=>a,έ=>e,ί=>i,ό=>o,ή=>h,ώ=>w,ύ=>u,ς=>s,ΐ=>i,ϊ=>i,Α=>A,Β=>V,Γ=>G,Δ=>D,Ε=>E,Ζ=>Z,Η=>I,Θ=>TH,Ι=>I,Κ=>K,Λ=>L,Μ=>M,Ν=>N,Ξ=>J,Ο=>O,Π=>P,Ρ=>R,Σ=>S,Τ=>T,Υ=>Y,Φ=>F,Χ=>X,Ψ=>PS,Ω=>W

 

Do i need to put something else to .htaccess ?

Share this post


Link to post
Share on other sites

I made a change to the code for this problem but haven't had a chance to thoroughly test it. Here is the change if you want to try. In includes/classes/seo.url.php, find

 * @[member=Return] string Stripped text. Removes all non-alphanumeric characters.
 */        
        function strip($string){

and add this below it

                if (CHARSET == 'utf-8') {
                   $string =  iconv("ISO-8859-1", "UTF-8//TRANSLIT", $string);
                }

Please let me know how it goes.

Share this post


Link to post
Share on other sites

You mean seo.class.php  and that piece of code is already there ...and is not working...in english i dont have a problem only in greek and it replace the greek words with the  - character..

Share this post


Link to post
Share on other sites

Jack i dont know if i pm you the test url of the site and set the diagnostice profile on will help you...

Share this post


Link to post
Share on other sites

i made a test with the  ultimate seo url 5 pro from fwr media and there is no problem...The conversion file works...thats why i said maybe in the .htaccess..

Share this post


Link to post
Share on other sites

That's a different addon completely and has nothing to do with this one. As for the change for this one, I gave the wrong one. If you are using this one, find this code

                if (CHARSET == 'utf-8') {
                   $string =  iconv("ISO-8859-1", "UTF-8//TRANSLIT", $string);
                }

and delete it. Then find this code

        function ConnectDB(){
                $this->link_id = mysql_connect($this->host, $this->user, $this->pass);

and add this line after it

mysql_set_charset('utf8',$this->link_id);

Share this post


Link to post
Share on other sites

and one other thing is if i enable the header tags seo as name it make the url like before i have installed

the SEO Header Tags - RELOADED baybe it is not compatible? and in english language.

Share this post


Link to post
Share on other sites

I can't comment on how that addon works with this one. This one works fine with Header Tags SEO and with shops without a meta tag addon so it would seem there is some compatibility problem between Header Tags SEO Reloaded and this addon. You would have to ask in its support thread for help with it.

Share this post


Link to post
Share on other sites

 Works fine also with reloaded never seen a conflict with either contribution !

 

Regards

Joli


To improve is to change; to be perfect is to change often.

 

Share this post


Link to post
Share on other sites

Bootstrap has not got header tags reloaded installed by default although a part of  the rich snippets code is being used in product  info reviews etc

(this just makes for an easier install)

 

so if you decide to go with reloaded you need to finsh the install.

 

Jacks header Tags seo is a bit more comprehsive with a few extra funsctions!!

 

Up to you whichever suits your needs best.

 

Neither of the contributions should effect how the seo urls are written as they are seperate contributons

 

Go over your SEO URLS install again you must have missed something and do the changes Jack mentioned he knows a lot more than anyone else about this contribution.

 

I would suggest testing first with the engish language to see if you can get my-seo-url-working-p-143.html

and then try your charactor conversion that would maybe narrow down where it is breaking


To improve is to change; to be perfect is to change often.

 

Share this post


Link to post
Share on other sites

@@rory1 If you are talking about enabling the Header Tags option in Ultimate SEO, that only works for Header Tags SEO, not Reloaded.

Share this post


Link to post
Share on other sites

yes i know that Bootstrap has not got header tags reloaded installed by default ..but this is other version with some addonns preinstalled if you check it you will see what i mean..

Share this post


Link to post
Share on other sites

yes i know that Bootstrap has not got header tags reloaded installed by default ..but this is other version with some addonns preinstalled if you check it you will see what i mean..

sorry missed that thought you were working from a standard install

Edited by joli1811

To improve is to change; to be perfect is to change often.

 

Share this post


Link to post
Share on other sites

Just installed this on a new copy of Oscommerce.

 

I'm running locally on localhost.  Anybody know what would cause this:

 

With SEO URLS OFF:  http://localhost/product_info.php?cPath=3_10&products_id=12

 

With SEO URLS ON:  http://localhost/-p-12.html

 

No matter what, it will not put other text. I can still access and navigate just fine.  It simply just creates URLs with the "-p-" or the "-c-" etc..

 

No other text is populated.

 

Thanks!

Share this post


Link to post
Share on other sites

It's either how your .htaccess or configure file is setup, maybe both. The setup is a little different for local shops since the paths are different than they are on a server.

Share this post


Link to post
Share on other sites

It's either how your .htaccess or configure file is setup, maybe both. The setup is a little different for local shops since the paths are different than they are on a server.

 

I uninstalled & reinstalled and found out it had to do with the deprecated "mysql" vs "mysqli" queries.  As explained:  http://forums.oscommerce.com/topic/154166-contribution-ultimate-seo-urls-v21-by-chemo/page-345#entry1692222

 

Thanks! :)

 

Great add on!

Share this post


Link to post
Share on other sites

Hello,

 

De Dokta, a member of the German osc support forum rewrote a part of the seo.class.php:

 

Lines 63 - 156:

 

	    function SEO_DataBase($host, $user, $db, $pass){
			    $this->host = $host;
			    $this->user = $user;
			    $this->db = $db;
			    $this->pass = $pass;			   
			    $this->ConnectDB();
////			    $this->SelectDB();
	    } # end function
/**
* Function to connect to MySQL
* @[member='author'] Bobby Easland
* @version 1.1
*/	   
	    function ConnectDB(){
			    $this->link_id = mysqli_connect($this->host, $this->user, $this->pass, $this->db);
	    if (!$this->link_id) {
    die('Connect Error (' . mysqli_connect_errno() . ') '
		    . mysqli_connect_error());
}
	   
	    } # end function
	   
/**
* Function to select the database
* @[member='author'] Bobby Easland
* @version 1.0
* @[member='Return'] resoource
*	  
	    function SelectDB(){
			    return mysqli_select_db($this->link_id, $this->db);
	    } # end function
	   
/**
* Function to perform queries
* @[member='author'] Bobby Easland
* @version 1.0
* @[member='param'] string $query SQL statement
* @[member='Return'] resource
*/	   
	    function Query($query){
			    $result = mysqli_query($this->link_id, $query);
			    return $result;
	    } # end function
	   
/**
* Function to fetch array
* @[member='author'] Bobby Easland
* @version 1.0
* @[member='param'] resource $resource_id
* @[member='param'] string $type MYSQL_BOTH or MYSQL_ASSOC
* @[member='Return'] array
*/	   
	    function FetchArray($resource_id, $type = MYSQL_BOTH){
			 if ($resource_id)
			 {
			    $result = mysqli_fetch_array($resource_id, $type);
			    return $result;
			 }
			 return false;
	    } # end function
	   
/**
* Function to fetch the number of rows
* @[member='author'] Bobby Easland
* @version 1.0
* @[member='param'] resource $resource_id
* @[member='Return'] mixed 
*/	   
	    function NumRows($resource_id){
			    return @mysqli_num_rows($resource_id);
	    } # end function
/**
* Function to fetch the last insertID
* @[member='author'] Bobby Easland
* @version 1.0
* @[member='Return'] integer 
*/	   
	    function InsertID() {
			    return mysqli_insert_id();
	    }
	   
/**
* Function to free the resource
* @[member='author'] Bobby Easland
* @version 1.0
* @[member='param'] resource $resource_id
* @[member='Return'] boolean
*/	   
	    function Free($resource_id){
			    return @mysqli_free_result($resource_id);
	    } # end function
De Dokta tested his modification on php 5.4, I tested it on php 5.5 and it seems to work correctly.

 

Regards

weinhexe

 

 

This crashes in PHP 5.6.4

 

This line

function FetchArray($resource_id, $type = MYSQL_BOTH){

needs changing to

function FetchArray($resource_id, $type = MYSQLI_BOTH){

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

×