Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> General/Other Stuff
Author Message
dconnor
New Member
New Member


Joined: Apr 17, 2006
Posts: 19

PostPosted: Fri Apr 28, 2006 8:36 am Reply with quote

Guardian2003 wrote:
Interesting thread.
dconnor - I would be interested to learn what happens over the long term, say a month or two. The increase in traffic you are currently seeing may just be down to the fact that your content has changed (at least from the perspective of the search engine) as they re-crawl and index the changes due to the modifications made.

If you start seeing more visitors from anything other than bots/crawlers/spiders then I would certainly appreciate you confirming that at some point as that would be a good indicator of whether or not the search engines are feeding search results more appropriately.


I will keep you you to date, but here are my current thoughts:

I do not believe that the current jump in traffic is only due to changes made in the content. The everyday changes in my scrolling forums, news, reviews..., blocks are enough to accomplish that.

I believe that this was accomplished by using unique metas.

I see the results when I do a "site:www.mysite.com" search.

Google is pulling about 100 pages a day out of the supplimental index and placeing them in the main index.

I will report back, but I am pretty sure i know what that report will be Smile
 
View user's profile Send private message
montego
Site Admin


Joined: Aug 29, 2004
Posts: 9449
Location: Arizona

PostPosted: Sun Apr 30, 2006 10:12 am Reply with quote

dconnor wrote:
montego wrote:
Any chance the META information for each module can be "managed" in a table as apposed to having potentially many, many module meta.php files in the includes folder? Wink


It would be nice, but I do not know how to do it.


Sorry, was my way of giving a "hint" to kguske... Wink

_________________
Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
guidyy
Worker
Worker


Joined: Nov 22, 2004
Posts: 208
Location: Italy

PostPosted: Sun Apr 30, 2006 11:00 am Reply with quote

montego wrote:
Any chance the META information for each module can be "managed" in a table as apposed to having potentially many, many module meta.php files in the includes folder? Wink


There is only one meta.php in \includes (the original one)
and then you optionally can add a meta.php to every modules folder you need to customize.

Probably would be a better idea to integrate dynamyc meta descriptions and dynamic meta title making less calls to the database.

my site is small so i've no idea of what can happen to a huge site in terms of DB calls.
 
View user's profile Send private message Visit poster's website MSN Messenger
montego
PostPosted: Sun Apr 30, 2006 12:25 pm Reply with quote

guidyy, the problem with integrating dynamic titles with dynamic meta is that the titles are coming out the individual core module nuke tables. One would have to ALTER each of these to include the meta tags. That would not get my vote. However, having a simple table with META tag information per module would add only one additional call... not too bad and a better option, IMO, then modifying core nuke tables.
 
guidyy
PostPosted: Sun Apr 30, 2006 1:14 pm Reply with quote

well that doesn't solve the problem:
I mean you may add a meta keys field for the whole module
but dynamic meta description change the same way as the title
I have, for example a recipe,
chicken and dumplings

title will be chicken and dumplings
meta keywords should be (at least) chicken and dumplings too
and meta descriptions = 200 chars from the recipe.
of course they change when i look to another recipe.

same would be for the forums, news, reviews, content etc.
I do not see how another table would accomplish this.

what i was thinking is a unique meta.php for each module that take care of
Title and all META
 
montego
PostPosted: Sun Apr 30, 2006 5:23 pm Reply with quote

And all I am saying is instead of using separate meta.php files, change meta.php to pull the information from a table based on module. We're talking the same thing, only different implementation.

Either way would work and I like your idea about somehow making the META dynamic, but it wouldn't be appropriate for KEYWORDS, but maybe DESCRIPTION? (to be dynamic that is)
 
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 6383

PostPosted: Sun Apr 30, 2006 7:03 pm Reply with quote

I suppose we could convert the meta.php to a table, but that will be more complex and take longer to develop. I may do some testing as part of the next release of nukeSEO.

_________________
I google, therefore I exist...
Only registered users can see links on this board! Get registered or login!
 
View user's profile Send private message
dconnor
PostPosted: Thu May 11, 2006 6:39 pm Reply with quote

Hi everyone: I am the happiest Nuker ever. Smile

This is what has happened in the past few weeks since I installed this mod.

First, understand what I did:
I did custom unique description meta for my custom modules.
I did general “run of the module” description meta for things like Reviews, FAQ’s…
I did a description meta mod for News that picks up the title for the description.
And I did the forum mod that picks up the title and in my case, the first 200 characters of text for each post and topic.
The remainder of the site (the index, topics...) has the standard run of the site nuke description.

