Topic: Adjust ad details for SEO

Hi,
I know there are allready several threads about this, but maybe so many that i cannot see the forest through the trees (Dutch saying) tongue

one of the is http://www.deltascripts.com/board/viewt … 3953#13953

This i tried but errors all around

Is there someone who can summarise it all for the community, the exsisting threads are so long....

and this subject is one of the more important ones.

so the most important i guess is to display "Sitename - catgorie (if needed)  - addetail
for v6.18

Thx

tc

Dare to step out

Re: Adjust ad details for SEO

anybody? *snif* wink

Dare to step out

Re: Adjust ad details for SEO

plz.... *kneeling* wink

it will be more then welcome....

tc

Dare to step out

Re: Adjust ad details for SEO

can anybody confirm that this piece of code is the latest version to get the addetail as the website title?

Hi,
I'm playing around with this at the moment, in header_inc.php change the code for whatever you want to include like I have for the description
Code:
if (isset($sitedescription))   
   $fArray["SITEDESCRIPTION"] = "$sitedescription";
else
   $fArray["SITEDESCRIPTION"] = "";


if (isset($sitetitle))   
   $fArray["SITETITLE"] = "$sitetitle";
else
   $fArray["SITETITLE"] = "";






==>And in detail.php move this code

Code:
// ###########################
$catname = " :: $ad_details_text";
if (isset($_REQUEST["print"]))
   $print = 1;

if (isset($_REQUEST["siteid"]))
   $siteid = round($_REQUEST["siteid"]);

if (isset($_REQUEST["pre"]))
   $pre = round($_REQUEST["pre"]);
   
   
if (!isset($print))
   include_once("header_inc.php");



