Jump to content
Latest News: (loading..)
Sign in to follow this  
FWR Media

KissMT Dynamic SEO Meta Tags

Recommended Posts

I assume you are referring to the browser cache not kissmt cache? Works perfect when I reset cache on the browser. I commented out second if function as well - does it matter?

 

No I was referring to the KissMT cache. You have changed the meta data created therefore the cache needs to be reset otherwise it will display legacy data.

 

On another note could you please explain:

 

* How does this contrib looks after the duplicate title/descriptions caused by basic oscommerce functions as per your contrib 6214 used to? i.e. /my-great-product-c-47.html?page=2&sort=2a

 

Use of canonical elements.

 

* the KISSMT_CANONICAL_ON function and what I am supposed to see when I set it to either value. I cant seem to see any changes either way.

 

Shows canonical elements to safeguard against duplicate content.

 

* Im trying to understand; i changed KISSMT_SPECIALS_TEXT and title and desc remain unchanged on the specials page until i deleted the kissmt cache. Why is that? Whats the benefit of kissmt cache?

 

Each page dynamically generates meta information and uses a range of PHP functions to create the data, in some cases this may require a few queries. By caching the data into simple text files we can eliminate those queries and the load created by use of PHP functions.

 

You did a great job, so far I'm impressed.

 

Thanks always good to receive feedback.

Share this post


Link to post
Share on other sites

Enable the numbers as keywords?

 

hello,

I have a problem.

I was really happy as KissMT is working, and working very fine for me

 

right now I have my most important manufacturer that is called

"uno de 50"

uno is a Spanish stop word

de is a Spanish stop word too

and 50 is a number.

 

with lot of pitty I have chosen remove "uno" and "de" from the stop words, as they will broke the good keywords infrastructure I have.....

but saying "uno de" without the number is as to say "one of".... it doesn't means anything

 

another factor is translate the "uno" word to number "1" so, still the problem

 

Do you have suggestions about how to add again the numbers, or how to solve this problem?

 

Thank you for this great contribution.

 

Regards,

Share this post


Link to post
Share on other sites

Enable the numbers as keywords?

 

hello,

I have a problem.

I was really happy as KissMT is working, and working very fine for me

 

right now I have my most important manufacturer that is called

"uno de 50"

uno is a Spanish stop word

de is a Spanish stop word too

and 50 is a number.

 

with lot of pitty I have chosen remove "uno" and "de" from the stop words, as they will broke the good keywords infrastructure I have.....

but saying "uno de" without the number is as to say "one of".... it doesn't means anything

 

another factor is translate the "uno" word to number "1" so, still the problem

 

Do you have suggestions about how to add again the numbers, or how to solve this problem?

 

Thank you for this great contribution.

 

Regards,

 

Well you could try this very quick and dirty hack but no promises.

 

catalog/includes/modules/kiss_meta_tags/abstracts/kiss_modules.php

 

Find ...

 

    private function buildKeyWords( $keywords ) { 
     $keywords = rtrim( trim( str_replace( '[-separator-]', ',', $keywords ) ), ',' );
     $stripped =  $this->stripCharacters( $keywords, 'keywords' );
     $words_as_array = explode( ' ', $stripped ); 
     array_walk( $words_as_array, array( __CLASS__, 'stripStopWords' ) );
     KissMT::init()->keywords = $this->limitMeta( KissMT::init()->entities( rtrim( str_replace( array( '[--replaced--],', '[--replaced--]' ), '',  implode( ',', $words_as_array ) ), ',' ), $decode = false ), 'keywords' );
   } // end method

 

