Code:<?php
/************************************************************************/
/* PHP-NUKE: Web Portal System */
/* =========================== */
/* */
/* Copyright (c) 2001 by Francisco Burzi (fbc@mandrakesoft.com) */
/* http://phpnuke.org */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/************************************************************************/
/************************************************************************/
/* Additional Disclaimer: DYNMETAKEYS-1.1.2 */
/* ====================== */
/* This file was modificated by Bernd Kamm (webmaster@be-ka.de) */
/* http://be-ka.de */
/* For the modifications: Copyright (c)2002 by Bernd Kamm, Nuernberg,FRG*/
/* This Modification gives possability to generate dynamic META-TAG KEY */
/* WORDS and MEATE - description for news generated by article.php. */
/* This Modification is part of the new administration-module */
/* DYNMETAKEYS Version 1.1 made by Bernd Kamm. This new Admin-Module is */
/* build as a tribute to the great work of Francisco Burzi. */
/* These new Admin-Module: DYNMETAKEYS Version 1.1 is free software. */
/* You can redistribute it and/or modify it under the terms of the */
/* GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/* Modifications are marked by comments: "//mod beka" */
/* DYNMETAKEYS is part of a new phpnukemodule for building static pages */
/* with phpnuke - first release of the complete Module march 2002, stay */
/* tuned ;-) or register at http://be-ka.de for information */
/************************************************************************/
/*}
else
{
if ($name!="Content") include("includes/meta.php");
}
*/
//static or dynmaic keywords?
global $dynkeys, $metatime, $description, $date, $name;
//mod dynamic metakeys
//statkeys here you must insert your STATIC META-Keywords:
$statkeys = "Harry Potter, Half-blood Prince, Halfblood Prince, Half blood, goblet of fire movie, books, harry potter books, prisoner of azkaban, chamber of secrets, pottersrealm, jk rowling, movie news, book updates, deluxe edition of HBp, HBP, Order of the phoenix, fanfiction, fan art, image galleries, hp avatars, harry potter and the goblet of fire movie stills,harry,potter,hermione,granger,ron,weasley,draco,malfoy,jkr,rowling,philosopher's,sorcerer's,chamber,azkaban,goblet,phoenix,half-blood,hogwarts,gryffindor,slytherin,hufflepuff,ravenclaw,radcliffe,watson,grint,felton, half, blood, prince, half-blood, pure, pureblood, half-blood prince";
// actual date in the Meta name=Date, if you don't like uncomment meta tage date above//
$metatime = date("Y-m-d")."T". date("H:i:s");
if ($name=="Content") {include("includes/metapages.php");
}
else
{
dynmeta();
if (!$dynkeys){
$metakeys = $statkeys;
}
else {
$metakeys = ereg_replace("\n", "", $dynkeys);
}
//static or dynamic description
if (!$description){
$description = "Harry Potter fansite with news, movie trailer downloads, avatars, infos, image galleries and a huge dynamic forums community.";
}
else {
$description = ereg_replace("\n", "", $description);
}
//actual date or article date
if (!$date){
$datetime = $metatime;
}
else {
$datetime = ereg_replace(" ", "T", $date);
}}
//end mod
echo "<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset="._CHARSET."\">\n";
//change to your language - de, it, fr, ru, bg, etc=
echo "<META HTTP-EQUIV=\"Content-Language\" CONTENT=\"en\">\n";
echo "<META HTTP-EQUIV=\"EXPIRES\" CONTENT=\"0\">\n";
//mod by beka new METATAG DATE!
echo "<META NAME=\"DATE\" CONTENT=\"$datetime\">\n";
// end mod
echo "<META NAME=\"RESOURCE-TYPE\" CONTENT=\"DOCUMENT\">\n";
echo "<META NAME=\"DISTRIBUTION\" CONTENT=\"GLOBAL\">\n";
echo "<META NAME=\"AUTHOR\" CONTENT=\"Jibran\">\n";
echo "<META NAME=\"COPYRIGHT\" CONTENT=\"Copyright (c) 2005 by $sitename\">\n";
// mod beka var $metakeys
echo "<META NAME=\"KEYWORDS\" CONTENT=\"$metakeys\">\n";
// mod beka dynamic description
echo "<META NAME=\"DESCRIPTION\" CONTENT=\"$description\">\n";
//end mod
echo "<META NAME=\"ROBOTS\" CONTENT=\"INDEX, FOLLOW\">\n";
echo "<META NAME=\"REVISIT-AFTER\" CONTENT=\"1 DAYS\">\n";
echo "<META NAME=\"RATING\" CONTENT=\"GENERAL\">\n";
echo "<META NAME=\"GENERATOR\" CONTENT=\"PHP-Nuke $Version_Num\">\n";
//mod beka
function dynmeta(){
//-------------------------------------------------------
// selects keywords and description from table metakeys
// selects article Date/time from table stories
global $prefix, $dbi, $dynkeys, $description, $date;
$remote = getenv ("REMOTE_ADDR");
$uri = getenv ("REQUEST_URI");
//echo "remote: $remote,<br>\n"
//."uri: $uri<br>\n";
if (eregi("article([0-9]{1,5}).html",$uri,$regs)){
//debug
//echo "<b>debug all true!</b><br><br>\n";
//echo "regs1: $regs[1]<br>\n";
$storyid = $regs[1];
$result = sql_query("select keywords, description from $prefix"._metakeys." WHERE storyid='$storyid'", $dbi);
while(list($dynkeys, $description) = sql_fetch_row($result, $dbi)){
$result2 = sql_query("select time from $prefix"._stories." WHERE sid='$storyid'", $dbi);
while(list($date) = sql_fetch_row($result2, $dbi)){
return $date;
return $dynkeys;
return $description;
}
}
}
} //ende func
?>
|