Welcome! Log In Create A New Profile


(Re)index after changes in admin settings (from Tec)

Posted by rec 
(Re)index after changes in admin settings (from Tec)
June 30, 2007 06:10PM
Reindex with erase
Posted by: Tec (IP Logged)
Date: May 19, 2007 08:14AM

Sphider's Reindex detects MD5 checksum changes at the sites you indexed before. But it dosn't recocnize changes you did in admin section. In order to solve this, here is a solution truncating the required tables of your database before reindexing.

Install a new script into folder ./admin/ which is called erase.php with the following content:

<!-- Start of erase.php -->
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="admin.css" type="text/css" />

include "auth.php";
$settings_dir = "../settings";
include "$settings_dir/conf.php";

$erase =array ("domains","keywords","links","link_keyword0","link_keyword1","link_keyword2","link_keyword3","link_keyword4","link_keyword5","link_keyword6","link_keyword7","link_keyword8","link_keyword9","link_keyworda","link_keywordb","link_keywordc","link_keywordd","link_keyworde","link_keywordf","pending"winking smiley;
foreach ($erase as $allthis){
mysql_query ("TRUNCATE `".$mysql_table_prefix."$allthis`"winking smiley;
echo mysql_error();

print "<br>Erasing done<br><br>";

<a href='spider.php?all=1'><br>Okay, now reindex all<br><br></a>
<a href='admin.php'><br>Return to admin without reindex</a>
<!-- End of erase.php -->

Now open /admin/admin.php and search for:

<li><a href='spider.php?all=1'>Reindex all</a><br><br></li>

After this, place a new row with this content:

<li><a href='erase.php'>Reindex all with erase</a><br><br></li>

Ready. In admin section "Sites" now you will find a new item called "Reindex with erase". Use this to do an index after you changed admin settings.

Anonymous User
Re: (Re)index after changes in admin settings (from Tec)
June 30, 2007 06:14PM
There are a lot of situations in which you need this
Sorry, only registered users may post in this forum.

Click here to login