PhpDig.net

PhpDig.net (http://www.phpdig.net/forum/index.php)
-   Feedback & News (http://www.phpdig.net/forum/forumdisplay.php?f=25)
-   -   PhpDig Version 1.8.6 Released (http://www.phpdig.net/forum/showthread.php?t=1642)

Charter 12-15-2004 09:38 PM

PhpDig Version 1.8.6 Released
 
Hi. PhpDig version 1.8.6 has been released as a 'minor' release. The changes can be found in the Changelog 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 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 thread. Note however than any announcements regarding v.1.8.6 will be posted in this 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.

Code:

==========

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.

Code:

# 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 thread. The third is to remove some hardcoded text.

In limit_upd.php find:
PHP Code:

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

And replace with:
PHP Code:

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

In spider.php find:
PHP Code:

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


And replace with:
PHP Code:

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:
PHP Code:

echo "Wait... "

And replace both instances with:
PHP Code:

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:
PHP Code:

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


And replace with:
PHP Code:

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

if (
$n_start+$limite-$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:
PHP Code:

search.php 

And replace that part of each link with:
PHP Code:

".SEARCH_PAGE."&browse=

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 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 post, as well as a couple of other doodads, have already been applied to the package.


All times are GMT -8. The time now is 08:25 AM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.