Lazy meta tags:)

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Sonya

Lazy meta tags:)

Post by Sonya »

I am lazy. It's a pain for me to create keywords and description meta tag for each page.

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_length - maximum characters in description meta. The description is automatically truncated at the end of word or sentence and therefore can be shorter as the value given.
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] .../>
How to use?
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 :)
Last edited by Sonya on Sun Mar 29, 2009 4:00 pm, edited 1 time in total.
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm
Location: Comox Valley, BC

Re: Lazy meta tags:)

Post by Nullig »

Excellent plugin, Sonya. I will be using this one a LOT.

Thanks
jayPjay
Forum Members
Forum Members
Posts: 70
Joined: Thu Feb 26, 2009 7:25 pm

Re: Lazy meta tags:)

Post by jayPjay »

Really really nice job  :D

Anyway to prevent that it use the tag placed in content as description?
Sonya

Re: Lazy meta tags:)

Post by Sonya »

jayPjay wrote: Really really nice job  :D

Anyway to prevent that it use the tag placed in content as description?
Thank you for your feedback, fix is released: http://dev.cmsmadesimple.org/project/files/652
nhaack

Re: Lazy meta tags:)

Post by nhaack »

That's a wonderful plug-in for lazy people like me :). I'm courious how it will perform. I will definitely play around with it this weekend and let you know if I come across any problems.

Thank you and best regards
Nils
jayPjay
Forum Members
Forum Members
Posts: 70
Joined: Thu Feb 26, 2009 7:25 pm

Re: Lazy meta tags:)

Post by jayPjay »

Sonya wrote:
jayPjay wrote: Really really nice job  :D

Anyway to prevent that it use the tag placed in content as description?
Thank you for your feedback, fix is released: http://dev.cmsmadesimple.org/project/files/652
Really really fast aswell  ;D

ps: Das ging aber sauschnell - DH   8)

Edit: German words like "rückführungen" are splited into: , also using _____ or ------ looks like this:



HTH - THX
Last edited by jayPjay on Thu Apr 09, 2009 8:27 am, edited 1 time in total.
Sonya

Re: Lazy meta tags:)

Post by Sonya »

jayPjay wrote: Edit: German words like "rückführungen" are splited into:
This seems to be a bug in search module. Are there "r&uuml", "ckf&uuml" and "hrungen" as single search words in the table cms_module_search_index? Can you please check it? If so, than please submit bug for Search module, since I just read the the keywords from this table.
jayPjay wrote: , also using _____ or ------ looks like this:

This is something about formatting. Normally you should use to display lines or something like
instead of ---------------- or ______________
jayPjay
Forum Members
Forum Members
Posts: 70
Joined: Thu Feb 26, 2009 7:25 pm

Re: Lazy meta tags:)

Post by jayPjay »

Had a look in my SQL, collation was set to latin1_swedish_ci  ???
changed it into german and now its OK.

Using I know, the persons who change the content of a page mostly not  :-\

Thx a lot once more.  :D
Sonya

Re: Lazy meta tags:)

Post by Sonya »

jayPjay wrote: Using I know, the persons who change the content of a page mostly not  :-\
I know, it's not easy, but you can teach them. There is advhr plugin in TinyMCE which can be activated, show them and tell them you would deinstall TinyMCE if they do not use . It works :)
Sonya

Re: Lazy meta tags:)

Post by Sonya »

Autometa 1.2 is released :) with support for detail view of News articles.

If the news article is displayed in detail view, keywords meta for the news article is now added automatically. For the description meta you have to open detail template of news and add

Code: Select all

{assign var="autodescription" value=$entry->summary}
or

Code: Select all

{assign var="autodescription" value=$entry->content}
at the top of template.

Tip: you would add the second example if you do not use summary field for your news.
jayPjay
Forum Members
Forum Members
Posts: 70
Joined: Thu Feb 26, 2009 7:25 pm

Re: Lazy meta tags:)

Post by jayPjay »

Hi again  ;)
On my site I dont get the description tag?
Added the {assign var="autodescription" value=$entry->summary} on top in Detail Template, also I tryed to use it with value=$entry->content" even that I do use summary field.
Sonya

Re: Lazy meta tags:)

Post by Sonya »

jayPjay wrote: Hi again  ;)
On my site I dont get the description tag?
Added the {assign var="autodescription" value=$entry->summary} on top in Detail Template, also I tryed to use it with value=$entry->content" even that I do use summary field.
Hard to say what is wrong. I can only guess:
1. You check summary page, but description is added only in detail view, not on news summary page.
2. You have added {assign var="autodescription" ... in the "false" template which is not used for your site.
3. It is a general problem with the plugin, that I am not aware of. In this case I have to get one feedback more, to see that there is not handling error.
Last edited by Sonya on Sat Apr 11, 2009 8:24 am, edited 1 time in total.
kio
New Member
New Member
Posts: 3
Joined: Tue Jun 09, 2009 8:11 am

Re: Lazy meta tags:)

Post by kio »

I placed

{assign var="autodescription" value=$entry->summary}

in my news detailed template view, but the page still displays main template description, so I have 2
descriptions now. How could I avoid such a thing?

kio
Sonya

Re: Lazy meta tags:)

Post by Sonya »

kio wrote: How could I avoid such a thing?
You should create a special content page for your news and then add detailpage="page alias" for the news call in the template.
For example, if you news page has an alias "news":

Code: Select all

{news number="3" detailpage="news"}
The page "news" should not have any description itself.
jwaldeck

Re: Lazy meta tags:)

Post by jwaldeck »

Hi Sonya!

First of, tks a lot for this amazing plugin! I've already used it with the news module and it went smooth!

But, I'd like to ask you how I should use it with CGBlog Module, any clue?! I tried to add the following to the detail view template but it didn't work: 

Code: Select all

{assign var='autodescription' value=$entry->content}
Could I be doing something wrong or is there anything else to it that I missed? I cannot send you the link because it is localhost for now, but I assure you no stupid mistake like forgetting the {autometa} tag in the template or something similar is being made.

Cheers!
jw
Locked

Return to “Modules/Add-Ons”