OK 2 things, first you everyone insterested in SEO using dynamic urls is more friendly and better for SEO'ing. My favorite mention in this article reveals that dynamic means to spiders "FRESH" and read on...
http://www.stargeek.com/php-seo.php
Second, I think I have the missing peices which you can TRY with a huge amount of caution and only do so by first BACKING UP a copy of your files before you make changes to you precious PHP files.
Dig this:
I looked into the files which I think I have identified all of them which I applied SEO friendly Titles and Keywords for all "directory/359.html" category link pages. As far as I can tell there are 2 PHP files that need to be affected(and again proceed with caution as I was given these changes and am not that slick with PHP code)...
on the file include/functions.php add the below code - somewhere near the top (sorry my functions file has mods all over it near the top so I can't tell you exactly which line)
| Code: |
///SEO goods - ADDED FOR TITLE AND KEYWORDS CUSTOMIZATION
///submitted by users of the pre-2008 dew-code.com forum
function get_cat($PID){
global $tb_categories;
$gc_query = sql_query("
select
$tb_categories.Category as cat_name
from
$tb_categories
where
ID=$PID");
while($gc_array = sql_fetch_array($gc_query)){
$cat = $gc_array[cat_name];
}
return $cat;
}
function get_ParentCats($PID){
global $tb_categories;
$gcid = $PID;
while($gcid > 0){
$query_str = "
select $tb_categories.Category,
$tb_categories.ID,
$tb_categories.PID
from
$tb_categories
where $tb_categories.ID = $gcid";
$mlc_query = sql_query($query_str);
$mlc_array = sql_fetch_array($mlc_query);
$cat_array[] = $mlc_array["Category"];
$pid_array[] = $mlc_array["ID"];
$gcid = $mlc_array["PID"];
}
$count = sizeof($pid_array);
for($depth=$count;$depth>=0;$depth--){
if($pid_array[$depth]){
if($PID == $pid_array[$depth]){
$htmlsrc .= ereg_replace("_"," ",($cat_array[$depth]));
$htmlsrc .= "";
} else {
$htmlsrc .= ereg_replace("_"," ",($cat_array[$depth]));
$htmlsrc .= ",";
}
}
}
return $htmlsrc;
}
//END ADDED FOR TITLE AND KEYWORD CUSTOMIZATION
|
then look for your directory file. As I discussed earlier in an introduction to the directory file, a portion of this file is an html file with php mixed in (or is it the other way?)...anyway search for the:
...and you will see the meta data for:
and
| Code: |
<meta name = "keywords" content =
|
and
| Code: |
<meta name = "description" content =
|
take all lines from these 3 brackets title, keywords meta and description meta and replace them with this code:
(again I am stressing that I don't know php very well and this is a copy of what I was given so this is second hand / hearsay on my part)
(also you will have to fill in the blanks for you site's info on the text marked as "FILL ME IN":
| Code: |
<!--START CUSTOM CODE FOR SEO-->
<!--submitted by users of the pre-2008 dew-code.com forum-->
<?
if(!isset($term) and !isset($show)){
if(!isset($PID)){
?>
<title>FILL ME IN - WEBSITE TITLE - BEER IS GOOD FOR THE SOUL</title>
<meta name = "keywords" content = "FILL ME IN, FILL, ME, IN THIS IS YOUR SITE CONTENT, SUPPORT YOUR LOCAL BREWPUB"/>
<meta name = "description" content = "FILL ME IN, THIS IS THE SITE DESCRIPTION META DATA"/>
<?
} else {
?>
<title>FILL ME IN - SITE TITLE <? echo get_cat($PID) ?></title>
<meta name = "keywords" content="<? echo get_cat($PID) ?>,FILL IN OTHER KEYWORDS HERE"/>
<meta name = "description" content="FILL IN SOME TEXT HERE AND THE CATEGORY COMES HERE <? echo get_cat($PID) ?> AND YOU CAN KEEP TALKING ABOUT IT HERE"/>
<?
}
}
?>
<!--END CUSTOM CODE FOR SEO-->
|
if I am correct in what I was originally told to do - you are replacing the title, keyword and description lines and replacing these 3 blurbs of code with this code (my directory files has many mods so this is what it looks like from my directory file).
Please also note that the above code which goes on the director file is a 2 part outcome...1 title, keywords and description for page id = 0 (main dew-new phplinks homepage) and the second set of title, keywords and site desciption all with the category name inserted when you are on a category page using echo get_cat $PID.
What this code should do for SEO is add a dynamic category name to the title, keywords and description which blends in with the exiting site name, keywords, etc.
MAKE THESE CHANGES WITH EXTREME CAUTION - I do not know php much at all, I do think I missed some instructions, please look at how your existing directory and functions.php files, only make these changes if you are somewhat comfy in php / have made backups before making file changes.
DEWED - did I miss anything?