My lazy solution is autometa tag http://dev.cmsmadesimple.org/projects/autometa . It creates meta tags "keywords" and "description" on-the-fly (only 1 query more). Meta tags are only generated if no meta tags found in pagedata field. It will not substitute your custom meta!
Keywords for the page are taken from Search module that has to be enabled. Description includes first characters of the page content.
Plugin accepts optional parameters:
keywords - set to 0 will prevent generation of keywords meta
description - set to 0 will prevent generation of description meta.
key_number - maximum number of keywords
key_length - minimum length of keyword in characters (to prevent short words from adding to keywords)
key_density - how often is the word found in the page? E.g. is set to 4, only words which are 4 and more times are in the content are added to the keywords meta
key_add - allows to add additional keywords not depending on keywords found, e.g. {autometa key_add="cool site"} would generate meta tag
Code: Select all
<meta name="keywords" content="cool site, [keyword1], [keyword2].../>
desc_add - allows to add something before the generated description, e.g {autometa desc_add="My Company."} would generate meta tag:
Code: Select all
<meta name="description" content="My Company. [page content] .../>
Download function.autometa.php and upload to your webspace to the folder plugins. Just place {autometa} in template before or after {metadata}. See help for the tag in Extensions->Tags->autometa.
Enjoy and please tell if you have any difficulties with the lazy tags