Hi Oliver,
First of all a BIG thank you for putting so much efford in developing a CMS! I've been looking long and hard for a suitable system, and believe this is it ;D
I'm all patched up to the latest release and all permissions are fine. However, when I enter keywords and description it does not seem to generate them in the HTML.
While I'm at it, the aliases don't seem to work either.
I think I've done everything by the book though
Any thoughts?
MTIA
PS: http://www.brightercomputing.com/cms/
Axel
Keywords and Description Meta Tags Missing
- Oliver Georgi
- Site Admin
- Posts: 9907
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
Add meta tags to phpWCMS site
You should add/replace this in the content.func.inc.php file at the last lines (around 393):
-----------------------------
Code below makes also the description meta working!!
-----------------------------
// add possible redirection code (article summary) to $block["htmlhead"];
$block["htmlhead"] = $content["redirect"]["code"].$block["htmlhead"]."\n";
// insert description meta tag if not definied
if(!stristr($block["htmlhead"], '"description"') && $content["articles"][$aktion[1]]["article_summary"]) {
$block["htmlhead"] .= '<meta name="description" content="';
$block["htmlhead"] .= html_specialchars($content["articles"][$aktion[1]]["article_summary"])."\">\n";
}
// insert keywords meta tag if not definied
if(!stristr($block["htmlhead"], '"keywords"') && $content["articles"][$aktion[1]]["article_keyword"]) {
$block["htmlhead"] .= '<meta name="keywords" content="';
$block["htmlhead"] .= html_specialchars($content["articles"][$aktion[1]]["article_keyword"])."\">\n";
}
// insert author meta tag name
$block["htmlhead"] .= '<meta name="author" content="';
$block["htmlhead"] .= html_specialchars($content["articles"][$aktion[1]]["article_username"])."\">\n";
$block["htmlhead"] .= '<meta name="publisher" content="www.tuinenvijver.nl">
<meta name="robots" content="all">
<meta name="revisit-after" content="2 weeks">
<meta name="Rating" content="General">
<meta name="Language" content="nl">
<meta name="Generator" content="http://www.added-value.nl">
<meta name="distribution" content="Global">
<meta name="Copyright" content="2004 Tuin en Vijver">';
-----------------------------
Code below makes also the description meta working!!
-----------------------------
// add possible redirection code (article summary) to $block["htmlhead"];
$block["htmlhead"] = $content["redirect"]["code"].$block["htmlhead"]."\n";
// insert description meta tag if not definied
if(!stristr($block["htmlhead"], '"description"') && $content["articles"][$aktion[1]]["article_summary"]) {
$block["htmlhead"] .= '<meta name="description" content="';
$block["htmlhead"] .= html_specialchars($content["articles"][$aktion[1]]["article_summary"])."\">\n";
}
// insert keywords meta tag if not definied
if(!stristr($block["htmlhead"], '"keywords"') && $content["articles"][$aktion[1]]["article_keyword"]) {
$block["htmlhead"] .= '<meta name="keywords" content="';
$block["htmlhead"] .= html_specialchars($content["articles"][$aktion[1]]["article_keyword"])."\">\n";
}
// insert author meta tag name
$block["htmlhead"] .= '<meta name="author" content="';
$block["htmlhead"] .= html_specialchars($content["articles"][$aktion[1]]["article_username"])."\">\n";
$block["htmlhead"] .= '<meta name="publisher" content="www.tuinenvijver.nl">
<meta name="robots" content="all">
<meta name="revisit-after" content="2 weeks">
<meta name="Rating" content="General">
<meta name="Language" content="nl">
<meta name="Generator" content="http://www.added-value.nl">
<meta name="distribution" content="Global">
<meta name="Copyright" content="2004 Tuin en Vijver">';
- Oliver Georgi
- Site Admin
- Posts: 9907
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
This is working in current release so no need to implement above scripts enhancement.
...ah sorry - have seen you choose summary field of article. That's good and not so good - summary maybe much to long for description. I think it is useful only on base of structure level. Content is delivered with every page - so no need to add it twice the time.
Oliver
...ah sorry - have seen you choose summary field of article. That's good and not so good - summary maybe much to long for description. I think it is useful only on base of structure level. Content is delivered with every page - so no need to add it twice the time.
Oliver