User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 392,063 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,219 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 17600 | Replies: 5
Reply
Join Date: Mar 2004
Location: London, Ontario, Canada
Posts: 54
Reputation: TheComputerGeek will become famous soon enough TheComputerGeek will become famous soon enough 
Rep Power: 6
Solved Threads: 5
TheComputerGeek TheComputerGeek is offline Offline
Junior Poster in Training

PHP-Nuke Tutorial #1: Altering the Header Tags

  #1  
Mar 11th, 2004
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 yourphpnukedir/includes/ folder. Here is what the meta.php looks like on install:

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

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 yourphpnukedir/includes/ folder. Here is what that file looks like upon install:

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

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.
Last edited by happygeek : Oct 28th, 2006 at 10:30 am. Reason: Formatting
=====================
If you have a question for the monthly column Computer Geek email Jeff at: geek@bizwriter.biz
Jeff Johnston is a Computer Technician for The London Transit Commission in London Ontario. He is also a writer and editor in chief of The Business of Writing

Ask The Computer Geek can be read at Families On Line Magazine
=====================

Jeff Johnston
Freelance Writer & Computer Geek Extraodinare

Editor-in-Chief
The Business of Writing

Writer
Families On-Line Magazine
NewsFactor
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jun 2004
Posts: 17
Reputation: Sideshow Bob is an unknown quantity at this point 
Rep Power: 5
Solved Threads: 0
Sideshow Bob's Avatar
Sideshow Bob Sideshow Bob is offline Offline
Newbie Poster

Re: PHP-Nuke Tutorial #1: Altering the Header Tags

  #2  
Jun 8th, 2004
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.
Reply With Quote  
Join Date: Sep 2004
Posts: 1
Reputation: nickhg is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
nickhg nickhg is offline Offline
Newbie Poster

Re: PHP-Nuke Tutorial #1: Altering the Header Tags

  #3  
Sep 8th, 2004
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
Reply With Quote  
Join Date: Dec 2004
Location: Fort Bragg, NC
Posts: 189
Reputation: mikeSQL is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 2
mikeSQL's Avatar
mikeSQL mikeSQL is offline Offline
Junior Poster

Solution Re: PHP-Nuke Tutorial #1: Altering the Header Tags

  #4  
Dec 18th, 2004
Originally Posted by SEO Bob
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:
Reply With Quote  
Join Date: Dec 2004
Location: Fort Bragg, NC
Posts: 189
Reputation: mikeSQL is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 2
mikeSQL's Avatar
mikeSQL mikeSQL is offline Offline
Junior Poster

Re: PHP-Nuke Tutorial #1: Altering the Header Tags

  #5  
Dec 24th, 2004
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. 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!
dynastyCODERS#1 when it comes to Programming Tutorials, Database designs and discussions, Operating Systems, you name it, check us out and drop us a line to tell us your opinions on any and everything in mind!;)
Reply With Quote  
Join Date: Feb 2005
Posts: 12
Reputation: Ignite is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Ignite Ignite is offline Offline
Newbie Poster

Re: PHP-Nuke Tutorial #1: Altering the Header Tags

  #6  
Feb 18th, 2005
great tut thanks alot ill try and use it on my site
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb PHP Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the PHP Forum

All times are GMT -4. The time now is 11:46 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC