Quote by ByteEnable: Insert two rows into your gl_stories table of your geeklog database:
Text Formatted Code
$_CONF['meta_description'] = "The coolest website ever!";
$_CONF['meta_keywords'] = "my,keywords,rank,high,in,google";
Text Formatted Code
<META NAME="description" CONTENT="{meta_description}">
<META NAME="keywords" CONTENT="{meta_keywords}">
Text Formatted Code
<tr>
<td valign="top" align="right">Meta Desc:</td>
<td><textarea name="meta_description" cols="60" rows="2">{story_meta_description}</textarea></td>
</tr>
<tr>
<td valign="top" align="right">Meta Keywords:</td>
<td><textarea name="meta_keywords" cols="60" rows="2">{story_meta_keywords}</textarea></td>
</tr>
Text Formatted Code
$display .= COM_siteHeader ('menu', $pagetitle, $rdf,$A['meta_description'],$A['meta_keywords']);
Text Formatted Code
function COM_siteHeader( $what = 'menu', $pagetitle = '', $headercode = '',$meta_desc='',$meta_key='')
around line 579 or so add:
if ( !empty($meta_desc))
$_CONF['meta_description'] = $meta_desc;
if ( !empty($meta_key))
$_CONF['meta_keywords'] = $meta_key;
$header->set_var(meta_description,$_CONF['meta_description']);
$header->set_var(meta_keywords,$_CONF['meta_keywords']);
Text Formatted Code
$story_templates->set_var('story_meta_description',$A['meta_description']);
$story_templates->set_var('story_meta_keywords',$A['meta_keywords']);
modify the submitstory function with meta data:
function submitstory($type='',$sid,$uid,$tid,$title,$introtext,$bodytext,$hits,$unixdate,$expiredate,$comments,$featured,$commentcode,$trackbackcode,$statuscode,$postmode,$frontpage,$draft_flag,$numemails,$owner_id,$group_id,$perm_owner,$perm_group,$perm_members,$perm_anon,$delete,$show_topic_icon,$meta_description,$meta_keywords,$old_sid)
just before the DB_save call in function submitstory add:
$meta_description = addslashes($meta_description);
Modify the DB_save with the meta data:
DB_save ($_TABLES['stories'],'sid,uid,tid,title,introtext,bodytext,hits,date,comments,related,featured,commentcode,
trackbackcode,statuscode,expire,postmode,frontpage,draft_flag,numemails,owner_id,group_id,perm_owner,
perm_group,perm_members,perm_anon,show_topic_icon,in_transit,meta_description,meta_keywords', "'$sid',$uid,'$tid','$title','$introtext','$bodytext',$hits,FROM_UNIXTIME($unixdate),'$comments','$related',$featured,'$commentcode','$trackbackcode','$statuscode',FROM_UNIXTIME($expiredate),'$postmode','$frontpage',$draft_flag,$numemails,$owner_id,$group_id,$perm_owner,$perm_group,$perm_members,$perm_anon,$show_topic_icon,1,'$meta_description','$meta_keywords'");
around line 1100 or so add the meta data:
COM_applyFilter ($_POST['show_topic_icon']), <- dont add this
COM_stripslashes ($_POST['meta_description']),
COM_stripslashes ($_POST['meta_keywords']),
COM_applyFilter ($_POST['old_sid'])); <- dont add this