WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-08-2004, 03:43 PM
spiderbait's Avatar
WebProWorld Pro
 

Join Date: Oct 2003
Location: Gibsons, BC, Canada
Posts: 275
spiderbait RepRank 2
Default PHPNuke & SEO (unique meta & title tags)

I'm looking for some helpful suggestions.

I'm trying to help someone to improve the SEO of their PHPNuke web site. (As a disclaimer, I have never managed a PHPNuke site or done any PHP scripting).


I'm not concerned about the variables in URLs, it's the META and TITLE tags that I'd like address.

I'll summarize the questions:
  1. Is it possible to specify unique <META>, <TITLE> and even <H> Tags on a page by page basis using PHPNuke?
  2. If it's not possible, is there a comparable CMS that would allow this level of SEO and that would allow an easy upgrade/migration from PHPNuke to the new system?

Background:
Apparently my client (his webmaster has only learned PHPNuke by playing with this site) says that he doesn't think it's possible to specifiy unique META and TITLE tags that can be generated uniquely & dynamically depending on the page content.

I did some research and found a module (DYNMETAKEYS-1.1.2) that can be added that is supposed to allow exactly that, although it specifies it will only "generate dynamic META-TAG KEYWORDS and descriptions for news generated by article.php". Obviously, this implies it will only be helpful for that particular sort of content.

I'll be very grateful to anyone who can give us some suggestions.
__________________
Jade Burnside, Ahead of the Web
What good is your web site if no one can find it?
SEO & Optimized Web Site Design
Reply With Quote
  #2 (permalink)  
Old 07-08-2004, 04:41 PM
WebProWorld 1,000+ Club
 

Join Date: Sep 2003
Location: Texas
Posts: 1,283
flood6 RepRank 0
Default PHPNuke

When it comes to php, nearly anything is possible.

I use Nuke from time to time, my old site was with PHPNuke.