if (!$special_mode)
{
    if (!isset($print))       
         include("navigation.php");
      else {
         print "<script language='javascript'>window.print&#40;&#41;</script>";
         print "<p><a href='detail.php?siteid=$siteid'><h2>$la_p</h2></a></p>";
      &#125;
&#125;

// ##################



to directly above this

Code&#58;

?>
<!-- 1 -->





In header edit the title like this


Code&#58;
<title>%SITETITLE% %SITEDESCRIPTION% %PAGE%</title>


You can use the %sitedescription% for the description tag so each ad is truly unique and google will spider and index them all as google does use the description tag, I think you can use this code to limit the amount of text but I.m not that far yet as I have other issues to fix


Code&#58;
echo substr&#40;" $sitedescription ",0,200&#41;;
Dare to step out

Re: Adjust ad details for SEO

here's how i did it....the extra fields $e_number can be changed to what corresponds to your database, or commented out...

detail php lines 1-48

<?
$searchengines=array&#40;"Google", "Fast", "Slurp", "Ink", "Atomz", "Scooter", "Crawler", "bot", "Genius", "Teoma", "msnbot"&#41;; 
$is_search_engine=0; 
foreach&#40;$searchengines as $key => $val&#41; &#123; 
if&#40;strstr&#40;"$HTTP_USER_AGENT", $val&#41;&#41; &#123; 
$is_search_engine++; 
&#125; 
&#125; if&#40;$is_search_engine==0&#41; &#123; 
   session_start&#40;&#41;; 
&#125;
$counter = 0;
$wsize=100;
$hsize=100;
$cur_grade = 0;
$cur_user_grade = 0;
$cur_grade=0;
$pre = "";
include_once&#40;"admin/inc.php"&#41;;
$catname = " &#58;&#58; $ad_details_text";
if &#40;isset&#40;$_REQUEST&#91;"print"&#93;&#41;&#41;
    $print = 1;

if &#40;isset&#40;$_REQUEST&#91;"siteid"&#93;&#41;&#41;
    $siteid = round&#40;$_REQUEST&#91;"siteid"&#93;&#41;;

if &#40;isset&#40;$_REQUEST&#91;"pre"&#93;&#41;&#41;
    $pre = round&#40;$_REQUEST&#91;"pre"&#93;&#41;;
    
// start SQL for TITLE in detail.php header 
if &#40;$validation == 1 AND empty&#40;$pre&#41;&#41; &#123; $val_string = " AND valid = 1"; &#125; else &#123; $val_string = ""; &#125; 
$sql_links = "select * from $ads_tbl, $cat_tbl, $usr_tbl where catid=sitecatid AND ad_username = $usr_tbl.email AND siteid=$siteid $val_string"; 
$sql_result = q &#40;$sql_links&#41;; 
$num_links = mysql_num_rows&#40;$sql_result&#41;; 
$row = mysql_fetch_array&#40;$sql_result&#41;; 
$sitetitle = $row&#91;"sitetitle"&#93;; 
$catfullname = $row&#91;"catfullname"&#93;; 
$sitedescription = $row&#91;"sitedescription"&#93;; 
$e_8 = $row&#91;"e_8"&#93;;
$e_10 = $row&#91;"e_10"&#93;;
$e_33 = $row&#91;"e_33"&#93;;
$e_31 = $row&#91;"e_31"&#93;;
$e_32 = $row&#91;"e_32"&#93;;


// END     
    
if &#40;!isset&#40;$print&#41;&#41;
    include_once&#40;"header_inc1.php"&#41;;

i created a different  header_inc file so i could customize, the titles and what not for non listing pages...

header_inc1.php

<?
if &#40;!empty&#40;$set_stat&#41;&#41;
    gatherStats&#40;&#41;;

if &#40;isset&#40;$catname&#41;&#41;
    $fArray&#91;"PAGE"&#93; = "$catname";
else
        $fArray&#91;"PAGE"&#93; = "";

if &#40;isset&#40;$name_of_site&#41;&#41;    
    $fArray&#91;"SITENAME"&#93; = "$name_of_site";
else
    $fArray&#91;"SITENAME"&#93; = "";
    
    if &#40;isset&#40;$sitedescription&#41;&#41;    
   $fArray&#91;"SITEDESCRIPTION"&#93; = substr&#40;" $sitedescription ",0,200&#41;;
else 
   $fArray&#91;"SITEDESCRIPTION"&#93; = ""; 


if &#40;isset&#40;$sitetitle&#41;&#41;    
   $fArray&#91;"SITETITLE"&#93; = "$sitetitle"; 
else 
   $fArray&#91;"SITETITLE"&#93; = "";
    
if &#40;isset&#40;$e_8&#41;&#41;    
   $fArray&#91;"E_8"&#93; = "$e_8"; 
else 
   $fArray&#91;"E_8"&#93; = "";

if &#40;isset&#40;$e_31&#41;&#41;    
   $fArray&#91;"E_31"&#93; = "$e_31"; 
else 
   $fArray&#91;"E_31"&#93; = "";

if &#40;isset&#40;$e_32&#41;&#41;    
   $fArray&#91;"E_32"&#93; = "$e_32"; 
else 
   $fArray&#91;"E_32"&#93; = "";

if &#40;isset&#40;$e_10&#41;&#41;    
   $fArray&#91;"E_10"&#93; = "$e_10"; 
else 
   $fArray&#91;"E_10"&#93; = "";

if &#40;isset&#40;$e_33&#41;&#41;    
   $fArray&#91;"E_33"&#93; = "$e_33"; 
else 
   $fArray&#91;"E_33"&#93; = "";
 "";

// Execute
writeTemplate&#40;"header1",$fArray&#41;;    
?>

once again you'll need to change the $e varibles to your structure, once again i created a different header template to use....


header1.html

<?xml version="1.0" encoding="iso-8859-1"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"  "http&#58;//www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<head>
<title>%SITETITLE% - %E_8% %E_32% %E_31% %E_33% - any text</title>
<meta name="keywords" content="%SITETITLE% %E_10% %E_31% %E_8%%E_33% %E_32% any text">
<meta name="description" content="%SITEDESCRIPTION% %E_8% %E_31% %E_10% %E_33% %E_32%" any text>

<link rel="stylesheet" href="style.css" type="text/css" />
<script language="JavaScript">
<!--
function openPage&#40;URL&#41; &#123; aWindow=window.open&#40;URL,"Large","toolbar=no,width=500,height=500,status=no,scrollbars=yes,resize=no,menubars=no"&#41;;
&#125;
-->
</script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head>


<body bgcolor="#ffffff" background="bck.gif">

you can replace any text with whatever site name address etc....
hope that helps you some....

+ -

Re: Adjust ad details for SEO

thx for the reply,

i'll try that one out smile

Dare to step out

Re: Adjust ad details for SEO

here's how i did it....the extra fields $e_number can be changed to what corresponds to your database, or commented out...

detail php lines 1-48

<?
$searchengines=array&#40;"Google", "Fast", "Slurp", "Ink", "Atomz", "Scooter", "Crawler", "bot", "Genius", "Teoma", "msnbot"&#41;; 
$is_search_engine=0; 
foreach&#40;$searchengines as $key => $val&#41; &#123; 
if&#40;strstr&#40;"$HTTP_USER_AGENT", $val&#41;&#41; &#123; 
$is_search_engine++; 
&#125; 
&#125; if&#40;$is_search_engine==0&#41; &#123; 
   session_start&#40;&#41;; 
&#125;
$counter = 0;
$wsize=100;
$hsize=100;
$cur_grade = 0;
$cur_user_grade = 0;
$cur_grade=0;
$pre = "";
include_once&#40;"admin/inc.php"&#41;;
$catname = " &#58;&#58; $ad_details_text";
if &#40;isset&#40;$_REQUEST&#91;"print"&#93;&#41;&#41;
    $print = 1;

if &#40;isset&#40;$_REQUEST&#91;"siteid"&#93;&#41;&#41;
    $siteid = round&#40;$_REQUEST&#91;"siteid"&#93;&#41;;

if &#40;isset&#40;$_REQUEST&#91;"pre"&#93;&#41;&#41;
    $pre = round&#40;$_REQUEST&#91;"pre"&#93;&#41;;
    
// start SQL for TITLE in detail.php header 
if &#40;$validation == 1 AND empty&#40;$pre&#41;&#41; &#123; $val_string = " AND valid = 1"; &#125; else &#123; $val_string = ""; &#125; 
$sql_links = "select * from $ads_tbl, $cat_tbl, $usr_tbl where catid=sitecatid AND ad_username = $usr_tbl.email AND siteid=$siteid $val_string"; 
$sql_result = q &#40;$sql_links&#41;; 
$num_links = mysql_num_rows&#40;$sql_result&#41;; 
$row = mysql_fetch_array&#40;$sql_result&#41;; 
$sitetitle = $row&#91;"sitetitle"&#93;; 
$catfullname = $row&#91;"catfullname"&#93;; 
$sitedescription = $row&#91;"sitedescription"&#93;; 
$e_8 = $row&#91;"e_8"&#93;;
$e_10 = $row&#91;"e_10"&#93;;
$e_33 = $row&#91;"e_33"&#93;;
$e_31 = $row&#91;"e_31"&#93;;
$e_32 = $row&#91;"e_32"&#93;;


// END     
    
if &#40;!isset&#40;$print&#41;&#41;
    include_once&#40;"header_inc1.php"&#41;;

i created a different  header_inc file so i could customize, the titles and what not for non listing pages...

header_inc1.php

<?
if &#40;!empty&#40;$set_stat&#41;&#41;
    gatherStats&#40;&#41;;

if &#40;isset&#40;$catname&#41;&#41;
    $fArray&#91;"PAGE"&#93; = "$catname";
else
        $fArray&#91;"PAGE"&#93; = "";

if &#40;isset&#40;$name_of_site&#41;&#41;    
    $fArray&#91;"SITENAME"&#93; = "$name_of_site";
else
    $fArray&#91;"SITENAME"&#93; = "";
    
    if &#40;isset&#40;$sitedescription&#41;&#41;    
   $fArray&#91;"SITEDESCRIPTION"&#93; = substr&#40;" $sitedescription ",0,200&#41;;
else 
   $fArray&#91;"SITEDESCRIPTION"&#93; = ""; 


if &#40;isset&#40;$sitetitle&#41;&#41;    
   $fArray&#91;"SITETITLE"&#93; = "$sitetitle"; 
else 
   $fArray&#91;"SITETITLE"&#93; = "";
    
if &#40;isset&#40;$e_8&#41;&#41;    
   $fArray&#91;"E_8"&#93; = "$e_8"; 
else 
   $fArray&#91;"E_8"&#93; = "";

if &#40;isset&#40;$e_31&#41;&#41;    
   $fArray&#91;"E_31"&#93; = "$e_31"; 
else 
   $fArray&#91;"E_31"&#93; = "";

if &#40;isset&#40;$e_32&#41;&#41;    
   $fArray&#91;"E_32"&#93; = "$e_32"; 
else 
   $fArray&#91;"E_32"&#93; = "";

if &#40;isset&#40;$e_10&#41;&#41;    
   $fArray&#91;"E_10"&#93; = "$e_10"; 
else 
   $fArray&#91;"E_10"&#93; = "";

if &#40;isset&#40;$e_33&#41;&#41;    
   $fArray&#91;"E_33"&#93; = "$e_33"; 
else 
   $fArray&#91;"E_33"&#93; = "";
 "";

// Execute
writeTemplate&#40;"header1",$fArray&#41;;    
?>

once again you'll need to change the $e varibles to your structure, once again i created a different header template to use....


header1.html

<?xml version="1.0" encoding="iso-8859-1"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"  "http&#58;//www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<head>
<title>%SITETITLE% - %E_8% %E_32% %E_31% %E_33% - any text</title>
<meta name="keywords" content="%SITETITLE% %E_10% %E_31% %E_8%%E_33% %E_32% any text">
<meta name="description" content="%SITEDESCRIPTION% %E_8% %E_31% %E_10% %E_33% %E_32%" any text>

<link rel="stylesheet" href="style.css" type="text/css" />
<script language="JavaScript">
<!--
function openPage&#40;URL&#41; &#123; aWindow=window.open&#40;URL,"Large","toolbar=no,width=500,height=500,status=no,scrollbars=yes,resize=no,menubars=no"&#41;;
&#125;
-->
</script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head>


<body bgcolor="#ffffff" background="bck.gif">

you can replace any text with whatever site name address etc....
hope that helps you some....

What do you mean by "the extra fields $e_number can be changed to what corresponds to your database, or commented out..."

guess my english isn't good enough to know what you mean by this, or not smart enough wink

The rest seems clear to me

Tc

Dare to step out

Re: Adjust ad details for SEO

Hi,
there is also a problem with phpclassifieds in that when an ad is deleted the link still exists with a message "this ad does not exist anymore" is shown. Now the problem with that is that once google has spidered the ad it will keep returning as the link continues to exist and eventually it will "see" hundreds if not thousands of identical pages. Google will probably see this as spam and ban your site or penalise its ranking as well as use up your bandwidth as it searches for thousands of ads that don't exist.

The way around this is

http://www.deltascripts.com/board/viewt … 8048#18048

Man in a suitcase

+ -

Re: Adjust ad details for SEO

Hi,
there is also a problem with phpclassifieds in that when an ad is deleted the link still exists with a message "this ad does not exist anymore" is shown. Now the problem with that is that once google has spidered the ad it will keep returning as the link continues to exist and eventually it will "see" hundreds if not thousands of identical pages. Google will probably see this as spam and ban your site or penalise its ranking as well as use up your bandwidth as it searches for thousands of ads that don't exist.

The way around this is

http://www.deltascripts.com/board/viewt … 8048#18048

good and important remark

tc

Dare to step out

Re: Adjust ad details for SEO

anybody who can xplain ""the extra fields $e_number can be changed to what corresponds to your database, or commented out...""

and it could be coz i am no script wizz...

but anybody makes such a big fuss about this, but all ad titles are stored in the db, meaning there is a value for that, if you could state that value in your <title> wouldn't that just solve things out? Or am i being shortsighted?

tc

Dare to step out

Re: Adjust ad details for SEO

the $e_number   is any extra fields you added to the database, that you would want to be used in the title or meta keywords or meta description, so say you added the town name as a custom field, the system will create the database field named e_1, so to have it printed on the page you have to add that field to the script...so in detail.php

$sitedescription = $row&#91;"sitedescription"&#93;; 
$e_8 = $row&#91;"e_8"&#93;; 

would be

$sitedescription = $row&#91;"sitedescription"&#93;; 
$e_1 = $row&#91;"e_1"&#93;; 

header_inc1 would be

if &#40;isset&#40;$sitetitle&#41;&#41;    
   $fArray&#91;"SITETITLE"&#93; = "$sitetitle"; 
else 
   $fArray&#91;"SITETITLE"&#93; = ""; 
    
if &#40;isset&#40;$e_8&#41;&#41;    
   $fArray&#91;"E_8"&#93; = "$e_8"; 
else 
   $fArray&#91;"E_8"&#93; = ""; 

changed to 

if &#40;isset&#40;$sitetitle&#41;&#41;    
   $fArray&#91;"SITETITLE"&#93; = "$sitetitle"; 
else 
   $fArray&#91;"SITETITLE"&#93; = ""; 
    
if &#40;isset&#40;$e_1&#41;&#41;    
   $fArray&#91;"E_1"&#93; = "$e_1"; 
else 
   $fArray&#91;"E_1"&#93; = ""; 

if you dont want nothing but the site tilte and site description
you can erase the lines that contain the fields you dont want or comment them out by adding // at the lines beginning...
when deleting from header_inc1 make sure you leave in the very last  "";

heres code for just site title and descriptions....
detail php lines

<? 
$searchengines=array&#40;"Google", "Fast", "Slurp", "Ink", "Atomz", "Scooter", "Crawler", "bot", "Genius", "Teoma", "msnbot"&#41;; 
$is_search_engine=0; 
foreach&#40;$searchengines as $key => $val&#41; &#123; 
if&#40;strstr&#40;"$HTTP_USER_AGENT", $val&#41;&#41; &#123; 
$is_search_engine++; 
&#125; 
&#125; if&#40;$is_search_engine==0&#41; &#123; 
   session_start&#40;&#41;; 
&#125; 
$counter = 0; 
$wsize=100; 
$hsize=100; 
$cur_grade = 0; 
$cur_user_grade = 0; 
$cur_grade=0; 
$pre = ""; 
include_once&#40;"admin/inc.php"&#41;; 
$catname = " &#58;&#58; $ad_details_text"; 
if &#40;isset&#40;$_REQUEST&#91;"print"&#93;&#41;&#41; 
   $print = 1; 

if &#40;isset&#40;$_REQUEST&#91;"siteid"&#93;&#41;&#41; 
   $siteid = round&#40;$_REQUEST&#91;"siteid"&#93;&#41;; 

if &#40;isset&#40;$_REQUEST&#91;"pre"&#93;&#41;&#41; 
   $pre = round&#40;$_REQUEST&#91;"pre"&#93;&#41;; 
    
// start SQL for TITLE in detail.php header 
if &#40;$validation == 1 AND empty&#40;$pre&#41;&#41; &#123; $val_string = " AND valid = 1"; &#125; else &#123; $val_string = ""; &#125; 
$sql_links = "select * from $ads_tbl, $cat_tbl, $usr_tbl where catid=sitecatid AND ad_username = $usr_tbl.email AND siteid=$siteid $val_string"; 
$sql_result = q &#40;$sql_links&#41;; 
$num_links = mysql_num_rows&#40;$sql_result&#41;; 
$row = mysql_fetch_array&#40;$sql_result&#41;; 
$sitetitle = $row&#91;"sitetitle"&#93;; 
$catfullname = $row&#91;"catfullname"&#93;; 
$sitedescription = $row&#91;"sitedescription"&#93;; 



// END     
    
if &#40;!isset&#40;$print&#41;&#41; 
   include_once&#40;"header_inc1.php"&#41;; 

header_inc1

<? 
if &#40;!empty&#40;$set_stat&#41;&#41; 
   gatherStats&#40;&#41;; 

if &#40;isset&#40;$catname&#41;&#41; 
   $fArray&#91;"PAGE"&#93; = "$catname"; 
else 
      $fArray&#91;"PAGE"&#93; = ""; 

if &#40;isset&#40;$name_of_site&#41;&#41;    
   $fArray&#91;"SITENAME"&#93; = "$name_of_site"; 
else 
   $fArray&#91;"SITENAME"&#93; = ""; 
    
   if &#40;isset&#40;$sitedescription&#41;&#41;    
   $fArray&#91;"SITEDESCRIPTION"&#93; = substr&#40;" $sitedescription ",0,200&#41;; 
else 
   $fArray&#91;"SITEDESCRIPTION"&#93; = ""; 


if &#40;isset&#40;$sitetitle&#41;&#41;    
   $fArray&#91;"SITETITLE"&#93; = "$sitetitle"; 
else 
   $fArray&#91;"SITETITLE"&#93; = ""; 
    

 ""; 

// Execute 
writeTemplate&#40;"header1",$fArray&#41;;    
?>

header1.html

<?xml version="1.0" encoding="iso-8859-1"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"  "http&#58;//www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<head> 
<title>%SITETITLE%  any text</title> 
<meta name="keywords" content="%SITETITLE%  any text"> 
<meta name="description" content="%SITEDESCRIPTION%  any text"> 

<link rel="stylesheet" href="style.css" type="text/css" /> 
<script language="JavaScript"> 
<!-- 
function openPage&#40;URL&#41; &#123; aWindow=window.open&#40;URL,"Large","toolbar=no,width=500,height=500,status=no,scrollbars=yes,resize=no,menubars=no"&#41;; 
&#125; 
--> 
</script> 
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head> 


<body bgcolor="#ffffff" background="bck.gif">  

+ -

Re: Adjust ad details for SEO

<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
is telling the spider to not index the page or follow any links on the page,
which isnt going to get the individual ad page into the index...

<META HTTP-EQUIV="EXPIRES"
CONTENT="Mon, 22 Jul 2002 11:12:01 GMT">

would work if you can get the expire date in gmt and rfc1123, whcih is the format listed.....

or you can change the ad removed page to randomly display links to other ads using the following code.default is set to 10 ads but you can adjust to what you need, this should keep you from tripping any dupe content filters, but usually on dupe content google just picks the page that is thinks is most important and either deindexes or makes the others supplemental results

first on detail.php find this code (lines 773-797 rough estimate actually lines may vary)

<?
&#125;

if &#40;$num_links == 0&#41;
&#123;
    include_once&#40;"header_inc.php"&#41;;
    include_once&#40;"admin/inc.php"&#41;;
    include_once&#40;"navigation.php"&#41;;
    print "<p><img border='0' src='images/blank.gif' height='20' align='left'>";
    print "<b>$la_ad_removed_caption</b><br>";
    echo formatString&#40;$la_ad_removed_content,array&#40;"http&#58;//$url"&#41;&#41;;
    
    print "</p></td></tr></table>";
    include_once&#40;"footer_inc.php"&#41;;
    exit;
&#125;


$tell=$sitehits+1;
$s = "UPDATE $ads_tbl set sitehits=$tell,datestamp='$datestamp' where siteid=$siteid";
$result1=q&#40;$s&#41;;

?>

and change it to this

<?
&#125;

if &#40;$num_links == 0&#41;
&#123;
    include_once&#40;"header_inc.php"&#41;;
    include_once&#40;"admin/inc.php"&#41;;
    include_once&#40;"navigation.php"&#41;;
    print "<p><img border='0' src='images/blank.gif' height='20' align='left'>";
    print "<b>$la_ad_removed_caption</b><br>";
    echo formatString&#40;$la_ad_removed_content,array&#40;"http&#58;//$url"&#41;&#41;;
    print "<br><b>check out our other listings</b><br>";
    include "deadads.php" ;
    print "</p></td></tr></table>";
    include_once&#40;"footer_inc.php"&#41;;
    exit;
&#125;


$tell=$sitehits+1;
$s = "UPDATE $ads_tbl set sitehits=$tell,datestamp='$datestamp' where siteid=$siteid";
$result1=q&#40;$s&#41;;

?>

you can edit the "check out our other listings" text to anything...

now create a file called "deadads.php" and copy and paste the applicable code below

for rewritten urls use this code

<?php 
// DEAD AD REPLACEMENT REWRITTEN URLS  

// SETTINGS TO BE EDITED
$adnumber = "10";  //number of ads listed on page 
$url = "http&#58;//www.domain.com/classifieds/" ;  // url to directory must have trailing slash 
$hostname_sitemap = "localhost";         // mysql location  
$database_sitemap = "xxxxxxxxxx";  // mysql database 
$username_sitemap = "xxxxxxxxx";        // mysql user 
$password_sitemap = "xxxxxxxxx";        //  mysql password  

//hmmmmm dunno what to say 
$sitemap = mysql_pconnect&#40;$hostname_sitemap, $username_sitemap, $password_sitemap&#41; or trigger_error&#40;mysql_error&#40;&#41;,E_USER_ERROR&#41;; 

// okay know let's hook up with our base and slide our query in 
mysql_select_db&#40;$database_sitemap, $sitemap&#41;; 
$query_Recordset1 = "SELECT * FROM ad ORDER BY RAND&#40;&#41; LIMIT 0, $adnumber"; 
$Recordset1 = mysql_query&#40;$query_Recordset1, $sitemap&#41; or die&#40;mysql_error&#40;&#41;&#41;; 
$row_Recordset1 = mysql_fetch_assoc&#40;$Recordset1&#41;; 
$totalRows_Recordset1 = mysql_num_rows&#40;$Recordset1&#41;; 
  
 do &#123; 
?>

<table width="100%"  border="0" cellspacing="0" cellpadding="0"> 
  <tr> 
    <td width="42%"><a href="<? echo $url ?><?php echo $row_Recordset1&#91;'siteid'&#93;; ?>.html" target="_blank"><?php echo $row_Recordset1&#91;'sitetitle'&#93;; ?></td> 

  </tr>  
</table> 

<?php &#125; while &#40;$row_Recordset1 = mysql_fetch_assoc&#40;$Recordset1&#41;&#41;; ?> 

for regular urls use this code

<?php 
// DEAD AD REPLACEMENT NORMAL URLS

// SETTINGS TO BE EDITED
$adnumber = "10";  //number of ads listed on page 
$url = "http&#58;//www.domain.com/classifieds/detail.php?siteid=" ;  // url to detail.php?siteid= 
$hostname_sitemap = "localhost";         // mysql location  
$database_sitemap = "xxxxxxxxxx";  // mysql database 
$username_sitemap = "xxxxxxxxx";        // mysql user 
$password_sitemap = "xxxxxxxxx";        //  mysql password 

//hmmmmm dunno what to say 
$sitemap = mysql_pconnect&#40;$hostname_sitemap, $username_sitemap, $password_sitemap&#41; or trigger_error&#40;mysql_error&#40;&#41;,E_USER_ERROR&#41;; 

// okay know let's hook up with our base and slide our query in 
mysql_select_db&#40;$database_sitemap, $sitemap&#41;; 
$query_Recordset1 = "SELECT * FROM ad ORDER BY RAND&#40;&#41; LIMIT 0, $adnumber"; 
$Recordset1 = mysql_query&#40;$query_Recordset1, $sitemap&#41; or die&#40;mysql_error&#40;&#41;&#41;; 
$row_Recordset1 = mysql_fetch_assoc&#40;$Recordset1&#41;; 
$totalRows_Recordset1 = mysql_num_rows&#40;$Recordset1&#41;; 
  
 do &#123; 
?>

<table width="100%"  border="0" cellspacing="0" cellpadding="0"> 
  <tr> 
    <td width="42%"><a href="<? echo $url ?><?php echo $row_Recordset1&#91;'siteid'&#93;; ?>" target="_blank"><?php echo $row_Recordset1&#91;'sitetitle'&#93;; ?></td> 

  </tr>  
</table> 

<?php &#125; while &#40;$row_Recordset1 = mysql_fetch_assoc&#40;$Recordset1&#41;&#41;; ?> 

make sure deadads.php is in the same folder as detail.php

+ -

Re: Adjust ad details for SEO

thx

this is what i have so far for my header1.html:

[code]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"  "http&#58;//www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>%SITETITLE% &#58;&#58; %SITENAME%</title>

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-15">
  <meta http-equiv="Content-Script-Type" content="text/javascript">
  <link rel="SHORTCUT ICON" href="/favicon.ico">
  <meta name="title" content="Free classifieds.">
  <meta name="description" content="%SITEDESCRIPTION% &#58;&#58; your site">
  <meta name="robots" content="index,follow">

  <meta name="googlebot" content="index,follow,noarchive">
  <meta name="revisit-after" content="1 days">
  <meta name="keywords" lang="nl" content="%SITETITLE% &#58;&#58; your site">
  <meta name="keywords" lang="fr" content="ventes aux ench

Dare to step out

Re: Adjust ad details for SEO

<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
is telling the spider to not index the page or follow any links on the page,
which isnt going to get the individual ad page into the index...

<META HTTP-EQUIV="EXPIRES"
CONTENT="Mon, 22 Jul 2002 11:12:01 GMT">

would work if you can get the expire date in gmt and rfc1123, whcih is the format listed.....

or you can change the ad removed page to randomly display links to other ads using the following code.default is set to 10 ads but you can adjust to what you need, this should keep you from tripping any dupe content filters, but usually on dupe content google just picks the page that is thinks is most important and either deindexes or makes the others supplemental results

first on detail.php find this code (lines 773-797 rough estimate actually lines may vary)

<?
&#125;

if &#40;$num_links == 0&#41;
&#123;
    include_once&#40;"header_inc.php"&#41;;
    include_once&#40;"admin/inc.php"&#41;;
    include_once&#40;"navigation.php"&#41;;
    print "<p><img border='0' src='images/blank.gif' height='20' align='left'>";
    print "<b>$la_ad_removed_caption</b><br>";
    echo formatString&#40;$la_ad_removed_content,array&#40;"http&#58;//$url"&#41;&#41;;
    
    print "</p></td></tr></table>";
    include_once&#40;"footer_inc.php"&#41;;
    exit;
&#125;


$tell=$sitehits+1;
$s = "UPDATE $ads_tbl set sitehits=$tell,datestamp='$datestamp' where siteid=$siteid";
$result1=q&#40;$s&#41;;

?>

and change it to this

<?
&#125;

if &#40;$num_links == 0&#41;
&#123;
    include_once&#40;"header_inc.php"&#41;;
    include_once&#40;"admin/inc.php"&#41;;
    include_once&#40;"navigation.php"&#41;;
    print "<p><img border='0' src='images/blank.gif' height='20' align='left'>";
    print "<b>$la_ad_removed_caption</b><br>";
    echo formatString&#40;$la_ad_removed_content,array&#40;"http&#58;//$url"&#41;&#41;;
    print "<br><b>check out our other listings</b><br>";
    include "deadads.php" ;
    print "</p></td></tr></table>";
    include_once&#40;"footer_inc.php"&#41;;
    exit;
&#125;


$tell=$sitehits+1;
$s = "UPDATE $ads_tbl set sitehits=$tell,datestamp='$datestamp' where siteid=$siteid";
$result1=q&#40;$s&#41;;

?>

you can edit the "check out our other listings" text to anything...

now create a file called "deadads.php" and copy and paste the applicable code below

for rewritten urls use this code

<?php 
// DEAD AD REPLACEMENT REWRITTEN URLS  

// SETTINGS TO BE EDITED
$adnumber = "10";  //number of ads listed on page 
$url = "http&#58;//www.domain.com/classifieds/" ;  // url to directory must have trailing slash 
$hostname_sitemap = "localhost";         // mysql location  
$database_sitemap = "xxxxxxxxxx";  // mysql database 
$username_sitemap = "xxxxxxxxx";        // mysql user 
$password_sitemap = "xxxxxxxxx";        //  mysql password  

//hmmmmm dunno what to say 
$sitemap = mysql_pconnect&#40;$hostname_sitemap, $username_sitemap, $password_sitemap&#41; or trigger_error&#40;mysql_error&#40;&#41;,E_USER_ERROR&#41;; 

// okay know let's hook up with our base and slide our query in 
mysql_select_db&#40;$database_sitemap, $sitemap&#41;; 
$query_Recordset1 = "SELECT * FROM ad ORDER BY RAND&#40;&#41; LIMIT 0, $adnumber"; 
$Recordset1 = mysql_query&#40;$query_Recordset1, $sitemap&#41; or die&#40;mysql_error&#40;&#41;&#41;; 
$row_Recordset1 = mysql_fetch_assoc&#40;$Recordset1&#41;; 
$totalRows_Recordset1 = mysql_num_rows&#40;$Recordset1&#41;; 
  
 do &#123; 
?>

<table width="100%"  border="0" cellspacing="0" cellpadding="0"> 
  <tr> 
    <td width="42%"><a href="<? echo $url ?><?php echo $row_Recordset1&#91;'siteid'&#93;; ?>.html" target="_blank"><?php echo $row_Recordset1&#91;'sitetitle'&#93;; ?></td> 

  </tr>  
</table> 

<?php &#125; while &#40;$row_Recordset1 = mysql_fetch_assoc&#40;$Recordset1&#41;&#41;; ?> 

for regular urls use this code

<?php 
// DEAD AD REPLACEMENT NORMAL URLS

// SETTINGS TO BE EDITED
$adnumber = "10";  //number of ads listed on page 
$url = "http&#58;//www.domain.com/classifieds/detail.php?siteid=" ;  // url to detail.php?siteid= 
$hostname_sitemap = "localhost";         // mysql location  
$database_sitemap = "xxxxxxxxxx";  // mysql database 
$username_sitemap = "xxxxxxxxx";        // mysql user 
$password_sitemap = "xxxxxxxxx";        //  mysql password 

//hmmmmm dunno what to say 
$sitemap = mysql_pconnect&#40;$hostname_sitemap, $username_sitemap, $password_sitemap&#41; or trigger_error&#40;mysql_error&#40;&#41;,E_USER_ERROR&#41;; 

// okay know let's hook up with our base and slide our query in 
mysql_select_db&#40;$database_sitemap, $sitemap&#41;; 
$query_Recordset1 = "SELECT * FROM ad ORDER BY RAND&#40;&#41; LIMIT 0, $adnumber"; 
$Recordset1 = mysql_query&#40;$query_Recordset1, $sitemap&#41; or die&#40;mysql_error&#40;&#41;&#41;; 
$row_Recordset1 = mysql_fetch_assoc&#40;$Recordset1&#41;; 
$totalRows_Recordset1 = mysql_num_rows&#40;$Recordset1&#41;; 
  
 do &#123; 
?>

<table width="100%"  border="0" cellspacing="0" cellpadding="0"> 
  <tr> 
    <td width="42%"><a href="<? echo $url ?><?php echo $row_Recordset1&#91;'siteid'&#93;; ?>" target="_blank"><?php echo $row_Recordset1&#91;'sitetitle'&#93;; ?></td> 

  </tr>  
</table> 

<?php &#125; while &#40;$row_Recordset1 = mysql_fetch_assoc&#40;$Recordset1&#41;&#41;; ?> 

make sure deadads.php is in the same folder as detail.php

this one i will try to figure out later...looks difficult but thx wink

Tc

Dare to step out

Re: Adjust ad details for SEO

i just want to know if its a solution for ???

PHP Classifieds 6.20 Released 10.12.2005

Thanks

+ -

Re: Adjust ad details for SEO

Yes buts its easier just to create another header called header_no_ads.php or summat with the noindex, nofollow metas in it.

Man in a suitcase

+ -

Re: Adjust ad details for SEO

All the code examples are complicated to understand. Could anyone summarise it and give correct code to implement Ad Title as webpage title for each detail.php page (for v6.xx series)?

+ -