So, as many of you might know, Google did a deep search late last week and populated that over the weekend.

Since Monday, my traffic has almost doubled, my sales have doubled, and my AdSense (when I have it on site) has tripled.

I highly recommend this mod to everyone. I only wish I could figure out how to get it to work in Reviews and in News articles like it does in the forums, that is; picking up the title and some text, not just the title.
 
kguske
PostPosted: Thu May 11, 2006 6:54 pm Reply with quote

Great! I guess we need to really move on this...
 
dconnor
PostPosted: Thu May 11, 2006 7:02 pm Reply with quote

It really is great...

Two very important things I forgot to say:

1) Thank you guidyy! You have been a great help.

2) Prior to installing this mod, when I did a Google search for my site doing the:

"site:www.my-site.com" search, it only showed me 3 results in the main index; my index page, one of my sitemaps and one of my backend files.

All of the other pages were in the supplemental results:

"In order to show you the most relevant results, we have omitted some entries very similar to the 3 already displayed. If you like, you can repeat the search with the omitted results included."

Now when I do that search, I get the full 1000 results, the max that Google will show.
 
bobsmith
New Member
New Member


Joined: Sep 23, 2006
Posts: 3

PostPosted: Sun Sep 24, 2006 12:20 pm Reply with quote

This is precisely the kind of thing I've been looking for to make my php-nuke site more tempting to the search engines.

Trouble is, I can't get it to work at all in phpnuke 7.9.

Are you sure this is the right call in header.php? I can't get it to even touch the /modulename-whatever/meta.php file:



Quote:
In header.php
find:

include("includes/meta.php");


Replace with:



if (isset($module_name) && file_exists("modules/$module_name/meta.php")) {

include("modules/$module_name/meta.php"); }
else {
include("includes/meta.php");
}


I'm sure it's something noobishly obvious, but it's got me scrathing my head...
 
View user's profile Send private message
montego
PostPosted: Mon Sep 25, 2006 6:19 am Reply with quote

Sure looks right to me... make sure your code in header.php looks exactly the same.

BTW, I have never used anything above 7.6 (refuse to), so if the author changed how header.php and the meta.php is included, I wouldn't know about it. End disclaimer. Laughing
 
bobsmith
PostPosted: Thu Sep 28, 2006 8:01 pm Reply with quote

Well, I couldn't get it to work, so I went at it backwards instead.

I used an include call in header.php for a file I named "dynamic_meta.php", and then cobbled dydnamic_titles.php code to put stuff in the description and keyword meta tags.

I'm pretty pleased, 'coz everything is in a single file, instead of making files for each module.

Let you know if my visitor stats improve Smile
 
Dawg
RavenNuke(tm) Development Team


Joined: Nov 07, 2003
Posts: 910

PostPosted: Fri Sep 29, 2006 7:17 am Reply with quote

Bob,
Post that up for us. I would love to see what you did. I have been thinking about taking the same approach.

Something else I have been doing....You know how NavTap puts the register link with some test at the top of the page for unregistered members (ie:search engines)...I have added links to various key word term with links to high ranking pages to that list for the unregistered members. I am now thinking of a way to change that list according to which page on the site you are coming to so I can 0 it in even closer.

For my Top 20 target search terms....I am running #1 for for about 1/2 and top 5 for all but 2. Not to shabby!

Dave
 
View user's profile Send private message
Misha
Worker
Worker


Joined: Jul 30, 2006
Posts: 203
Location: McLean, VA

PostPosted: Tue Oct 03, 2006 11:06 pm Reply with quote

I did not wait for any new release and tried to put everything together. I compiled all what I deemed reasonable in this topic, brought it to uniform style, and slightly tweaked to my liking.
It is the single file, which replaces meta.php. Based on the current page content, it gives dynamic titles, meta description, and meta keywords for three modules which I'm using - forums, encyclopedia, and surveys. It leaves default title and tags for other modules and main index. It does not require any database change. It shouldn't take long to figure out how to add sections with dynamic stuff for other modules, especially if you have dynamic_titles.php.
Other than replacing content of /includes/meta.php with the one below, you just need to comment out (or delete) line
echo "<title>.............
from /header.php
That's it. Have fun!
Misha
Code:


/************************************************************************/
/* Modified by nukeSEO from http://nukeSEO.com, adapted from the        */
/* MetaTag module by http://visayas.dk at 11-Aug-06 09:36:17            */
/************************************************************************/
/* 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.       */
/************************************************************************/

