PDA

View Full Version : PhpDig Version 1.8.7 Released


Charter
01-16-2005, 06:01 PM
Hi. PhpDig version 1.8.7 has been released as a 'minor' release. The changes can be found in the Changelog (http://www.phpdig.net/info/changelog.txt) file. Fresh install and upgrade instructions are given in the documentation (http://www.phpdig.net/navigation.php?action=doc). Do check this (http://www.phpdig.net/forum/showthread.php?t=1745) thread on a regular basis for any possible code changes to PhpDig version 1.8.7.

Charter
01-21-2005, 06:19 PM
The SEARCH_DEFAULT_LIMIT constant in the config file can only understand 10, 30, or 100 as a value, but this is not noted in the config file. If you should happen to set SEARCH_DEFAULT_LIMIT to 20 for example, then you will get an "undefined offset" notice when error reporting is on high. To allow SEARCH_DEFAULT_LIMIT to take on values other than 10, 30, or 100, do the following:

In function_phpdig_form.php find:

$limit10 = array(10 => 'selected="selected"', 30=> '', 100=> '');
$limit30 = array(10 => '', 30=> 'selected="selected"', 100=> '');
$limit100 = array(10 => '', 30=> '', 100=> 'selected="selected"');

And afterwards add:

$limitopt_flag = 0;
if (!in_array(SEARCH_DEFAULT_LIMIT,array(10,30,100))) {
$limitopt_flag = 1;
$limit10[SEARCH_DEFAULT_LIMIT] = "";
$limit30[SEARCH_DEFAULT_LIMIT] = "";
$limit100[SEARCH_DEFAULT_LIMIT] = "";
$limitdef = array(10 => '', 30=> '', 100=> '', SEARCH_DEFAULT_LIMIT=> 'selected="selected"');
$limitoptdef = "<option ".$limitdef[$limite].">".SEARCH_DEFAULT_LIMIT."</option>";
}

$limitopt10 = "<option ".$limit10[$limite].">10</option>";
$limitopt30 = "<option ".$limit30[$limite].">30</option>";
$limitopt100 = "<option ".$limit100[$limite].">100</option>";

$limitselectopts = array(10=>$limitopt10, 30=>$limitopt30, 100=>$limitopt100);

if ($limitopt_flag == 1) {
$limitselectopts[SEARCH_DEFAULT_LIMIT] = $limitoptdef;
ksort($limitselectopts);
}

$selectoptlist = "";
foreach($limitselectopts as $selectopt) {
$selectoptlist .= $selectopt;
}

Also, in function_phpdig_form.php find:

<option ".$limit10[$limite].">10</option>
<option ".$limit30[$limite].">30</option>
<option ".$limit100[$limite].">100</option>

And replace with:

$selectoptlist

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

Charter
02-28-2005, 01:37 AM
FaberFedor noticed that dashed words such as foo-bar are not considered one word in PhpDig v.1.8.7.

To fix, in robot_functions.php find the phpdigCleanHtml function, and in this function find:

//replace foo characters by space
$text = eregi_replace("[*{}()\"\r\n\t-]+"," ",$text);

And replace that with the following:

//replace foo characters by space
$text = eregi_replace("[*{}()\"\r\n\t]+"," ",$text);

If you downloaded PhpDig v.1.8.7 after the date of this post, the changes are already included in the package.