Replace with ...

 

    private function buildKeyWords( $keywords ) { 
     $keywords = rtrim( trim( str_replace( '[-separator-]', ',', $keywords ) ), ',' );
     $stripped =  $this->stripCharacters( $keywords, 'keywords' );
     // Start Crester mod
     $add_uno_de_50 = false;
     if ( false !== stripos( $stripped, 'uno de 50' ) ) {
       $add_uno_de_50 = 'uno de 50,';
     }
     // End Crester mod
     $words_as_array = explode( ' ', $stripped ); 
     array_walk( $words_as_array, array( __CLASS__, 'stripStopWords' ) );
     KissMT::init()->keywords = $this->limitMeta( KissMT::init()->entities( rtrim( str_replace( array( '[--replaced--],', '[--replaced--]' ), '',  implode( ',', $words_as_array ) ), ',' ), $decode = false ), 'keywords' );
     // Start Crester mod
     if ( false !== $add_uno_de_50 ) {
       KissMT::init()->keywords = $add_uno_de_50 . KissMT::init()->keywords;
     }
     // End Crester mod
   } // end method

Edited by FWR Media

Share this post


Link to post
Share on other sites

Well you could try this very quick and dirty hack but no promises.

 

catalog/includes/modules/kiss_meta_tags/abstracts/kiss_modules.php

 

Find ...

 

    private function buildKeyWords( $keywords ) { 
     $keywords = rtrim( trim( str_replace( '[-separator-]', ',', $keywords ) ), ',' );
     $stripped =  $this->stripCharacters( $keywords, 'keywords' );
     $words_as_array = explode( ' ', $stripped ); 
     array_walk( $words_as_array, array( __CLASS__, 'stripStopWords' ) );
     KissMT::init()->keywords = $this->limitMeta( KissMT::init()->entities( rtrim( str_replace( array( '[--replaced--],', '[--replaced--]' ), '',  implode( ',', $words_as_array ) ), ',' ), $decode = false ), 'keywords' );
   } // end method

 

Replace with ...

 

    private function buildKeyWords( $keywords ) { 
     $keywords = rtrim( trim( str_replace( '[-separator-]', ',', $keywords ) ), ',' );
     $stripped =  $this->stripCharacters( $keywords, 'keywords' );
     // Start Crester mod
     $add_uno_de_50 = false;
     if ( false !== stripos( $stripped, 'uno de 50' ) ) {
       $add_uno_de_50 = 'uno de 50,';
     }
     // End Crester mod
     $words_as_array = explode( ' ', $stripped ); 
     array_walk( $words_as_array, array( __CLASS__, 'stripStopWords' ) );
     KissMT::init()->keywords = $this->limitMeta( KissMT::init()->entities( rtrim( str_replace( array( '[--replaced--],', '[--replaced--]' ), '',  implode( ',', $words_as_array ) ), ',' ), $decode = false ), 'keywords' );
     // Start Crester mod
     if ( false !== $add_uno_de_50 ) {
       KissMT::init()->keywords = $add_uno_de_50 . KissMT::init()->keywords;
     }
     // End Crester mod
   } // end method

 

 

Fantastic....

it works as superb as expected.

 

Thank you very much.

Share this post


Link to post
Share on other sites

Hi Robert,

 

What code can be changed so that the index meta description does not combine KISSMT_HOMEPAGE_TITLE in front of KISSMT_HOMEPAGE_DESCRIPTION? Example: <meta name="description" content="KISSMT_HOMEPAGE_TITLE,KISSMT_HOMEPAGE_DESCRIPTION">? I would like to get rid of the KISSMT_HOMEPAGE_TITLE and the comma after it. Is there any reason you have done this by default?

Would this be the code? If so what changes need to be made?

\includes\modules\kiss_meta_tags\modules\index.php

        /**
       * Root index page
       */
       default:
         KissMT::init()->setCanonical( $this->checkCanonical() );
         $this->parse( KissMT::init()->entities( sprintf( KISSMT_HOMEPAGE_TITLE, STORE_NAME ), $decode = true ), KissMT::init()->entities( sprintf( KISSMT_HOMEPAGE_DESCRIPTION, STORE_NAME ), $decode = true ) );
         break;
     }
   } // end method

Regards

George

Share this post


Link to post
Share on other sites

Hi Robert,

 

Is it possible to add custom Titles and Descriptions keywords to each of the categories individually in addition/preceeding to the automatic retrieval of entries that it does by default?

 