/************************************************************************/
/* I do not know all the people who provided ideas and parts of code for*/
/* this. Those who I know about are:                                    */
/* Chatserv, Greg Schoper, Guiddy, Dconnor, Montego.                    */
/************************************************************************/
/*         =======  Dynamic Meta Tags and Titles  =========             */
/*     Put together by Misha funandsafedriving.com October 2006         */
/************************************************************************/

if (stristr(htmlentities($_SERVER['PHP_SELF']), "meta.php")) {
    Header("Location: ../index.php");
    die();
}

global $name, $sitename, $slogan;
include ("config.php");
include("db/db.php");

$MyNewDesc = $slogan;
$desclen = 255;
$keywords = "";

// Your site specific stuff goes here
$statickeywords = "fun safe driving,fun driving,safe driving,driving forum,driving safe,driving,drive,driver,fun,car,mastery,drivers,safe,cars";
$etitle = "Home of Drivers having Fun while driving safely.";
// Your site specific stuff ends here

// Surveys
if($name=="Surveys"){
   global $pollID;

   $MyNewDesc = "$sitename $name";
   $etitle = $name;
   $keywords = "survey,surveys,poll,polls,";

   if($pollID) {
      $sql = "SELECT pollTitle FROM ".$prefix."_poll_desc WHERE pollID='$pollID'";
      $result = $db->sql_query($sql);
      $row = $db->sql_fetchrow($result);
      $title = $row[pollTitle];
      
      $MyNewDesc = "$sitename Survey: $title";
      $etitle = "$name - $title";
      $keywords = "survey,surveys,poll,polls,$title,";
      $desclen = 255; // You can change description length for specific module and function here
   }
}

// Forums
if($name=="Forums"){
   global $p,$t,$forum,$f, $first_post;

   $MyNewDesc = "$sitename $name";
   $etitle = $name;
   $keywords = "forums,forum,";

   if($p) {
      $sql = "SELECT post_subject, post_id, post_text FROM ".$prefix."_bbposts_text WHERE post_id='$p'";
      $result = $db->sql_query($sql);
      $row = $db->sql_fetchrow($result);
      $title = $row[post_subject];  //post subject
      $post = $row[post_id];        //post id
      $text = $row[post_text];      //post text
      
      $MyNewDesc = "$title: $text";
      $etitle = "Forums - $title";
      $keywords = "forum,forums,$title,";
      $desclen = 255; // You can change description length for specific module and function here
   }
   if($t) {
      $sql = "SELECT topic_title, topic_first_post_id, forum_id FROM ".$prefix."_bbtopics WHERE topic_id='$t'";
      $result = $db->sql_query($sql);
      $row = $db->sql_fetchrow($result);
      $title = $row[topic_title];  //topic title
      $forum = $row[forum_id];     //id of the forum the topic belongs to
      $first_post = $row[topic_first_post_id]; // id of first post in the topic
      
      $sql = "SELECT forum_name FROM ".$prefix."_bbforums WHERE forum_id='$forum'";
      $result = $db->sql_query($sql);
      $row = $db->sql_fetchrow($result);
      $forum = $row[forum_name];  //forum name
      
      $sql = "SELECT post_subject, post_id, post_text FROM ".$prefix."_bbposts_text WHERE post_id='$first_post'";
      $result = $db->sql_query($sql);
      $row = $db->sql_fetchrow($result);
      $post = $row[post_id]; // id of first post  in topic
      $text = $row[post_text]; //text of the first post in topic
      
      $MyNewDesc= "$title: $text";
      $etitle = "$forum - $title";
      $keywords = "$forum,$title,";
      $desclen = 255; // You can change description length for specific module and function here
   }
   elseif($f) {
      $sql = "SELECT forum_name, forum_desc FROM ".$prefix."_bbforums WHERE forum_id='$f'";
      $result = $db->sql_query($sql);
      $row = $db->sql_fetchrow($result);
      $forum = $row[forum_name]; // forum name
      $desc= $row[forum_desc]; //  forum description
      
      $MyNewDesc = "$forum: $desc";
      $etitle = "Forums - $forum";
      $keywords = "$forum,";
      $desclen = 255; // You can change description length for specific module and function here
   }
}