I did some custom work with it so that the "Content" pages (i'm talking module here) had extra fields under the "Signature" field. The fields were "Keywords" and "Description". Then you modify the database to accomidate the appropriate fields. I just input what I wanted for those fields like any other. I think I also had it set so that the title was automatically added to the keywords listed.

I set the pages title to be pulled from Nuke's "Title" field on the content page (know what I mean?...I think it just says "Content - SiteName by default").

Anyway, you can see what I mean at www.new.divergentlines.com

Look at the pages and you'll see the titles and meta tags change.

To do this dynamically, you could make some php script to take every word over 3 letters in the first 100 charactors and stick them in the keywords tag. I don't exactly know the best way to do it, but I'm sure it's possible.

For a dynamic description you could also do something like "This page is about xxx. MySite is super cool." where "xxx" is the title variable. This would crank out very similar description tags for each page, but it would be done without the need to input extra data.

Let me know if you want to see how I modified the "Content" module's index.php.

Also, if you're new to Nuke, make sure you check out www.nukecops.com I think it recently changed owners, but it used to have the best info about PHPNuke.

Make sure you secure the site. Because Nuke is so popular it is a big target for hacks; most sites share the same vulnerabilities. I posted my story a few months ago on another forum here.

If I was unclear about anything, let me know.
Reply With Quote
  #3 (permalink)  
Old 07-08-2004, 06:42 PM
WebProWorld 1,000+ Club
 

Join Date: Jul 2003
Location: Toronto, Canada
Posts: 2,193
cyanide RepRank 0
Default

I think flood6 has pretty much summed up what you need to do, spiderbait.

However, if I can throw in my 2 cents.
There is a cms that I've been playing around with quite a bit lately. mambo Dumb name, but I quite like it.

It doesn't have all the features/modules that the nukes have, but it does have some nice features and I found that it has a bit more jump than the nukes, speed-wise.
And, you can hack it a bit so that title, description tags can be modified.
__________________
|
Web Hosting Guru
| Need Help For Your Forum?
Reply With Quote
  #4 (permalink)  
Old 07-08-2004, 07:10 PM
ronniethedodger's Avatar
WebProWorld 1,000+ Club
 

Join Date: Aug 2003
Location: Central US
Posts: 1,581
ronniethedodger RepRank 0
Default

Jade - It appears that you want to "manually" manage the descriptions and keywords, since you mentioned you wanted to improve the SEO aspects of it. Dynamically creating them is kind of iffy stuff, and would take a sophisticated module to parse the content to come up with something suitable IMO.

Therefore you would have to do what Flood6 suggested and tack on two extra datafields in your database and provide a method of inputing that data. You could autopopulate these fields however using some form of dynamic generation based on the title and first paragraph of content. This would allow you to easily edit those fields to tweak on that data little if it is somewhat suitable.

I know how it could be done in phpBB (not too familular with Nuke -- dirty word around those folks...hehehe) so I can only talk in generalities.

The code for this should be written more as an include to provide functions for all of your modules (I think that is the term you guys are using). Anything that requires a Title to be input, should also require the description and keywords as well. It could be rigged to auto-populate (and hide) those fields for anyone who is below a certain user-level if you want. I guess it would depend on who is submitting the content.

Some stock keyword lists could be defined for specific areas of the site or categories also. This might be an easier way to deal with it overall. Possibly develop a whole list of possible keywords or terms you want to rank for then compare that against the content -- if it finds a match, then it gets included in the keyword meta. This is a pretty simplistic approach and you probably could adapt the functions that are used for highlighting acronyms or bleeping bad words (just revise what action to take after the match is found).

The description should start with the Title. All admin, moderator, and to some extent the users themselves could be "educated" to write strong Titles to begin with. If successful, you would have half the battle won in that it would also make for a good start to the description meta. If you use the keyword list as described above -- it could also be used to append stock keyword 'natural' sentences to this title depending on certain densities.

Since you are not able to do the coding yourself (it seems) you will probably need to hook up with someone who can implement this for you (like Flood6 ... hint, hint). I would imagine if you make a decent enough hack out of it, you could release it to the community. Good hacks of this type will come back to you in tons of link popularity if handled right.
Reply With Quote
  #5 (permalink)  
Old 07-08-2004, 07:32 PM
ronniethedodger's Avatar
WebProWorld 1,000+ Club
 

Join Date: Aug 2003
Location: Central US
Posts: 1,581
ronniethedodger RepRank 0
Default

Quote:
Originally Posted by cyanide
There is a cms that I've been playing around with quite a bit lately. mambo Dumb name, but I quite like it.

It doesn't have all the features/modules that the nukes have, but it does have some nice features and I found that it has a bit more jump than the nukes, speed-wise.
And, you can hack it a bit so that title, description tags can be modified.
You should give Drupal a look see. You can test drive it at http://www.opensourcecms.com/ and other CMS software, including full access to the Admin panels.

Drupal handles the description, keyword metas as well as spider-friendly Urls. It has a large backing of hackers behind it that I found pretty impressive. A list of plug-in modules can be found here http://drupal.org/project/releases

One key thing that is going on in the new release of phpBB version 2.2 (no release date yet) is the ability to interface it with other CMS such as Drupal. There will be an API incorporated in this release to effect it. Right now, it is somewhat kludgy but doable. Drupal does have a forum module though ... so it has not been much of an issue.

If you want to compare specific features of different CMS side by side ... visit http://www.cmsmatrix.org/
Reply With Quote
  #6 (permalink)  
Old 07-15-2004, 11:46 AM
spiderbait's Avatar
WebProWorld Pro
 

Join Date: Oct 2003
Location: Gibsons, BC, Canada
Posts: 275
spiderbait RepRank 2
Default Thank to everyone

You've all been great with your responses and I really appreciate that you took the time to provide such thoughtful and intelligent feedback.

I probably wasn't as clear as I could have been in my original question. So, in case it makes any difference or if there's something additional anyone can add, here's a redefinition.

By dynamically generating the META tags, I didn't mean that they would be created automatically from the content of the page.

I was really meaning what you have all hinted at, which is to create new fields that the site owner (and only the site owner) could complete using his own explicitly crafted META tag content on a page by page basis.

It doesn't seem that PHP Nuke comes with that capacity built in, so I was looking for advice/suggestions about how to add that capacity. The default setup seems to be that it has just one source for META tags that reside in a separate file and it uses them identically on every page.

I hope that clarifies my question.

Thanks again to everyone who responded, and thanks in advance to anyone who wants to add more based on my redefinition.

Cheers,
__________________
Jade Burnside, Ahead of the Web
What good is your web site if no one can find it?
SEO & Optimized Web Site Design
Reply With Quote
  #7 (permalink)  
Old 07-15-2004, 12:33 PM
WebProWorld 1,000+ Club
 

Join Date: Sep 2003
Location: Texas
Posts: 1,283
flood6 RepRank 0
Default PHPNuke

Here's a few snippets of what I did. It was a while ago, so expect some less-than-great code. Anyway, I think this is most of the code I modified to get this to work.

In "Content/index.php":

Code:
$index = 1;
require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
get_lang($module_name);
$sql = "SELECT * FROM ".$prefix."_pages WHERE pid='$pid'";
$result = $db->sql_query($sql);
$mypage = $db->sql_fetchrow($result);
$pagetitle = "$mypage[title] ::";
$keywords = "$mypage[keywords]";
$metadescription = "$mypage[metadescription]";
In "includes/meta.php":

Code:
if ($keywords == "") {
	echo "<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset="._CHARSET."\">\n";
	echo "<META NAME=\"RESOURCE-TYPE\" CONTENT=\"DOCUMENT\">\n";
	echo "<META NAME=\"KEYWORDS\" CONTENT=\"Divergent Lines website design ecommerce internet consulting\">\n";
	echo "<META NAME=\"DESCRIPTION\" CONTENT=\"Divergent Lines owns and operates eCommerce sites, offers custom website design, and provides consulting to internet-based businesses.\">\n";
	echo "<META NAME=\"RATING\" CONTENT=\"GENERAL\">\n";
} else {
	echo "<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset="._CHARSET."\">\n";
	echo "<META NAME=\"RESOURCE-TYPE\" CONTENT=\"DOCUMENT\">\n";
	echo "<META NAME=\"KEYWORDS\" CONTENT=\"$keywords $pagetitle\">\n";
	echo "<META NAME=\"DESCRIPTION\" CONTENT=\"$metadescription\">\n";
	echo "<META NAME=\"RATING\" CONTENT=\"GENERAL\">\n";	
}
In "admin/modules/content.php

Code:
echo ""._CSUBTITLE.":
"
        ."<input type=\"text\" name=\"subtitle\" size=\"50\">

"
        .""._HEADERTEXT.":
"
        ."<textarea name=\"page_header\" cols=\"60\" rows=\"10\"></textarea>

"
        .""._PAGETEXT.":
"
        ."<font class=\"tiny\">"._PAGEBREAK."</font>
"
        ."<textarea name=\"text\" cols=\"60\" rows=\"40\"></textarea>

"
        .""._FOOTERTEXT.":
"
        ."<textarea name=\"page_footer\" cols=\"60\" rows=\"10\"></textarea>

"
        .""._SIGNATURE.":
"
        ."<textarea name=\"signature\" cols=\"60\" rows=\"5\"></textarea>

"
        ."Meta KeyWords:
"
        ."<textarea name=\"keywords\" cols=\"60\" rows=\"5\"></textarea>

"
        ."Meta Description:
"
        ."<textarea name=\"metadescription\" cols=\"60\" rows=\"5\"></textarea>

";
and

Code:
echo ""._CSUBTITLE.":
"
        ."<input type=\"text\" name=\"subtitle\" size=\"50\" value='$mypages[subtitle]'>

"
        .""._HEADERTEXT.":
"
        ."<textarea name=\"page_header\" cols=\"60\" rows=\"10\">$mypages[page_header]</textarea>

"
        .""._PAGETEXT.":
"
        ."<font class=\"tiny\">"._PAGEBREAK."</font>
"
        ."<textarea name=\"text\" cols=\"60\" rows=\"40\">$mypages[text]</textarea>

"
        .""._FOOTERTEXT.":
"
        ."<textarea name=\"page_footer\" cols=\"60\" rows=\"10\">$mypages[page_footer]</textarea>

"
        .""._SIGNATURE.":
"
        ."<textarea name=\"signature\" cols=\"60\" rows=\"5\">$mypages[signature]</textarea>

"
        ."Meta KeyWords:
"
        ."<textarea name=\"keywords\" cols=\"60\" rows=\"5\">$mypages[keywords]</textarea>

"
        ."Meta Description:
"
        ."<textarea name=\"metadescription\" cols=\"60\" rows=\"5\">$mypages[metadescription]</textarea>

";
and

Code:
function content_save($title, $subtitle, $page_header, $text, $page_footer, $signature, $keywords, $metadescription, $clanguage, $active, $cid) {
    global $prefix, $dbi;
    $text = stripslashes(FixQuotes($text));
    $title = stripslashes(FixQuotes($title));
    $subtitle = stripslashes(FixQuotes($subtitle));
    sql_query("insert into ".$prefix."_pages values (NULL, '$cid', '$title', '$subtitle', '$active', '$page_header', '$text', '$page_footer', '$signature', '$keywords', '$metadescription', now(), '0', '$clanguage')", $dbi);
    Header("Location: admin.php?op=content");
}
and

Code:
function content_save_edit($pid, $title, $subtitle, $page_header, $text, $page_footer, $signature, $keywords, $metadescription, $clanguage, $active, $cid) {
    global $prefix, $dbi;
    $text = stripslashes(FixQuotes($text));
    $title = stripslashes(FixQuotes($title));
    $subtitle = stripslashes(FixQuotes($subtitle));
    sql_query("update ".$prefix."_pages set cid='$cid', title='$title', subtitle='$subtitle', active='$active', page_header='$page_header', text='$text', page_footer='$page_footer', signature='$signature', keywords='$keywords', metadescription='$metadescription', clanguage='$clanguage' where pid='$pid'", $dbi);
    Header("Location: admin.php?op=content");
}
Then I added "keyword" and "metadescription" fields to nuke_pages in the database.

Also on non-content modules I added modded the respective "index.php"'s like this:

Code:
require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
$pagetitle = "Estimate :: ";
get_lang($module_name);
The site is based on Nuke 6.5. Again, you can see it at www.new.divergentlines.com the site was just uprooted and moved so expect some broken images and links.

I hope that is what you were looking for.
Reply With Quote
  #8 (permalink)  
Old 07-15-2004, 03:57 PM
spiderbait's Avatar
WebProWorld Pro
 

Join Date: Oct 2003
Location: Gibsons, BC, Canada
Posts: 275
spiderbait RepRank 2
Default Re: PHPNuke

Quote:
Originally Posted by flood6
Here's a few snippets of what I did. It was a while ago, so expect some less-than-great code. Anyway, I think this is most of the code I modified to get this to work.

I hope that is what you were looking for.
That's terrific Flood, I think that's exactly what is needed. Thank you very much for such an explicit response.

You're great.
__________________
Jade Burnside, Ahead of the Web
What good is your web site if no one can find it?
SEO & Optimized Web Site Design
Reply With Quote
  #9 (permalink)  
Old 07-15-2004, 07:54 PM
ronniethedodger's Avatar
WebProWorld 1,000+ Club
 

Join Date: Aug 2003
Location: Central US
Posts: 1,581
ronniethedodger RepRank 0
Default Re: Thank to everyone

Quote:
Originally Posted by spiderbait
I was really meaning what you have all hinted at, which is to create new fields that the site owner (and only the site owner) could complete using his own explicitly crafted META tag content on a page by page basis.

It doesn't seem that PHP Nuke comes with that capacity built in, so I was looking for advice/suggestions about how to add that capacity. The default setup seems to be that it has just one source for META tags that reside in a separate file and it uses them identically on every page.
That will make it easier! ;0)

