Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Xuru SEO Mod --> Free SEO Mod

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #31  
Old 09-14-2006, 02:23 PM
  Jayk's Avatar 
Jayk Jayk is offline
 

eXpert
  
Join Date: Nov 2003
Location: Calgary, Alberta, Canada
Posts: 333
 

Default Re: Xuru SEO Mod --> Free SEO Mod

Is anyone running this mod on a 4.1.x production site? I'd like to see it in action before I give it a whirl.

Thanks,
Jason
__________________
X-Cart Gold 4.4.3
Blog: www.flashinthepan.ca
Reply With Quote
  #32  
Old 09-14-2006, 02:49 PM
 
JeremyL JeremyL is offline
 

Member
  
Join Date: Sep 2006
Location: Dallas Texas
Posts: 17
 

Default Re: Xuru SEO Mod --> Free SEO Mod

Quote:
Originally Posted by Jayk
In the install docs, under files that need to be edited, you show:

/smarty.php
/auth.php
/smarty.php

I think the first one is supposed to be config.php.

Cheers,
Jason

Fixed. Thanks
Reply With Quote
  #33  
Old 09-14-2006, 02:51 PM
 
JeremyL JeremyL is offline
 

Member
  
Join Date: Sep 2006
Location: Dallas Texas
Posts: 17
 

Default Re: Xuru SEO Mod --> Free SEO Mod

Quote:
Originally Posted by Jayk
Is anyone running this mod on a 4.1.x production site? I'd like to see it in action before I give it a whirl.

Thanks,
Jason

I've got it on a private url. I'll install a test copy on a public url tonight and post it.
Reply With Quote
  #34  
Old 09-14-2006, 05:02 PM
 
intel352 intel352 is offline
 

X-Wizard
  
Join Date: Dec 2005
Posts: 1,071
 

Default Re: Xuru SEO Mod --> Free SEO Mod

I personally do not recommend the mod for production use currently. If anything, please wait until geckoday uploads his modified files, they have been in use on a production site with few issues for awhile now.

Additionally, if I remember correctly, when I installed mod on x-cart 4.1, I believe I did have to modify auth.php at one point. I don't remember exactly tho. The entry point for the mod in 4.1 was different than in 4.0

I'll check the docs tomorrow, don't have long on a net connection tonight
__________________
-Jon Langevin
WARNING: Unethical developer - NOT RECOMMENDED
See details here
Reply With Quote
  #35  
Old 09-15-2006, 11:34 AM
 
geckoday geckoday is offline
 

X-Wizard
  
Join Date: Aug 2005
Posts: 1,073
 

Default Re: Xuru SEO Mod --> Free SEO Mod

OK, here's my version. One known issue. Foreign characters in product names don't get converted into something usable in a URL (neither do they in the HTML catalog BTW since I borrowed the code from there). Intel352 has a fix for that and will post it later.

Unzip the attached file to include/templater/plugins/outputfilter.seo.php

In your .htaccess file add this:
Code:
RewriteEngine on RewriteBase / # Rewrite SEO category URL's RewriteRule ^([^/]*/)?[^/]+-c-([0-9]+)-p-([0-9]+)\.html$ $1home.php?cat=$2&page=$3 [L] RewriteRule ^([^/]*/)?[^/]+-c-([0-9]+)\.html$ $1home.php?cat=$2 [L] # Rewrite SEO manufacturers URL's RewriteRule ^([^/]*/)?[^/]+-m-([0-9]+)-p-([0-9]+)\.html$ $1manufacturers.php?manufacturerid=$2&page=$3 [L] RewriteRule ^([^/]*/)?[^/]+-m-([0-9]+)\.html$ $1manufacturers.php?manufacturerid=$2 [L] # Rewrite SEO product URL's RewriteRule ^([^/]*/)?[^/]+-pr-([0-9]+)\.html$ $1product.php?productid=$2 [L]

In smarty.php add this at the end just above the warning comments:
PHP Code:
############################################################
# SEO Optimization Mod
############################################################
#
# Output Filters
#
include_once($xcart_dir."/include/templater/plugins/outputfilter.seo.php");
if(
AREA_TYPE=='C' && $HTTPS != "on" && class_exists('seo_filter')) {
  
$seo = new seo_filter;
  
$smarty->register_outputfilter(array($seo,"outputfilter"));
}
# END SEO 

That's it. I have tested this on 4.0.19 and looked at versions 4.0.12 - 4.1.2 and it should work in those just fine. It really doesn't modify any existing code so it will probably work with any 4.0.x or 4.1.x version.

