News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Meta board description to be used...

Started by ɔɔɔɔɔɔuɥoɾ, September 16, 2010, 12:45:53 AM

Previous topic - Next topic

ɔɔɔɔɔɔuɥoɾ

index.template.php

Code (find) Select
<meta name="description" content="', $context['page_title_html_safe'], '" />

Code (replace) Select
<meta name="description" content="', empty($context['description']) ? $context['page_title_html_safe'] : $context['description'], '" />

The above code will use the board description (if you entered it) instead of the board name. It has been helpful for me and could be for others.

If descriptions for boards are not used, the meta description will be reverted to what it does currently, uses the board name.

Good idea?
Bad idea?
Why?


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

Kindred

actually, I moved tyhis to bug reports....   because in reality, the way you  posted SHOULD be the action, if not the way, the description is handled...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

kat

Is this all versions of SMF? Or, just v2.x?

Arantor

The same change could be applied to 1.1.x. However I'd also note that $context['description'] is used in other places too.

A better solution would be have both MessageIndex.php and index.template.php use $context['meta_description'] in line with $context['meta_keywords'].

Also, if you're fixing this up, you might as well go as far as adding code to get the first post in the thread display, parse_bbc, strip_tags, and push that into the $context['meta_description'] there. (No, you can't get it as a by-product of the regular post getting; the headers have already been issued at that point. Though if you really wanted to, you could issue some kind of replace string in to the description as a placeholder, and replace it in the buffer before sending it on.

ɔɔɔɔɔɔuɥoɾ

A bug huh ???

This is supposed to happen by default?
I think their is potential for SEO improvement using this change.
I thought of this a few days ago, I asked a friend about the meta description, after a little discussion about why the meta description tag is still important for SEO (Google anyway), We got a solution, we can thank Arantor for the solution, it was discussed HERE.


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

Arantor

No.

$context['description'] is used in other places for a thing that isn't the meta description. For example in some of the administration area which doesn't need to be SEO driven whatsoever.

In any case, the meta description has little or no driving power in search engine rankings. It *can* generate an increase in click-through rates, but there is no guarantee Google or any other search engine will actually use this description if it can find a better one itself.

Arantor's description is, as I've indicated above, flawed because of the fact $context['description'] is used in places that it would be inappropriate to just use as-is. A new $context entry would be preferable to avoid unintended collisions.

ɔɔɔɔɔɔuɥoɾ

Quote from: IncognitoMuse on September 16, 2010, 04:14:16 PM
No.

$context['description'] is used in other places for a thing that isn't the meta description. For example in some of the administration area which doesn't need to be SEO driven whatsoever.

In any case, the meta description has little or no driving power in search engine rankings. It *can* generate an increase in click-through rates, but there is no guarantee Google or any other search engine will actually use this description if it can find a better one itself.

Arantor's description is, as I've indicated above, flawed because of the fact $context['description'] is used in places that it would be inappropriate to just use as-is. A new $context entry would be preferable to avoid unintended collisions.

Well I have tested it and it seems to be working fine without error, I would have to take sides with Arantor on this, he has been a Developer here I believe, If you think his coding is flawed, I would argue with him directly.

Nobody said it would be good for ranking purposes, you will have to read all the information in the discussion before making comments here.


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

Kindred

actually, I agree. The code you suggested is OK... but re-purposing something from context may indeed have unintended effects. Adding a purposefully designed context variable would be better designed.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

ɔɔɔɔɔɔuɥoɾ

#8
Arantor just took a second look, another variable would be the only way to make sure things like "You have successfully changed your account settings" are not displayed in the meta tag description.

That method works well, I will use it, hopefully it gets integrated into RC4 :)


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

James---

Is the above code in the first post still valid to create useful meta descriptions?

I am looking for a way to create a good, useful snippit for the homepage and as well
for the other pages on my forum. Please share some useful advice.

In fact, this is SEO 101 and the SMF forums should handle this perfectly without editing any code. Why is this not ready yet?
Een forum starten in 5 stappen: http://www.waardevolleartikelen.nl/?p=4 (mijn visie)

Arantor

No, the tip was never valid to create useful meta descriptions, not at any point. That's why it was in the bug reports board.

The other issue, of course, is that you actually need to be able to write the description yourself, no automated system would ever be able to write it for you. SMF 2.1 will (like in the next 10 minutes) spontaneously gain the ability to use a board's description as the meta description for that board. The rest is... problematic as I already outlined. Though note that Google themselves even admit it was never great for ranking!

shawnb61

Closing old 2.0 bugs - 2.0 is in security fixes-only at this point.
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Advertisement: