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.7 Released (http://www.phpdig.net/forum/showthread.php?t=1745)

Charter 01-16-2005 06:01 PM

PhpDig Version 1.8.7 Released
 
Hi. PhpDig version 1.8.7 has been released as a 'minor' release. The changes can be found in the Changelog file. Fresh install and upgrade instructions are given in the documentation. Do check this 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:
Code:

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

And afterwards add:
Code:

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

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

And replace with:
Code:

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

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

And replace that with the following:
Code:

//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.


All times are GMT -8. The time now is 12:45 AM.

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