// Encyclopedia
if($name=="Encyclopedia"){
   global $op,$eid,$tid,$ltr;
   
   $MyNewDesc = "$sitename $name";
   $etitle = $name;
   $keywords = "$name,";
   
   if($op=="list_content") {
      $sql="SELECT title, description FROM ".$prefix."_encyclopedia WHERE eid='$eid'";
      $result = $db->sql_query($sql);
      $row = $db->sql_fetchrow($result);
      $desc = $row[description];
      $en_title = $row[title];
      
      $MyNewDesc = $desc;
      $etitle = $en_title;
      $keywords = "$en_title,";
      $desclen = 255; // You can change description length for specific module and function here
   }
   if($op=="terms") {
      $sql="SELECT title FROM ".$prefix."_encyclopedia WHERE eid=$eid";
      $result = $db->sql_query($sql);
      $row = $db->sql_fetchrow($result);
      $en_title = $row[title];
      
      $MyNewDesc = "List of terms contained in $en_title encyclopedia under letter $ltr";
      $etitle = "$name - $en_title - letter $ltr";
      $keywords = "$en_title,";
      $desclen = 255; // You can change description length for specific module and function here
   }
   if($op=="content") {
      $sql="SELECT eid, title, text FROM ".$prefix."_encyclopedia_text WHERE tid='$tid'";
      $result = $db->sql_query($sql);
      $row = $db->sql_fetchrow($result);
      $term = $row[text];
      $a_title = $row[title];
      $enid = $row[eid];
      $sql="SELECT title FROM ".$prefix."_encyclopedia WHERE eid=$enid";
      $result = $db->sql_query($sql);
      $row = $db->sql_fetchrow($result);
      $en_title = $row[title];
      
      $MyNewDesc = "$term";
      $etitle = "$en_title - $a_title";
      $keywords = "$en_title,$a_title,";
      $desclen = 255; // You can change description length for specific module and function here
   }
}

// Cleanup
$search = array ("'<s cript[^>]*?>.*?</sc ript>'si",
                      "'<[\/\!]*?[^<>]*?>'si",
                      "'([\r\n])[\s]+'",
                      "'&(amp|#38);'i",
                      "'&(lt|#60);'i",
                      "'&(gt|#62);'i",
                      "'&(nbsp|#160);'i",
                      "'&(iexcl|#161);'i",
                      "'&(cent|#162);'i",
                      "'&(pound|#163);'i",
                      "'&(copy|#169);'i",
                      "'&#(\d+);'e"
                      );
$replace = array ( "",
                      "",
                      "\\1",
                      "&",
                      "<",
                      ">",
                      " ",
                      chr(161),
                      chr(162),
                      chr(163),
                      chr(169),
                      "chr(\\1)"
                      );
$MyNewDesc = preg_replace($search, $replace, $MyNewDesc);
$description = substr($MyNewDesc,0,$desclen);

$ksearch = array (" ", ",and,", ",or,", ",:,", ":,", ",:", ",for,", ",is,", ",your,", ",,");
$keywords = strtolower($keywords);
$keywords = str_replace($ksearch, ",", $keywords);

// Generating Meta Tags
$_metastring .= "<M_ETA HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset="._CHARSET."\">\n";
$_metastring .= "<M_ETA HTTP-EQUIV=\"EXPIRES\" CONTENT=\"0\">\n";
$_metastring .= "<M_ETA NAME=\"RESOURCE-TYPE\" CONTENT=\"DOCUMENT\">\n";
$_metastring .= "<M_ETA NAME=\"DISTRIBUTION\" CONTENT=\"GLOBAL\">\n";
$_metastring .= "<M_ETA NAME=\"AUTHOR\" CONTENT=\"$sitename\">\n";
$_metastring .= "<M_ETA NAME=\"COPYRIGHT\" CONTENT=\"Copyright (c) 2006 by $sitename\">\n";
$_metastring .= "<M_ETA NAME=\"KEYWORDS\" CONTENT=\"$keywords$statickeywords\">\n";
$_metastring .= "<M_ETA NAME=\"DESCRIPTION\" CONTENT=\"$description\">\n";
$_metastring .= "<M_ETA NAME=\"ROBOTS\" CONTENT=\"INDEX, FOLLOW\">\n";
$_metastring .= "<M_ETA NAME=\"REVISIT-AFTER\" CONTENT=\"1 DAYS\">\n";
$_metastring .= "<M_ETA 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!
$_metastring .= "<M_ETA NAME=\"GENERATOR\" CONTENT=\"PHP-Nuke Copyright (c) 2004 by Francisco Burzi. This is free software, and you may redistribute it under the GPL (http://phpnuke.org/files/gpl.txt). PHP-Nuke comes with absolutely no warranty, for details, see the license (http://phpnuke.org/files/gpl.txt).\">\n";

