Submit Your Article Forum Rules

Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: PHPNuke & SEO (unique meta & title tags)

  1. #1
    Senior Member spiderbait's Avatar
    Join Date
    Oct 2003
    Posts
    268

    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

  2. #2
    WebProWorld MVP
    Join Date
    Sep 2003
    Posts
    1,156

    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.

  3. #3
    Senior Member
    Join Date
    Jul 2003
    Posts
    1,771
    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?

  4. #4
    WebProWorld MVP ronniethedodger's Avatar
    Join Date
    Aug 2003
    Posts
    1,402
    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.

  5. #5
    WebProWorld MVP ronniethedodger's Avatar
    Join Date
    Aug 2003
    Posts
    1,402
    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/

  6. #6
    Senior Member spiderbait's Avatar
    Join Date
    Oct 2003
    Posts
    268

    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

  7. #7
    WebProWorld MVP
    Join Date
    Sep 2003
    Posts
    1,156

    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.

  8. #8
    Senior Member spiderbait's Avatar
    Join Date
    Oct 2003
    Posts
    268

    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

  9. #9
    WebProWorld MVP ronniethedodger's Avatar
    Join Date
    Aug 2003
    Posts
    1,402

    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)

  10. #10
    WebProWorld MVP ronniethedodger's Avatar
    Join Date
    Aug 2003
    Posts
    1,402
    (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.

Page 1 of 2 12 LastLast

Similar Threads

  1. A quick question about title meta tags
    By subcitizen in forum Search Engine Optimization Forum
    Replies: 16
    Last Post: 08-11-2007, 10:38 PM
  2. title and meta tags outside of header tags
    By supernatural_247 in forum Search Engine Optimization Forum
    Replies: 8
    Last Post: 02-25-2007, 05:54 PM
  3. Title and Meta Tags - Unexpected results!
    By lacantina in forum Search Engine Optimization Forum
    Replies: 27
    Last Post: 04-30-2006, 06:36 PM
  4. The order of meta tags and the title tag
    By mickywall in forum Search Engine Optimization Forum
    Replies: 2
    Last Post: 02-10-2005, 07:12 AM
  5. Formatting Meta tags: title VS DC.title VS http-equiv=title
    By Sergio Simarro in forum Search Engine Optimization Forum
    Replies: 8
    Last Post: 05-27-2004, 11:48 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •