Welcome to Geeklog, Anonymous Saturday, December 21 2024 @ 10:02 am EST

Geeklog Forums

how to index site by google

Page navigation


Status: offline

ekendra

Forum User
Newbie
Registered: 09/11/04
Posts: 1
caffeinated
:helpme:

my problem is a little different.

my site's index page is recognized by google.

none of the individual articles are indexed though.

if i apply the above fix, will that make articles that I've already posted readable by googlebot?

Is there any sort of 'archives' plug-in available?
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by ekendra: if i apply the above fix, will that make articles that I've already posted readable by googlebot?

Only if it visits the old pages occasionally (index.php?page=2, etc.).

Quote by ekendra: Is there any sort of 'archives' plug-in available?

Tom Willet's site index script should help here.

bye, Dirk
 Quote

Status: offline

ByteEnable

Forum User
Full Member
Registered: 10/20/03
Posts: 138
Quote by ekendra: Is there any sort of 'archives' plug-in available?

Text Formatted Code

<?php
$lib_common = '/home/ByteEnable/www/lib-common.php';
include($lib_common);

    global $_TABLES, $_CONF;

//For NAV_menu
$topic = $page;

$display  = '';
$display .= COM_siteHeader('menu');
$display .= COM_startBlock('FrontPage Archive');
$display .= '<BR>The FrontPage Archive only contains headlines for the past seven days.<BR>
             <BR>The <A class="release-link" HREF="http://www.linuxelectrons.com/search.php">Advanced Search</A> feature can search the entire site by the dates of your choosing.<BR>';
$startDate = time() ;
$endDate = $startDate - 604800;

$dMonth = date("m",$startDate);
$dDay = date("d",$startDate);
$dYear = date("Y",$startDate);
$startDate = mktime(0,0,0,$dMonth,$dDay,$dYear);

$dMonth = date("m",$endDate);
$dDay = date("d",$endDate);
$dYear = date("Y",$endDate);
$endDate = mktime(0,0,0,$dMonth,$dDay,$dYear);

$sql = "SELECT sid,tid,title,comments,unix_timestamp(date) AS day FROM {$_TABLES['stories']} WHERE (draft_flag = 0) AND (date <= NOW()) AND (UNIX_TIMESTAMP(date) BETWEEN '$endDate' AND '$startDate') AND (perm_anon = 2) ORDER BY date desc";

    $result = DB_query( $sql );
    $nrows = DB_numRows( $result );

    if( $nrows > 0 ) // Did I get any results?
    {
        $dateonly = $_CONF['dateonly']; // If date is not defined, then define it
        if( empty( $dateonly ))
        {
            $dateonly = '%d-%b'; // fallback: day - abbrev. month name
        }

        $day = 'noday';
        $daycheck = '';
        $string = '';

        for( $i = 0; $i < $nrows; $i++ )
        {
            $A = DB_fetchArray( $result );
            $topic_anon = DB_getItem( $_TABLES['stories'], "tid='{$A['tid']}'", "sid='{$A['sid']}'");

            $daycheck = strftime( "%A", $A['day'] );

           if ( $day == 'noday' )
                {
// Display the Day and Date header for very first Day
                    $NextDay = strftime( "%d%b%y", $A['day'] );
                    $string = '<br><b>' . $daycheck . '</b> ' . $NextDay . LB . '<HR><BR>';
                    $display .= $string;
                    $oldnews = array();
                    $day = $daycheck; // Next Day ?
                }
            if( $day == $daycheck )
            {
// Copy article links into $oldnews array

                  $oldnews[] = '<a href="' . $_CONF['site_url']
                    . '/article.php?story=' . $A['sid'] . '">' . $A['title']
                    . '</a>';
                 
            }
                if( $day != $daycheck )
                {
// Display the Day and Date header

                    $display .= COM_makeList( $oldnews );              
                    $NextDay = strftime( "%d%b%y", $A['day'] );
                    $string = '<br><b>' . $daycheck . '</b> ' . $NextDay
                            . LB . '<HR><BR>';
                    $display .= $string;
                    $oldnews = array();
                    $day = $daycheck; // Next Day ?

                    $oldnews[] = '<a href="' . $_CONF['site_url']
                    . '/article.php?story=' . $A['sid'] . '">' . $A['title']
                    . '</a>';
                }
        }
    }

$display .= COM_makeList( $oldnews ); // Display the last day.
$display .= COM_endBlock();

// Get footer
$display .= COM_siteFooter(true);
// Output page
echo $display;
?>



 


FrontPage Archive
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
I've tried to summarize the above and a few other tips on "search engine optimisation" in a new FAQ entry:

Geeklog and search engines

bye, Dirk
 Quote

Page navigation

All times are EST. The time is now 10:02 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content