It is running live at http://www.snowriver.com. Performance may suck as I'm having problems with my VPS host. They keep getting someone bogging down the machine and its not me. Been going on for over a week now calling them every day. No time to be cheap moving into the holiday season so I'm moving to a dedicated server soon to avoid having problems due to other denizens of the server I'm on.
Attached Files
File Type: zip outputfilter.seo.zip (1.5 KB, 64 views)
__________________
Manuka Bay Company
X-Cart Version 4.0.19 [Linux]

UGG Boots and other fine sheepskin products
http://www.snowriver.com
Reply With Quote
  #36  
Old 09-15-2006, 11:46 AM
 
intel352 intel352 is offline
 

X-Wizard
  
Join Date: Dec 2005
Posts: 1,071
 

Default Re: Xuru SEO Mod --> Free SEO Mod

I'm working with geckoday's code at the moment, it's nicely done. Testing on X-Cart 4.1.2 shows that the mod works well.

I'm making a few modifications so that Accented characters will translate properly, and I'm also working on code to redirect the old home|product|manufacturers.php urls to the new .html url, to help prevent duplicate content.

I'll create a code branch in the SVN repository and upload my changes there, as well as creating an archive for you guys to download directly
__________________
-Jon Langevin
WARNING: Unethical developer - NOT RECOMMENDED
See details here
Reply With Quote
  #37  
Old 09-15-2006, 12:17 PM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,200
 

Default Re: Xuru SEO Mod --> Free SEO Mod

Just a note, you'll also want to rewrite the sort links on the category pages, the printable urls, and the js=n/y links or block them in an .htaccess file to prevent duplicate content.
Reply With Quote
  #38  
Old 09-15-2006, 09:53 PM
 
geckoday geckoday is offline
 

X-Wizard
  
Join Date: Aug 2005
Posts: 1,073
 

Default Re: Xuru SEO Mod --> Free SEO Mod

Quote:
Originally Posted by Jon
Just a note, you'll also want to rewrite the sort links on the category pages, the printable urls, and the js=n/y links or block them in an .htaccess file to prevent duplicate content.
Those items would also cause duplicate content in base X-Cart. My mod is a step up but not the holy grail which is exactly what was intended. As I said earlier, it works pretty much just like DSEFU which doesn't do those things and there seems to be a lot of people happy with its ability to increase rankings.
__________________
Manuka Bay Company
X-Cart Version 4.0.19 [Linux]

UGG Boots and other fine sheepskin products
http://www.snowriver.com
Reply With Quote
  #39  
Old 09-16-2006, 06:57 AM
 
geckoday geckoday is offline
 

X-Wizard
  
Join Date: Aug 2005
Posts: 1,073
 

Default Re: Xuru SEO Mod --> Free SEO Mod

Ooops. I forgot to post the changes to the Froogle module. These froogle changes apply to 4.0.19 and 4.1.x. You can probably figure out the equivalent change for earlier releases but I don't believe they work with the new google base anyway. At the top of froogle.php right after this:
PHP Code:
if ( !defined('XCART_SESSION_START') ) { header("Location: ../../"); die("Access denied"); } 

Add this:
PHP Code:
$seo = new seo_filter

Then find this:
PHP Code:
$post substr(str_replace(array("\t","\r","\n"), array(" ","",""), $product['product']), 080)."\t".
                
$product['descr']."\t".
                
$http_location.constant("DIR_CUSTOMER")."/".$prod_url."\t"
And replace it with this:
PHP Code:
# Build SEO URL
      
$prod_url $seo->_product_filename($product['productid'], $product['product']);

            
# Post string
            
$post substr(str_replace(array("\t","\r","\n"), array(" ","",""), $product['product']), 080)."\t".
                
$product['descr']."\t".
                
$http_location.constant("DIR_CUSTOMER")."/".$prod_url."\t"

NOTE: Edited Saturday 9/16 at about 2:40 PM PDT to remove unneccessary include_once, added note on releases and fixed the find/replace for the product URL (I was wolfing down breakfast rushing to get out the door to open my B&M store and botched it horribly). Just goes to show you there are good reasons to pay for DSEFU or CDSEO - you get someone who has packaged it for human consumption already and will install it and make sure it works on your box.
__________________
Manuka Bay Company
X-Cart Version 4.0.19 [Linux]

UGG Boots and other fine sheepskin products
http://www.snowriver.com
Reply With Quote
  #40  
Old 09-16-2006, 11:32 AM
  B00MER's Avatar 
B00MER B00MER is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Keller, TX (Cart-Lab.com)
Posts: 3,165
 

Default Re: Xuru SEO Mod --> Free SEO Mod

Shouldn't Smarty auto-magically include/require anything within its plugin subdir?

http://smarty.php.net/manual/en/plugins.php

Making this line, not needed?
PHP Code:
include_once $xcart_dir."/include/templater/plugins/outputfilter.seo.php"
__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart.
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 04:41 PM.

   

 
X-Cart forums © 2001-2020