Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 7.6
Author Message
jib_intelli
Hangin' Around



Joined: Aug 17, 2004
Posts: 43

PostPosted: Sun May 22, 2005 10:32 am Reply with quote

Hi, I am using the dynametNews module, but it does not work on PHPNuke 7.6 I need help porting it. Just a small thing -

Quote:
/* DYNMETAKEYS-1.1.2 */
/* ====================== */
/* Adminmodule for phpnuke version 5.5 */
/* This file was created by Bernd Kamm (webmaster@be-ka.de) */
/* http://be-ka.de */
/* Copyright (c)2002 by Bernd Kamm, Nuernberg,FRG */
/* This Modification gives possability to generate dynamic META-TAG KEY */
/* WORDS and descriptions for news generated by article.php. */
/* This Modification is part of the new administration-module */
/* DYNMETAKEYS Version 1.1.2 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. */
/* 22.02.2002 or 2002/02/22 */
/************************************************************************/
/* Thanks to Matthias, webmaster of www.macphisto.net for his suggestions!*/
/* without his interest and ideas, this update wouldn't come as soon Wink. thank you, matthias!*/



The following code is present in the meta.php:

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

?>


The dynmeta function is supposed to pull the meta tags from the database and place them in the dynamically generated meta page. It is not pulling the data. I think I need to change the $storyid to something else. But what? I use Phpnuke 7.6

Any help will be appreciated.
 
View user's profile Send private message
kguske
Site Admin



Joined: Jun 04, 2004
Posts: 6437

PostPosted: Tue Jun 06, 2006 8:36 am Reply with quote

Did you ever get this to work?

This is an interesting concept as we consider expanding the functions of nukeSEO to include dynamic titles and META tags by module.

_________________
I search, therefore I exist...
Only registered users can see links on this board! Get registered or login!
 
View user's profile Send private message
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 7.6

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©