blank keywords (Bugs)

by Mark ⌂ @, UK, Thursday, December 11, 2008, 12:19 (5586 days ago)

I have searched this forum but with no success.
My keywords are blank in the meta details!
Even this forum has the same problem, there are no keywords in the meta data. I would ideally like this to be pulled from the database for the customer created pages. I'll also need to do this for the meta description as well.
I'm sure this problem must of been found by other people.

Any ideas?

Cheers,

locked
8549 views
Avatar

tags/keywords

by Alex ⌂, Thursday, December 11, 2008, 14:39 (5586 days ago) @ Mark

Hi Mark,

Any ideas?

Use Tags to specify Keywords (Look at the source of this posting).

Alex

locked
8564 views

tags/keywords

by Mark ⌂ @, UK, Thursday, December 11, 2008, 15:37 (5586 days ago) @ Alex

Ok, but I don't want people to specify tags/keywords as 99% of the people posting are not SEO experts! And I wanted a simple message board.


I had a play around and the name of sharing knowledge:

I have made this change in page.inc.php:
$page['content'] = stripslashes($data['content']); //already there
$page['keywords'] = stripslashes($data['keywords']); //new column in db called "keywords"
$page['description'] = stripslashes($data['description']); //new column in db called "description"

And then in main.tpl:
{if strlen($page.description) > 1}
<meta name="description" content="{$page.description}" />
{else}
<meta name="description" content="{$settings.forum_description|escape:"html"}" />
{/if}
{if strlen($page.keywords) > 1}
<meta name="keywords" content="{$page.keywords}" />
{else}
<meta name="keywords" content="{$keywords|default:""}" />
{/if}

This takes the values from the pages table, but if it's not a custom page, it acts as normal. Admittedly you can only add the keywords directly into the database, but it's a vast improvement.

locked
8406 views
Avatar

tags/keywords

by Alex ⌂, Thursday, December 11, 2008, 16:10 (5586 days ago) @ Mark

Ok, but I don't want people to specify tags/keywords as 99% of the people posting are not SEO experts!

That's why only admins and mods can tag postings.

Alex

locked
8330 views

tags/keywords

by Mark ⌂ @, UK, Thursday, December 11, 2008, 17:29 (5586 days ago) @ Alex

Yeah, but if you have 100+ posts a day that would be madness to go through each one to set the keywords!

I love this forum though, not slating it, just pointing out a slight issue. My work around seems to work fine for the custom pages, but I'll be investigating an automatic way of doing the posts.

Cheers

locked
8393 views

RSS Feed of thread