PDA

View Full Version : PhpDig Version 1.8.6 Released


Charter
12-15-2004, 09:38 PM
Hi. PhpDig version 1.8.6 has been released as a 'minor' release. The changes can be found in the Changelog (http://www.phpdig.net/info/changelog.txt) file. Seven database tables were altered. To upgrade, make the database table changes, copy over the old files with the new files and reconfigure the new connect.php and config.php files. Also, check this (http://www.phpdig.net/forum/showthread.php?t=1642) thread on a regular basis for any possible code changes to PhpDig version 1.8.6. If you want a text file of the changes, then check this (http://www.phpdig.net/forum/showthread.php?t=1608) thread. Note however than any announcements regarding v.1.8.6 will be posted in this (http://www.phpdig.net/forum/showthread.php?t=1642) thread.

Charter
12-16-2004, 12:06 PM
So a couple of tiny tweaks... The first tweak is just to let you know where things are set/checked. The second tweak is because that piece of code is no longer needed.

Note that these tweaks are for PhpDig v.1.8.6, and if you downloaded PhpDig after the date of this post, then the changes have already been applied.


==========

In search_function.php find:

// refine_url set in search_function.php file

And replace with:

// $refine_url set in search_function.php file
// $lim_start set in search_function.php file

==========

In search_function.php find:

if ($limite) {
settype ($limite,"integer");
}
else {
$limite = SEARCH_DEFAULT_LIMIT;
}

And remove it.

==========

Charter
12-17-2004, 03:51 PM
As baskamer pointed out, seven tables have duplicate indexes, so to remove the duplicate indexes, run the following queries.


# Update from the 1.8.5 version
# Add the table prefix if needed
# ---------------------------------
ALTER TABLE excludes DROP INDEX ex_id;
ALTER TABLE includes DROP INDEX in_id;
ALTER TABLE keywords DROP INDEX key_id;
ALTER TABLE logs DROP INDEX l_id;
ALTER TABLE sites DROP INDEX site_id;
ALTER TABLE spider DROP INDEX spider_id;
ALTER TABLE tempspider DROP INDEX id;

Note: If you did a fresh install of PhpDig v.1.8.6 after the date of this post, do not run these queries, as the init_db.sql file has been updated to prevent the duplicate indexes.

Also, some credits and copyright information was updated, plus the contributions directory has been removed. The files that were in the contributions directory have been placed in the includes and locales directories instead.

If you downloaded PhpDig v.1.8.6 after the date of this post, the changes in this post have already been applied to the package.

Charter
01-03-2005, 07:31 AM
Here are three more tweaks for PhpDig v.1.8.6. The first is to correct a bug when doing eregi_replace to prevent mismatched types. The second stems from this (http://www.phpdig.net/forum/showthread.php?t=1659) thread. The third is to remove some hardcoded text.

In limit_upd.php find:

$site_cron = eregi_replace('DAY',$days,$tpl_cron);
$site_cron = eregi_replace('URL',$url,$site_cron);

And replace with:

$site_cron = eregi_replace("DAY","$days",$tpl_cron);
$site_cron = eregi_replace("URL","$url",$site_cron);


In spider.php find:

if (!phpdigReadRobots($exclude,$temp_path) && !eregi(FORBIDDEN_EXTENSIONS,$temp_file)) {
$result_test_http = phpdigTestUrl($url_indexing,'date',$cookies);
}

And replace with:

if (!phpdigReadRobots($exclude,$temp_path.$temp_file) && !eregi(FORBIDDEN_EXTENSIONS,$temp_path.$temp_file)) {
$result_test_http = phpdigTestUrl($url_indexing,'date',$cookies);
}


In stop_spider.php find two instances of:

echo "Wait... ";

And replace both instances with:

echo phpdigMsg('wait');

If you downloaded PhpDig v.1.8.6 after the date of this post, the changes in this post have already been applied to the package.

Charter
01-03-2005, 06:10 PM
A couple more tweaks for PhpDig v.1.8.6...

The first tweak shores up the pagination by keeping links within the result pages and setting proper page start positions. The second tweak removes the hardcoded search page and disables logging for the template links.

In search_function.php find:

$n_start = $lim_start+1;
$num_tot = count($final_result);
if ($n_start+$limite-1 < $num_tot) {
$n_end = ($lim_start+$limite);
$more_results = 1;
}
else {
$n_end = $num_tot;
$more_results = 0;
}

And replace with:

$lim_start = max(0, $lim_start-($lim_start % $limite));
$n_start = $lim_start+1;
$num_tot = count($final_result);

if ($n_start+$limite-1 < $num_tot) {
$n_end = ($lim_start+$limite);
$more_results = 1;
}
else {
$n_end = $num_tot;
$more_results = 0;
}

if ($n_start > $n_end) {
$n_start = 1;
$n_end = min($num_tot,$limite);
$lim_start = 0;
if ($n_end < $num_tot) {
$more_results = 1;
}
}

In function_phpdig_form.php find the $result['templates_links'] variable.

Now in each of the 13 template links find:

search.php

And replace that part of each link with:

".SEARCH_PAGE."&amp;browse=1

If you downloaded PhpDig v.1.8.6 after the date of this post, the changes in this post have already been applied to the package.

Charter
01-04-2005, 11:53 PM
See this (http://www.phpdig.net/forum/showthread.php?p=7144#post7144) post for a code change you should apply. If you downloaded PhpDig v.1.8.6 after the date of this post, the code change in this (http://www.phpdig.net/forum/showthread.php?p=7144#post7144) post, as well as a couple of other doodads, have already been applied to the package.