Hi all, it's my first post and I use it to share with us a little addon to the community. Sorry if my english is not really good, I'm french and all knows that french people are not specialist to speak foreign language !!!
With this little addon, you will have "dynamic" metatags.
Open header.php and add at the end of the file :
$idc=$_GET['id'];
if(isset($idc))
{
$result = mysql_query("SELECT * FROM pp_files WHERE id=$idc") or die(mysql_error());
$row = mysql_fetch_assoc($result);
$smarty->assign('title', $row['name']);
$smarty->assign('desc', $row['description']);
}
else
{
$smarty->assign('desc', 'DESCRIPTION OF YOUR SITE');
$smarty->assign('title', 'YOUR SLOGAN');
}
Open header.tpl:
Replace
<title>{$config_name|default:"PHP Director"}</title>
with
<title>{$config_name|default:"PHP Director"} - {$title}</title>
If you have no meta description add
<meta name="description" content="{$desc}" />
Now when you go to a video page, you have the title of your website with the name of the video and the meta description is the description of the video.
If you aren't on a video page, it's your general metatags which is used.