Regards

George

Share this post


Link to post
Share on other sites

First i would like to thank you for your creation and hard work in oscommerce community.

 

i really like this addon, and the installation process was very easy. however when i try to add images to my categories, this error shows up:

 

_____________

 

1054 - Unknown column 'sort_order' in 'field list'

 

update categories_description set sort_order = '1', last_modified = now(), kissmt_categories_description = '' where categories_id = '32' and language_id = '1'

 

[TEP STOP]

 

_____________

 

I am a noob at this stuff but my guess is the sort_order does not exist in categories_description. i tried tinkering around with phpmyadmin a bit but i do not want to break anything, please help as i would really like to use this addon in my future projects.

 

Thank you

Share this post


Link to post
Share on other sites

is it possible where i can have a unique length just for the main home page and another unique length of characters for the rest of the items?

Share this post


Link to post
Share on other sites

Hello Robert, I have a question about your KissMT module. I have my store set up with Master Products and Slaves. All my Slaves have different urls but same content as their corresponding Master.

 

Is there a way with the KissMT canonical function to point the slaves url to their corresponding masters? This way even though the Slaves and Master have the same content but different Urls, for search engines they will look as one product only.

 

Otherwise I may have to do a htaccess 301 redirect of all my slaves to their corresponding Master

 

Thanks

 

Ricardo

Share this post


Link to post
Share on other sites

Hello Robert, I have a question about your KissMT module. I have my store set up with Master Products and Slaves. All my Slaves have different urls but same content as their corresponding Master.

 

Is there a way with the KissMT canonical function to point the slaves url to their corresponding masters? This way even though the Slaves and Master have the same content but different Urls, for search engines they will look as one product only.

 

Otherwise I may have to do a htaccess 301 redirect of all my slaves to their corresponding Master

 

Thanks

 

Ricardo

 

Well having the same canonical element would work but how to do it I don't know as I'm not up to speed with the contribution.

Share this post


Link to post
Share on other sites

is it possible where i can have a unique length just for the main home page and another unique length of characters for the rest of the items?

 

Yes but you'll have to code it yourself as it is not a part of the contribution.

Share this post


Link to post
Share on other sites

First i would like to thank you for your creation and hard work in oscommerce community.

 

i really like this addon, and the installation process was very easy. however when i try to add images to my categories, this error shows up:

 

_____________

 

1054 - Unknown column 'sort_order' in 'field list'

 

update categories_description set sort_order = '1', last_modified = now(), kissmt_categories_description = '' where categories_id = '32' and language_id = '1'

 

[TEP STOP]

 

_____________

 

I am a noob at this stuff but my guess is the sort_order does not exist in categories_description. i tried tinkering around with phpmyadmin a bit but i do not want to break anything, please help as i would really like to use this addon in my future projects.

 

Thank you

 

KissMT doesn't touch categories_description unless you have added the "extra" even so .. it has no entry for sort_order.

Share this post


Link to post
Share on other sites

This error makes no sense as the property $basename exists.

 

 

I too got this error after I installed the app

 

Warning: Attempt to retrieve an inexistant property of KissMT named basename in /export/home/pe/blahblah.com/public_html/catalog/includes/modules/kiss_meta_tags/classes/kiss_meta_tags_class.php on line 209

 

 

Error!

 

Unable to determine the page link!

 

 

-----

 

