News:

Wondering if this will always be free?  See why free is better.

Main Menu

Auto Generate Meta Description and Keyword

Started by Rohan_, March 29, 2011, 05:42:00 AM

Previous topic - Next topic

Rohan_

Hello,

Please tell me how to make my forum auto generate meta description and keywords ?

I want the title of page in my meta description and keywords... so all pages will have their own description in meta
Proud To Be An Indian

Arantor

Yay for slowing your forum down for little or no measurable benefit... and of course you realise that the keywords and description are only going to match the content of the page rather than be anything specific and unique which would be the only way such things would possibly help you...
Holder of controversial views, all of which my own.


Rohan_

I Understand that.. but Please I want to know how to do this.. at least it will be a feature or knowledge for us.. I want to try it.. Please tell me
Proud To Be An Indian

Arantor

No, I won't. There really is absolutely no point to it.
Holder of controversial views, all of which my own.


Rohan_

Proud To Be An Indian

Illori

that has nothing to do with auto-generating anything though.

Arantor

All it does is pull the content from the page and stuff it into the meta headers, which doesn't help you - and would need to be rewritten for 1.1.

You might also find a recent blog article from me of interest about SEO in general: http://innovatenotimitate.com/?p=158 (yes, shameless plug, sorry)
Holder of controversial views, all of which my own.


Rohan_

@arantor

I want the same thing which this mod does... are there any easy changes in this mod to be able to use in 1.1.13 ? Please help me
Proud To Be An Indian

Arantor

No, as I just told you in the mod's thread it needs to be rewritten. In any case it relies on other changes that are in 2.0 by default which means it's not even as simple as rewriting the $smcFunc call.
Holder of controversial views, all of which my own.


Rohan_

currently when i see the source of this page i see the title of this topic in meta description... SMF's official board have this auto meta description thing itself

can I just have this feature ? I have same description for all the pages and i don't like it :( it will be good if the description will be the title of the page..

can we take any ideas from this mod ?
http://custom.simplemachines.org/mods/index.php?mod=2129
Proud To Be An Indian

Illori

any features in smf 2.0 [this forum] most likely would need a new mod to add it to 1.1.1* or it will not be seen there. you have been told this would not be easy for the feature you want, so either you upgrade or you dont get what you want.

Arantor

Quotecurrently when i see the source of this page i see the title of this topic in meta description... SMF's official board have this auto meta description thing itself

That's because 2.0 does that by default. Remember when I said that the mod relied on things in 2.0? That's one of them.
Holder of controversial views, all of which my own.


Rohan_

#12
i just used this mod

http://custom.simplemachines.org/mods/index.php?mod=2129

and edited the keyword with description and hurrey it's taking description from the title.. but in description i see that spaces are replaced by commas... is there any way to undo this ?

the code was

Find

<meta name="keywords" content="PHP, MySQL, bulletin, board, free, open, source, smf, simple, machines, forum" />

Replace With

';
//Begin Of AutoKeywords

$keystring = str_replace(' ', ',', trim($context['page_title']));
echo '<meta name="keywords" content="', $keystring, '" />';

//End Of AutoKeywords
echo '


EDIT:

i changed this
$keystring = str_replace(' ', ',', trim($context['page_title']));

with this

$keystring = trim($context['page_title']);

and the commas are gone now... just tell me is this code is okay ? the final code i am using is

';
//Begin Of AutoKeywords

$keystring = trim($context['page_title']);
echo '<meta name="description" content="', $keystring, '" />';

//End Of AutoKeywords
Proud To Be An Indian

Arantor

Considering that the whole definition of meta keywords is a list of *KEY* *WORDS* based on the content, you are already doing it wrong. The whole point is not to include the title or page content in the list of key words unless they're words directly related to the content of the page - stuffing the forum title or page title when it doesn't really apply to the content into the keywords will at best do nothing and at worst penalise you.

Honestly, the entire concept of trying to search-engine-optimise a forum is pointless.
Holder of controversial views, all of which my own.


Rohan_

@Arantor if it's that bad then why SMF's official forum is using page titles as their meta description ??

I am not talking about keywords.. kick out the keywords.. I know keywords are no more used by big search engines like google..

But Description ? is it good to have different description for all pages matching with them or it's better to have same meta description in thousands of search results of google ?
Proud To Be An Indian

Arantor

Please, read everything I type, before replying. SMF's official forum is a largely unmodified 2.0. 2.0 does that as standard, mostly because however many years ago when that code was written for 2.0, search engines were using it. But 2.0 was started 5 years ago... and the search engines moved on.

Google is quite capable of finding the actual content from the page instead of using the meta description as evidenced by searches that apply to this site. Go on, try it.
Holder of controversial views, all of which my own.


Rohan_

Finally.... Just tell me if it's fine..

I did another change by seeing the SMF 2's index.template.php file

I replaced my meta description with this

<meta name="description" content="', $context['page_title'], '" />

is it fine for the 1.1.3 forum or not ? will this cause any errors ?
Proud To Be An Indian

Arantor

Holder of controversial views, all of which my own.


Rohan_

well..... It was a simple and very easy solution :)
Proud To Be An Indian

Arantor

Sure, it was an easy solution, except that it 1) wasn't what you asked for, 2) doesn't solve the 'problem' anyway.
Holder of controversial views, all of which my own.


Advertisement: