bjuti:
This will allow you to add custom descriptions and keywords per post. If you don't add them, the site will generate them automaticly.
open mywords/post around line 170 find:
le="color: #000000"><?php //Trackback if ($post->getVar('pingstatus')) { $tb = new MWTrackback($xoopsConfig['sitename'], $editor->getVar('name')); RMTemplate::get()->add_head( $tb->rdf_autodiscover(date('r', $post->getVar('pubdate')), $post->getVar('title'), TextCleaner::getInstance()->truncate($post->content(true), 255), $post->permalink(), MWFunctions::get_url(true).$post->id(), $editor->getVar('name')) ); }
replace with this:
le="color: #000000"><?php //Trackback if ($post->getVar('pingstatus')) { $tb = new MWTrackback($xoopsConfig['sitename'], $editor->getVar('name')); RMTemplate::get()->add_head( $tb->rdf_autodiscover(date('r', $post->getVar('pubdate')), $post->getVar('title'), TextCleaner::getInstance()->truncate($post->content(true), 255), $post->permalink(), MWFunctions::get_url(true).$post->id(), $editor->getVar('name')) ); } $metaDesc=$post->get_meta('mymeta_desc',false); $Mdesc = substr($post_arr['text'], 0, 150); $Mdesc=strip_tags($Mdesc); if (empty($metaDesc)) { $xoTheme->addMeta( 'meta', 'description', $Mdesc); } else { $xoTheme->addMeta( 'meta', 'description', $metaDesc); } $metaKeys=$post->get_meta('mymeta_keys',false); if (empty($metaKeys)) { $Mkeys=preg_replace('/s/',',', $Mdesc); //replace all spaces with , $xoTheme->addMeta( 'meta', 'keywords', $Mkeys); } else { $xoTheme->addMeta( 'meta', 'keywords', $metaKeys); }
Now edit your post and ADD these 2 custom fields:
mymeta_desc -Used for description
mymeta_keys -Used for keywords