Intro

PHP-Nuke comes preloaded with a lot of metatag information, however the keywords pre-installed are not likely to be very useful for your site. The keywords are keywords that are for a PHP-Nuke information site so unless that is what you are creating you will want to change the metatag information. You may also wish to alter the header information codes, i.e. anything that comes between the <head> and </head> tags. PHP-Nuke v7 does not have an administrator module to alter these settings on the fly, however changing them is not all that difficult.

Metatags

The metatag information is stored in the meta.php file that resides in the [i]yourphpnukedir[/i]/includes/ folder. Here is what the meta.php looks like on install:

<?php
/************************************************************************/
/* PHP-NUKE: Web Portal System */
/* =========================== */
/* */
/* Copyright (c) 2002 by Francisco Burzi */
/* [url="http://phpnuke.org/"]http://phpnuke.org[/url] */
/* */
/* 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. */
/************************************************************************/
if (eregi("meta.php",$_SERVER['PHP_SELF'])) {
Header("Location: ../index.php");
die();
}

##################################################
# Include for Meta Tags generation #
##################################################
echo "<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html;
charset="._CHARSET."\">\n";
echo "<META HTTP-EQUIV=\"EXPIRES\" CONTENT=\"0\">\n";
echo "<META NAME=\"RESOURCE-TYPE\" CONTENT=\"DOCUMENT\">\n";
echo "<META NAME=\"DISTRIBUTION\" CONTENT=\"GLOBAL\">\n";
echo "<META NAME=\"AUTHOR\" CONTENT=\"$sitename\">\n";
echo "<META NAME=\"COPYRIGHT\" CONTENT=\"Copyright (c) 2003 by $sitename\">\n";
echo "<META NAME=\"KEYWORDS\" CONTENT=\"News, news, New, new, Technology, technology, Headlines, headlines, Nuke, nuke, PHP-Nuke, phpnuke, php-nuke, Geek, geek, Geeks, geeks, Hacker, hacker, Hackers, hackers, Linux, linux, Windows, windows, Software, software, Download, download, Downloads, downloads, Free, FREE, free, Community, community, MP3, mp3, Forum, forum, Forums, forums, Bulletin, bulletin, Board, board, Boards, boards, PHP, php, Survey, survey, Kernel, kernel, Comment, comment, Comments, comments, Portal, portal, ODP, odp, Open, open, Open Source, OpenSource, Opensource, opensource, open source, Free Software, FreeSoftware, Freesoftware, free software, GNU, gnu, GPL, gpl, License, license, Unix, UNIX, *nix, unix, MySQL, mysql, SQL, sql, Database, DataBase, Blogs, blogs, Blog, blog, database, Mandrake, mandrake, Red Hat, RedHat, red hat, Slackware, slackware, SUSE, SuSE, suse, Debian, debian, Gnome, GNOME, gnome, Kde, KDE, kde, Enlightenment, enlightenment, Interactive, interactive, Programming, programming, Extreme, extreme, Game, game, Games, games, Web Site, web site, Weblog, WebLog, weblog, Guru, GURU, guru, Oracle, oracle, db2, DB2, odbc, ODBC, plugin, plugins, Plugin, Plugins\">\n";
echo "<META NAME=\"DESCRIPTION\" CONTENT=\"$slogan\">\n";
echo "<META NAME=\"ROBOTS\" CONTENT=\"INDEX, FOLLOW\">\n";
echo "<META NAME=\"REVISIT-AFTER\" CONTENT=\"1 DAYS\">\n";
echo "<META NAME=\"RATING\" CONTENT=\"GENERAL\">\n";
###############################################
# DO NOT REMOVE THE FOLLOWING COPYRIGHT LINE! #
# YOU'RE NOT ALLOWED TO REMOVE NOR EDIT THIS. #
###############################################
// IF YOU REALLY NEED TO REMOVE IT AND HAVE MY WRITTEN AUTHORIZATION CHECK: http://phpnuke.org/modules.php?name=Commercial_License
// PLAY FAIR AND SUPPORT THE DEVELOPMENT, PLEASE!
echo "<META NAME=\"GENERATOR\" CONTENT=\"PHP-Nuke $Version_Num - Copyright 2003 by http://phpnuke.org\">\n";
?>

In order to customise your keywords you merely have to alter the echo "<META NAME=\"KEYWORDS\" CONTENT=\" line. Put in the keywords that your site will be using. You can change any other metatag information on this screen as well, but strictly speaking it is not necessary the preloaded metatags are probably ok for your site.

Other header tags

All other header tags belong in the my_header.php file, which is also in [i]yourphpnukedir[/i]/includes/ folder. Here is what that file looks like upon install:

<?php
/************************************************************************/
/* PHP-NUKE: Web Portal System */
/* =========================== */
/* */
/* Copyright (c) 2002 by Francisco Burzi */
/* [url="http://phpnuke.org/"]http://phpnuke.org[/url] */
/* */
/* 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. */
/************************************************************************/
/* 

This file is to customize whatever stuff you need to include in your site when the header loads. This can be used for third party banners, custom javascript, popup windows, etc. With this file you don't need to edit system code each time you upgrade to a new version. Just remember, in case
you add code here to not overwrite this file when updating!

Whatever you put here will be between <head> and </head> tags.
*/
?>

This file is blank to begin with, however if you want to add anything too your page that should be written between the header tags this is where it would be placed. For example if you wanted to include a favicon line it would look like this:

echo '<LINK REL="SHORTCUT ICON" HREF="http://www.yoursite.com/favicon.ico">';

Notice the single quotes around the echo statement so that you can use double quotes within the LINK REL tag. It is crucial that you do not use the same quote styles for both the tag and the echo.

Recommended Answers

All 5 Replies

ComputerGeek,

do you have any experience in making the meta-tags dynamic in php-nuke? From a search engine standpoint, it's bad form to have the keywords static on every page - they should be unique and reflect the content that is actually on the page instead of site wide.

when I was first Nuke'ing I had this problem :

search engines want unique pages , they want unique meta tags for keywords and description.

hacking the meta.php in Nuke is fine if you want a set of keywords and description to run through every page on your new site i.e. mysite,its, great
and "my site is great and you should go and see it now "

but search engines want variety and for this reason I was stumped ! So I found a module that sort of did the job and I hacked it so it would incorporate both Nuke news stories and the content pages

it's been implemented on a number of my sites and works well , it's very easy to add and edit keywords from the admin panel.

The forum on this addon
http://www.voice-changer.net/seo/forum6.html
The Download
http://www.voice-changer.net/seo/downloads-file-3.html
The main site http://www.voice-changer.net/seo/index.html

ComputerGeek,

do you have any experience in making the meta-tags dynamic in php-nuke? From a search engine standpoint, it's bad form to have the keywords static on every page - they should be unique and reflect the content that is actually on the page instead of site wide.

I am and I can say that Jeff is correct on this too. I also can say that I know for a fact that it works great as well. You shuold try it!

Also would like Jeff to post this tutorial on my site if he is up to it. :cheesy:

Oh and btw, just upgrade and that will be taken care of. You can also see that in other versions such as yours, compare it to the new veersion like 7.5, it has no diffrences. So meaning theyve fixed that problem in 7.6x. HOwever, this wasent done in YOURTHEME/header.html or header.php, it wa altered somewhere else. :D I ust thought about that th e other day and had to come back and post. Cant tell me anything new about PHPNuke. Infact, many people are loosing intrest in it as we speak like myself. SMILE!

great tut thanks alot ill try and use it on my site

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.