Hi all,

Even that PhpNuke is a popular CMS, still it has not implemented in a way that it can generate dynamic Meta keywords purchase levitra or descriptions for its pages. Fortunately, there are many modules to deal with this problem. They are easy to install, but really I can not make them run properly on my site. … No prob. I got angry and found a solution for my problem in my way.

download:

dynamic_meta_keywords_and_description_for_phpnuke

In the beginning we should understand the structure of the PhpNuke Meta generation. Just by looking on the folder (includes) you will find a file called (meta.php). That file is the one responsible for adding Meta for your site pages. blah blah blah …… jump!


Open (meta.php) find those lines:


$metastring .= “<META NAME=\”KEYWORDS\” CONTENT=\”……. “>\n”;

$metastring .= “<META NAME=\”DESCRIPTION\” CONTENT=\”…….”\”>\n”;

What we need is to replace the CONTENT value by our dynamic values.

* Dynamic KEYWORDS:

westernunion kentucky left; direction: ltr; unicode-bidi: embed;”>

First we need to download this module.

sn_dynamic_titles_addon

price cialis style=”font-size: medium;”>

After that you will need to upload (dynamic_titles.php) to (includes). Then open (header.php), find:


levitra buy medium;”>echo “<title>$sitename $pagetitle</title>\n”;

Change it to:

include(“includes/dynamic_titles.php”);

//echo “<title>$sitename $pagetitle</title>\n”;


Now open (meta.php) find this line:

$metastring .= “<META NAME=\”KEYWORDS\” CONTENT=\”……. “>\n”;


Change it to:

$metastring .= “<META NAME=\”KEYWORDS\” CONTENT=\”$newpagetitle, …any constant text….\”>\n”;

This will add the page title to the keywords of the page.

* Dynamic DESCRIPTION:

Now open (meta.php) find this line:

$metastring .= “<META NAME=\”DESCRIPTION\” CONTENT=\”…….”\”>\n”;

Change it to:

//dynamic DESCRIPTION

if ($_GET["sid"]!=”){

$dynamic_DESCRIPTION = $db->sql_fetchrow($db->sql_query(“SELECT hometext FROM “.$prefix.”_stories WHERE sid=’”.$_GET["sid"].”‘”));

$dynamic_DESCRIPTION = filter($dynamic_DESCRIPTION['hometext'], “nohtml”);

$metastring .= “<META NAME=\”DESCRIPTION\” CONTENT=\”".$dynamic_DESCRIPTION.”\”>\n”;}

else{

//it is not an article, generate the normal description.

$metastring .= “<META NAME=\”DESCRIPTION\” CONTENT=\”$newpagetitle, …any constant text….\”>\n”;

}

You may notice the word (“hometext”) in the select query. It is because PhpNuke use it to store the introduction part of the article, where the remaining text should be stored in the bodytext.

At this level, both of your site KEYWORDS and DESCRIPTION meta are dynamics.

All the best.