// Output
echo "<title>$sitename - $etitle</title>\n";
echo $_metastring;

PS I hate this security hassle. This thing forced me to spend half an hour to find a way to post this code. You are invited to guess what should be changed back to make this code working. (hint: it did not like ph_p and did not like m_eta)

_________________
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
Misha
PostPosted: Wed Oct 04, 2006 8:06 am Reply with quote

Note: Code last modified 10:05 am EST 04 Oct 2006.
There was a spelling error there. If you copied it before, please update.
 
Misha
PostPosted: Wed Oct 04, 2006 12:52 pm Reply with quote

Hmmm, one more correction. I just added some extra common words to be removed from the generated list of keywords:
Code:
$ksearch = array (" ", ",-,", ",and,", ",or,", ",:,", ":,", ",:", ",for,", ",is,", ",your,", ",my,", ",all,", ",it,", ",here,", ",you,", ",no,", ",,");

If someone can come up with other common words to be stripped, that would be great Smile
 
evaders99
Former Moderator in Good Standing


Joined: Apr 30, 2004
Posts: 3221

PostPosted: Wed Oct 04, 2006 1:17 pm Reply with quote

Rather than posting code directly here, just link us to a .txt file of your code Smile

_________________
- Only registered users can see links on this board! Get registered or login! -

Need help? Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
Misha
PostPosted: Wed Oct 04, 2006 1:53 pm Reply with quote

Quote:
Rather than posting code directly here, just link us to a .txt file of your code

Do you think all these words are common? Razz
ya, I might want to go this route next time. the problem is a broken link as soon as my site goes out of service, or as soon as I do a cleanup and cannot recall what this file is for... Crying or Very sad
 
montego
PostPosted: Wed Oct 04, 2006 2:39 pm Reply with quote

Well, this is all extremely interesting. I'd like to find out the results from this over time. I was thinking that the keywords would need to be well thought out and "tested" to ensure the best placement. Another thing is that I am not so sure the benefit to having the meta tag keywords have the same title as the page title.

I hope kguske can take a moment to comment on this as this is a relatively easy way to take advantage of the same Dynamic Titles code to also use for the meta tags.... but, again, I question the efficacy.
 
Misha
PostPosted: Wed Oct 04, 2006 8:01 pm Reply with quote

I'll let you know when (if) I have any results Smile

Based on what I read around, keywords are no more that important they used to be.

And, the choice is to have static keywords for the whole site vs. to have at least partially dynamic ones. My keywords algorithm is not perfect for sure, I did not give it much thought because of implied realtively low importance. Of course you can use any other algorithm you prefer, including static well thought through and tested keywords per module. Razz
 
montego
PostPosted: Thu Oct 05, 2006 6:07 am Reply with quote

Quote:

And, the choice is to have static keywords for the whole site vs. to have at least partially dynamic ones.


Sounds reasonable.
 
bobsmith
PostPosted: Thu Oct 05, 2006 11:10 am Reply with quote

ok guys, I'm posting a link to a generic version of the script I cobbled up and got working good in PHP-nuke 7.9. This script will do full dynamic descriptions for Forums, Content, and Encyclopedia, and will do module-wide descriptions and keywords for everything else.

Beats the heck out of one static description and keyword for a full site Smile

You'll have to read through and replace the keyword strings etc, and you can creat module-specific keys and desc for any module you have by using the "custom_module" code.

have fun: Only registered users can see links on this board! Get registered or login!
 
Guardian2003
Site Admin


Joined: Aug 28, 2003
Posts: 6792
Location: Ha Noi, Viet Nam

PostPosted: Thu Oct 05, 2006 6:54 pm Reply with quote

I would have to jump into Montego's boat, excellent idea's but I would prefer them to be database driven. If nothing else it makes administration easier. I don't want to be editing files if I can do it through a GUI.
 
View user's profile Send private message Send e-mail
Misha
PostPosted: Thu Oct 05, 2006 7:25 pm Reply with quote

Within the boundaries of this concept, I do not see any problem addidng extra field (or even three fields) to nuke_modules table and keeping quasi-static module-dependent keywords (and parts of title and meta description) there, if desired. I just don't think this is needed - but I may as well be wrong. All the rest is either static by definition, or is already database driven.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> General/Other Stuff

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©