Besides "this doesn't make sense" any ideas on how to resolve this? Any more information needed? (FYI this is on a shared site server setup (as you might have been able to tell from the URL)

 

Thanks!

Share this post


Link to post
Share on other sites

I too got this error after I installed the app

 

Warning: Attempt to retrieve an inexistant property of KissMT named basename in /export/home/pe/blahblah.com/public_html/catalog/includes/modules/kiss_meta_tags/classes/kiss_meta_tags_class.php on line 209

 

 

Error!

 

Unable to determine the page link!

 

 

-----

 

Besides "this doesn't make sense" any ideas on how to resolve this? Any more information needed? (FYI this is on a shared site server setup (as you might have been able to tell from the URL)

 

Thanks!

 

$basename is remaining null as oddly your server does not return a filename when the method setBaseName() is called. This is a first.

 

Also if this were the case setBaseName() would have triggered an E_USER_WARNING earlier.

 

Does this happen on all pages or just one?

Edited by FWR Media

Share this post


Link to post
Share on other sites

$basename is remaining null as oddly your server does not return a filename when the method setBaseName() is called. This is a first.

 

Also if this were the case setBaseName() would have triggered an E_USER_WARNING earlier.

 

Does this happen on all pages or just one?

 

Well any pages that used the index.php mod - as soon as I pulled that out the pages worked fine, but when it was calling the classes/files then this error came up instead of the pages.

 

I could turn it around and hunt/fake some other pages (main/first page currently doesn't come up)

Share this post


Link to post
Share on other sites

Well any pages that used the index.php mod - as soon as I pulled that out the pages worked fine, but when it was calling the classes/files then this error came up instead of the pages.

 

I could turn it around and hunt/fake some other pages (main/first page currently doesn't come up)

 

Which version of PHP is being run?

Share this post


Link to post
Share on other sites

Thought it was 5.2 - but it is 5.1.6. Could that be it?

 

Definately 5.1.6 is too old this contribution is 5.2+

Share this post


Link to post
Share on other sites

Definately 5.1.6 is too old this contribution is 5.2+

 

Okay site was upgraded to 5.2.9 - however when I applied the contribution I got the following error:

 

Warning: Attempt to retrieve an inexistant property of KissMT named basename in /export/home/pe/xxxxx.com/public_html/catalog/includes/modules/kiss_meta_tags/classes/kiss_meta_tags_class.php on line 209

 

(This was repeated 2 more times - then)

 

Error!

 

Unable to determine the page link!

 

------

I checked with the host and the server path is correct/set correctly in the oscommerce config. Ideas?

Share this post


Link to post
Share on other sites

Okay site was upgraded to 5.2.9 - however when I applied the contribution I got the following error:

 

Warning: Attempt to retrieve an inexistant property of KissMT named basename in /export/home/pe/xxxxx.com/public_html/catalog/includes/modules/kiss_meta_tags/classes/kiss_meta_tags_class.php on line 209

 

(This was repeated 2 more times - then)

 

Error!

 

Unable to determine the page link!

 

------

I checked with the host and the server path is correct/set correctly in the oscommerce config. Ideas?

 

Not a clue, $this->basename is set on startup no reason for it not to be set. No other users have reported this so it must be a local issue.

Share this post


Link to post
Share on other sites

Not a clue, $this->basename is set on startup no reason for it not to be set. No other users have reported this so it must be a local issue.

 

 

Lovely :-) Any idea if I could force a setting of this variable to something prior to the page/load activate area? Basically override with what it should be?

 

What should it be set at? Is the variable then to be set "$this->basename" and I should be checking to see what that is set to if anything to resolve this?

Share this post


Link to post
Share on other sites

Lovely :-) Any idea if I could force a setting of this variable to something prior to the page/load activate area? Basically override with what it should be?

 

What should it be set at? Is the variable then to be set "$this->basename" and I should be checking to see what that is set to if anything to resolve this?

 

Please create a new file in your catalog root directory named kissmt_test.php

 

The file should contain the following: -

 

<?php

include_once 'includes/application_top.php';

error_reporting( ( E_ALL | E_STRICT ) & ~E_DEPRECATED );

final class KissMtTest {

private static $_singleton;
/**
* Obtain a singleton instance of the class
*/
public static function init() {
	if ( !self::$_singleton instanceof self ) {
	return self::$_singleton = new self;
	} else {
	return self::$_singleton;
	}
} // end method
/**
* Magic method to save file space
*/
public function __set( $name, $value ) {
	$this->{$name} = $value;
}

public function setup( $language, $languages_id, $breadcrumb, $request_type ) {
	$this->php_version = phpversion();
	$this->title_separator = '-';
	$this->setPaths();
	$this->basename = $this->setBaseName(); 
	$this->language = $language;
	$this->languages_id = $languages_id;
	$this->request_type = $request_type;
	$this->setBreadcrumb( $breadcrumb );
} // end method

private function setPaths() {
	$kiss_path = DIR_WS_MODULES . 'kiss_meta_tags/';
	$dynamic_path = str_replace( DIRECTORY_SEPARATOR, '/', realpath( dirname( __FILE__ ) ) );

	$path = $dynamic_path . '/' . $kiss_path;
	$this->cache_path 	= $path . 'cache/'; 
	$this->abstracts_path = $path . 'abstracts/';
	$this->modules_path	= $path . 'modules/';
	$this->includes_path = $path . 'includes/';
	$this->stopwords_path = $path . 'stopwords/';
	$this->smallwords_path = $path . 'smallwords/';
} // end method

private function privatePaths( $string ) {
	$private_path = str_replace( DIRECTORY_SEPARATOR, '/', realpath( dirname( __FILE__ ) ) );
	return str_replace( $private_path, '[PRIVATE]', $string );
}	

private function setBaseName() {
	$base = new ArrayIterator( array( 'SCRIPT_NAME', 'PHP_SELF' ) );
	while ( $base->valid() ) {
	if ( array_key_exists( $base->current(), $_SERVER ) && !empty( $_SERVER[$base->current()] ) ) {
	if ( false !== strpos( $_SERVER[$base->current()], '.php' ) ) {
	preg_match( '@[a-z0-9_]+\.php@i', $_SERVER[$base->current()], $matches );
	if ( is_array( $matches ) && ( array_key_exists( 0, $matches ) )
	&& ( substr( $matches[0], -4, 4 ) == '.php' )
	&& ( is_readable( $matches[0] ) ) ) {
	return $matches[0];
	} 
	} 
	}
	$base->next();
	}
	// Some odd server set ups return / for SCRIPT_NAME and PHP_SELF when accessed as mysite.com (no index.php) where they usually return /index.php
	if ( ( $_SERVER['SCRIPT_NAME'] == '/' ) && ( $_SERVER['PHP_SELF'] == '/' ) ) {
	return 'index.php';
	} 
	trigger_error( 'KissMT could not find a valid base filename, please inform the developer.', E_USER_WARNING );
} // end method

private function setBreadCrumb( $breadcrumb ) {
	$count = count( $breadcrumb->_trail );
	$crumb = array();
	for ( $i=0; $i<($count); $i++ ) {
	if ( $breadcrumb->_trail[$i]['title'] != HEADER_TITLE_TOP && $breadcrumb->_trail[$i]['title'] != HEADER_TITLE_CATALOG ) {
	$crumb[$i] = $breadcrumb->_trail[$i]['title'];
	}
	}
	$crumb = array_reverse( $crumb );
	$this->breadcrumb = $crumb;
} // end method

public function output() {
	echo '<pre>' . $this->privatePaths( print_r( get_object_vars( $this ), true ) ) . '</pre>';
} // end method

} // end class


KissMtTest::init()->setup( $language, $languages_id, $breadcrumb, $request_type );

KissMtTest::init()->output();

include_once 'includes/application_bottom.php';

 

Browse to the file ( www.mysite.com/kissmt_test.php ) and post the output here.

Share this post


Link to post
Share on other sites

Well this is interesting.

 

Output was:

 

Array

(

)

 

Send it to your hosts, let them try it.

Share this post


Link to post
Share on other sites

I'm sorry, but I don't follow you when you say - send it to your hosts.

 

You mean send it to the technical support team that is hosting the web server? If so I am not sure exactly what I am asking them that they could actually tell me. I guess I am only partially understanding that the session? variable should be present but not understanding what hosting/setting might possibly cause this (I am guessing there could be multiple - but an idea of one or something will probably help me explain it better)

 

Thanks so much for your help in figuring this out. I'll be sure and post the solution once resolved!

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
Sign in to follow this  

×