Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#76 03-26-2008 14:31:10

theblade24
Member
From: Tampa, Florida
Registered: 11-19-2003
Posts: 384
Website

Re: SEO Concerns

Dave... our conversation got distracted and I didn't get a closure here.

Here is my last reply.

It seems as though this line

$href_url = preg_replace('/' . $app . '-catshow/','Category',$cat_url);

is causing all the other lines below it to take on that format. Even my product links come out formatted as a category style. Once $href_url is set it is applying to all the others.

Is there somewhere else in ccp besides KHXC_Display where if I change the variable $href_url just for categories to cat_url so the line would read
$cat_url = preg_replace('/' . $app . '-catshow/','Category',$cat_url);   that I could change it to use that cat_url for category urls?


CCP 5.1
CCP 5.1
CCP 5.1

Offline

 

#77 03-26-2008 15:43:30

Dave
Member
Registered: 07-05-2003
Posts: 11233

Re: SEO Concerns

I don't see how it could be.  The routine that builds the link is called one time for each link that is being built.  As soon as you get the category link built the routine returns.  The next request to build a link starts the process all over again.

In the IF where you made the changes it should be safe to use a completely different name such as $cat_url but you'll have to add an if to only do the change and use the other name if it's a category link being built.  Within that if you'll also need to return $cat_url instead of the logic falling through and returning $href_url since it will no longer be correct.

Offline

 

#78 03-26-2008 15:54:38

theblade24
Member
From: Tampa, Florida
Registered: 11-19-2003
Posts: 384
Website

Re: SEO Concerns

I haven't done "ifs" anywhere.

All I thought I needed to do was alter your code in KHXC_Display and htaccess.

I haven't changed code to accomplish this anywhere else.

So by changing KHXC_Display is makes all the other ones goofy... but the cat works great. It's like the first line of the block

$href_url = preg_replace('/' . $app . '-catshow/','Category',$cat_url);

is making all these

$href_url = preg_replace('/' . $app . '-prodshow/','gift',$href_url);
     $href_url = preg_replace('/' . $app . '-display/','reference',$href_url);
     $href_url = preg_replace('/' . $app . '-prodspec\/KHXCseo.php/','store-specials.php',$href_url);
     $href_url = preg_replace('/' . $app . '-prodnew\/KHXCseo.php/','new-products.php',$href_url);
     $href_url = preg_replace('/' . $app . '-prodall\/KHXCseo.php/','view-all-products.php',$href_url);
     $href_url = preg_replace('/' . $app . '-prodidx\/KHXCseo.php/','product-index.php',$href_url);
     $href_url = preg_replace('/' . $app . '-prodbest\/KHXCseo.php/','best-sellers.php',$href_url);
     $href_url = preg_replace('/' . $app . '-prodsearch\/KHXCseo.php/','advanced-product-search.php',$href_url);
     $href_url = preg_replace('/' . $app . '-contact\/KHXCseo.php/','contact-us.php',$href_url);
     $href_url = preg_replace('/' . $app . '-viewcart\/KHXCseo.php/','view-shopping-cart.php',$href_url);
     $href_url = preg_replace('/' . $app . '-acctorders\/KHXCseo.php/','order-status.php',$href_url);

go bad. They show up like

/ccp0-prodbest/KHXCseo/
/ccp0-prodall/KHXCseo/

and so on. I believe like the rest of those lines don't exist.


CCP 5.1
CCP 5.1
CCP 5.1

Offline

 

#79 03-26-2008 16:25:17

Dave
Member
Registered: 07-05-2003
Posts: 11233

Re: SEO Concerns

Right after this line

Code:

     $href_url .= $app . '-' . $ns . '/' . $ref . '.html';

add

Code:

     if ($ns == 'catshow') {
         $href_url_cat = $href_url . $app . '-' . $ns . '/' . $ref . '/';
         $href_url = preg_replace('/' . $app . '-catshow/','sports_memorabilia',$href_url_cat);
         
         // +--
         // | Return the URL.
         // +--

         return $href_url;
     }

and see if you get the desired result.  I still see no way for the other strangeness you're seeing to happen but this should avoid it.

Offline

 

#80 03-26-2008 16:42:22

theblade24
Member
From: Tampa, Florida
Registered: 11-19-2003
Posts: 384
Website

Re: SEO Concerns

Getting close!!!  That corrected the problems with all the links other than cat links.

However, it now is duplicating the cat links to as

/sports_memorabilia/baseball_memorabilia_autographed_signed.htmlsports_memorabilia/baseball_memorabilia_autographed_signed/


CCP 5.1
CCP 5.1
CCP 5.1

Offline

 

#81 03-26-2008 16:51:20

Dave
Member
Registered: 07-05-2003
Posts: 11233

Re: SEO Concerns

I'm quite confident you'll figure out what needs to be tweaked smile

Offline

 

#82 03-26-2008 17:00:07

theblade24
Member
From: Tampa, Florida
Registered: 11-19-2003
Posts: 384
Website

Re: SEO Concerns

smile

if ($ns == 'catshow') {
         $href_url_cat = $app . '-' . $ns . '/' . $ref . '/';
         $href_url = preg_replace('/' . $app . '-catshow/','sports_memorabilia',$href_url_cat);
         
         // +--
         // | Return the URL.
         // +--

         return $href_url;
     }


CCP 5.1
CCP 5.1
CCP 5.1

Offline

 

#83 06-21-2008 11:23:38

wjr
Member
Registered: 01-03-2007
Posts: 79

Re: SEO Concerns

Forgive me if I'm being dumb, but how do I actually get to khxc_display?

I've searched all around the backend interface but can't locate it anywhere.

Thanks

Will

Offline

 

#84 06-21-2008 11:27:22

Dave
Member
Registered: 07-05-2003
Posts: 11233

Re: SEO Concerns

It's a program and not visible or able to be gotten to through admin.  You'll find it in your private directory under /core/KHXC_Display and you'll need to use your FTP client to get to it.

Make sure you keep a backup as it's a rather critical bit of code smile

Offline

 

#85 06-21-2008 11:51:41

wjr
Member
Registered: 01-03-2007
Posts: 79

Re: SEO Concerns

I don't have FTP access, I'm hosted with Howard @ Greenbarn.

Shall I contact him and get him to do it?

Offline

 

#86 06-21-2008 12:08:16

Dave
Member
Registered: 07-05-2003
Posts: 11233

Re: SEO Concerns

You don't have FTP access????  Wow, I guess your only choice is to ask Howard for your copy of it, change it and ask him to put it on your site for you.  Or have him give you a quote to make the changes.

Offline

 

Board footer