Ok, let me see if I can explain this correctly... lol
Go to your Admin area and chose to edit your configure file.
At the very bottom of the configure screen you should see a text area just below this line "The following variables are unknown to the base UBB.threads package, but might be used by installed hacks or modifications to the program:"
In that text box create a variable like so:
$config['meta_tags'] = "";Ok now in your ubbt_header.tmpl file, located in your ubbthreads/templates/default directory just after the <head> tag add this:
{$config['meta_tags']}and remove this:
<title>$inputTitle - {$ubbt_lang['POWERED_BY']} UBB.threads™</title>Ok, now in your showflat.php file find this:
code:
$query = "
SELECT B_Replies,B_Counter,B_Last_Post,B_Subject,B_Rating,B_Rates,B_RealRating
FROM {$config['tbprefix']}Posts
WHERE B_Number = $current
";
$sth = $dbh -> do_query($query);
list($checkreplies,$count,$posted,$tsubject,$Rating,$Rates,$stars) = $dbh -> fetch_array($sth);
and change it to this:
code:
$query = "
SELECT B_Replies,B_Counter,B_Last_Post,B_Subject,B_Rating,B_Rates,B_RealRating,B_Body
FROM {$config['tbprefix']}Posts
WHERE B_Number = $current
";
$sth = $dbh -> do_query($query);
list($checkreplies,$count,$posted,$tsubject,$Rating,$Rates,$stars,$Body) = $dbh -> fetch_array($sth);
$metaKeywords = $tsubject;
$metaDescription = substr($Body,0,139);
$config['meta_tags'] = "<title>$tsubject</title>";
$config['meta_tags'] .= "<meta name="keywords" content="$metaKeywords" />";
$config['meta_tags'] .= "<meta name="description" content="$metaDescription" />";
In your showthreaded.php script find this:
code:
$query = "
SELECT B_Main, B_Last_Post,B_Subject,B_Rating,B_Rates,B_RealRating
FROM {$config['tbprefix']}Posts
WHERE B_Number = $Number
AND B_Board = '$Board'
";
$sth = $dbh -> do_query($query);
list ($current,$posted,$tsubject,$Rating,$Rates,$stars) = $dbh -> fetch_array($sth);
$dbh -> finish_sth($sth);
and change it to this:
code:
$query = "
SELECT B_Main, B_Last_Post,B_Subject,B_Rating,B_Rates,B_RealRating,B_Body
FROM {$config['tbprefix']}Posts
WHERE B_Number = $Number
AND B_Board = '$Board'
";
$sth = $dbh -> do_query($query);
list ($current,$posted,$tsubject,$Rating,$Rates,$stars,$Body) = $dbh -> fetch_array($sth);
$metaKeywords = $tsubject;
$metaDescription = substr($Body,0,139);
$config['meta_tags'] = "<title>$tsubject</title>";
$config['meta_tags'] .= "<meta name="keywords" content="$metaKeywords" />";
$config['meta_tags'] .= "<meta name="description" content="$metaDescription" />";
Hope this helps.
I left the meta keywords in because not all search engines are powered by google.