I can only talk from phpBB experience, not the Nuke. But I do think a lot of Nuke code is lifted from phpBB, so some of this may make sense.

When you are referring to the META in Nuke, are you referring to the variable in the templates with the brackets around it {META} ??? If so, that is progmatically created -- it is not derived from a table. That META creates the Mozilla < link > metas which is supported by certain browsers for site navigation. You can visually see these if you do a view source of the page, and there are a ton of them in the Head section of the page.

I am going to change what I said by adding this to a specific table. You should create your own META table, much like POLLS have their own table and then they are related to the THREAD table by thread_id.

The reason is that you can have several places you will want to edit metas besides threads. You have FAQ page, Main Index, Forum Index, etc.

Create the table with at least these basic columns:
  • meta_id (primary key - autonumber field)
    page_type (small integer)
    thread_id (same type as what is used in THREAD table)
    meta_title
    meta_desc (varchar field)
    meta_keyword (varchar field)

The thread_id will be used only if page_type is topic. I am adding in the meta_title, because if you are going to the others you might as well do this one also (it is THE most important part of the page). Some posters will write in funky topic titles like "Please help me!!!"...follow?

The meta_fields are of data type varchar[x] where x is the maximum allowed characters you want for these columns. You might want to set that to what he going rate is now (I think it is 65, 200, 200 for Title, Keywords, Description which is what gets bantied around. Or make it what you feel they should be (and perhaps pad them with some extra space too)

In your constants.php (or equiv) you will want to define some constants for the Page Type. You may quickly look thru this file, for phpBB does have page types defined for session handling -- Nuke will probably have the same equiv (learn them if they do). In phpBB they define page types for index, login, search, register, profile, viewonline, etc.

Now the fun part!!

You are going to attach the input of the metas much the same way a user can attach a poll to a thread.

Look inside of your /includes directory for a file that may be named something like functions_post.php. This file also handles the editing of posts, and it also has code to identify if it is the first post. This is where you will also find the poll code -- copy and modify that part of the code to handle input of your metas and insert it into the appropriate place. Pay close attention to how they associate the poll in the poll_table with the thread_table.

Authorization is in another place possibly. The functions_post.php just handles the work for doing all of your post functions.

(I have a storm rolling in -- need to get this post submitted -- will continue after a bit)
Reply With Quote
  #10 (permalink)  
Old 07-15-2004, 08:58 PM
ronniethedodger's Avatar
WebProWorld 1,000+ Club
 

Join Date: Aug 2003
Location: Central US
Posts: 1,581
ronniethedodger RepRank 0
Default

(holy hailstorms ... nasty little swell ... all gone now)

Open up a file in the main directory that may be named posting.php. In this file you will find all of the code for new topics as well as editing old topics. There is authorization code in here as well which prevent unauthorized individuals from accessing certain parts of a post. For instance, the Make Sticky part of the code will give you a clue as to hide/prevent that from being an option in the posting screen.

You will want to lift code from places like the Make Sticky (for authorization) and the Make Poll (for insertion to the meta_table). You are on your own here with Nuke, I can only point you to the places you will need to look at.

Also look for (if not here, elsewhere) some kind of Action Array. This array holds the Posting Mode you will be entering into (ie: new topic, edit topic, delete, submit, delete poll, etc.). You will want to add your own specific mode(s) here possibly.

Templates will be needed to be updated. Locate the template for Posting and add your presentation of the input boxes to it. There are going to be variable to insert here which are set up in the posting.php script. (Actually, I should have mentioned this before hand).

One thing you may want to do is put in an overide checkbox for the Title. This will allow the special SEO title to take the place of the user input title in the forum index of posts. Right now, the user input title will still show in the links -- but you can override that and have it replaced too. I would not suggest doing it though, because it is just as easy to revise the original title if that was the case. Still it may piss some people off if you edit their titles.

So far so good!!! But we are not done, this only covers the inserting, deletion, and editting of the meta data.

Now open up the files for viewtopic.php and there should also be an include file for you header. Somewhere in the viewtopic.php file there will be the SQL for pulling the data from the topics table and it will be joined with the polls table. Add a similar join for the metas.

In the viewtopic.php file will be a varible set for the Page Title, add in your two Metas here -- add those metas to the header script as well.

That is the basics. You will probably want to identify "empty" metas more easily. Suggest you open up the viewforum.php file and do a quick check for empty metas, then flag them so some kind of visual clue can be shown. Look at how they flag New Topics for users and lift the code from it.
Reply With Quote
  #11 (permalink)  
Old 07-18-2004, 12:41 PM
WebProWorld New Member
 

Join Date: Feb 2004
Posts: 18
ksen RepRank 0
Default I did it in a different way

Im not a pro or a SEO expert . Just for a change i have started using php-nuke in my first website http://www.allreminder.com

I have created a php scripts to generate dynamic titles , description and meta words for each and every page.

After this change, trust me for most of the keywords in google and yahoo moved from 1000+ to top 10
Reply With Quote
  #12 (permalink)  
Old 07-25-2004, 07:34 PM
WebProWorld New Member
 

Join Date: Jul 2004
Location: Kennesaw GA
Posts: 1
davidj6910 RepRank 0
Default Programmers

I have read all the information and to be honest it is all above my head. I am seeking a programmer who can make the necessary changes to my PHPNuke website that Jade is discussing with you. Is anyone interested in helping me with the changes. If so please let me know and we will talk about what is needed and cost.

David
Reply With Quote
  #13 (permalink)  
Old 10-15-2004, 03:07 AM
WebProWorld New Member
 

Join Date: Oct 2004
Location: Australia
Posts: 4
babywebmaster RepRank 0
Default

You have probably sorted this by now but Google-Tap is a PHP-Nuke hack which changes the url to *.html links so that search engine spiders can easily crawl the entire website and for just nicer links for people to refer to.

http://nukecops.com/downloads-cats-2-50-10.html
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Tags: , , , , ,



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Search Engine Optimization by vBSEO 3.2.0