|
01-30-2005, 07:44 PM | #1 |
Head Mole
Join Date: May 2003
Posts: 2,539
|
PhpDig Version 1.8.8 RC1 Released
Hi. PhpDig version 1.8.8 RC1 has been released as a 'minor+++++' release; it probably should be considered a major release. The changes can be found in the Changelog file.
Previous requirements (before v.1.8.8.RC1): - PHP safe_mode off, PHP allow_url_fopen on - See section 3.1 of the v.1.8.7 documentation New requirements (for v.1.8.8.RC1): - Previous requirements are still required (oh yeah!) - MySQL 4.1.7+ with UTF-8 and ability for SET queries - PHP 4.3.10+ with mbstring, mbstr-enc-trans, mbregex - Apache with Linux 2.4.26+ and htaccess file ability - Understanding of iconv to convert files and tables A fresh install works the same as before, assuming you meet the new requirements. Upgrade instructions (from v.1.8.7 to v.1.8.8 RC1) can be found in the UPGRADE.txt document included in the v.1.8.8. RC1 package. Make a backup of files/tables before attempting an upgrade! Do check this thread on a regular basis for any possible code changes to PhpDig v.1.8.8 RC1.
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension. |
02-03-2005, 01:13 PM | #2 |
Head Mole
Join Date: May 2003
Posts: 2,539
|
This is an improvement to PhpDig v.1.8.8 RC1 for locating and highlighting search terms contained in table content.
In search_functions.php, find the phpdigGetExtracts function. In this function find: Code:
$where_to_start = mb_strlen($extract_content); Code:
$max_off = (int) min(mb_strlen($query_string)+1,floor(0.80*mb_strlen($extract_content))); $where_to_start = mb_strlen($extract_content) - $max_off; Code:
$first_bold_spot = max($first_bold_spot - round((SNIPPET_DISPLAY_LENGTH / 2),0), 0); Code:
$first_bold_spot = (int) max($first_bold_spot - round((SNIPPET_DISPLAY_LENGTH / 2),0), 0);
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension. |
02-04-2005, 10:40 PM | #3 |
Head Mole
Join Date: May 2003
Posts: 2,539
|
This is an improvement to PhpDig v.1.8.8 RC1 handling of Japanese full/half-width characters (thanks to Edomondo).
In config.php find: Code:
/***********************************************************************************************************************/ //---------PATH SETTINGS Code:
/***********************************************************************************************************************/ //---------CONVERT JAPANESE KANA (only for Japanese) define('ENABLE_JPKANA',false); // activates/deactivates japanese kana conversion define('CONVERT_JPKANA','KVa'); // see http://us2.php.net/manual/en/function.mb-convert-kana.php for options /***********************************************************************************************************************/ //---------PATH SETTINGS In this function find: Code:
if ($no_convert == 0) { return $string; } else { return 0; } Code:
if ($no_convert == 0) { if (ENABLE_JPKANA == true) { $string = @mb_convert_kana($string,CONVERT_JPKANA,"UTF-8"); } return $string; } else { return 0; } Code:
if (!$option) { $option = SEARCH_DEFAULT_MODE; } if (!in_array($option,array('start','any','exact'))) { return 0; } if ($query_string) { $query_string = mb_eregi_replace("[?]*","",$query_string); } if ($query_string) { $query_string = phpdigVerifyUTF8($query_string); } Code:
if ($query_string) { if (ENABLE_JPKANA == true) { $query_string = @mb_convert_kana($query_string,CONVERT_JPKANA,"UTF-8"); } $query_string = phpdigVerifyUTF8($query_string); } Code:
$query_to_parse = mb_ereg_replace('&[^ ]+','',$query_to_parse); // avoid &[chars] in the query Code:
$query_to_parse = mb_ereg_replace('[?]*','',$query_to_parse); // avoid ? in the query
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension. |
02-18-2005, 05:23 PM | #4 |
Head Mole
Join Date: May 2003
Posts: 2,539
|
This is an improvement to PhpDig v.1.8.8 RC1 for keeping (quasi)duplicates out of the engine table.
In robot_functions.php find: Code:
$key = mb_ereg_replace("^([\x00-\x1f]|[\x21-\x2f]|[\x3a-\x40]|[\x5b-\x60]|[\x7b-\x7f])+","",$key); //off front only $key = mb_ereg_replace("([\x00-\x1f]|[\x21-\x2f]|[\x3a-\x40]|[\x5b-\x60]|[\x7b-\x7f])+$","",$key); //off back only Also, in robot_functions.php find: Code:
for ($token = strtok($text2, $separators); $token !== FALSE; $token = strtok($separators)) { if (!isset($nbre_mots[$token])) { $nbre_mots[$token] = 1; } else { $nbre_mots[$token]++; } $total++; } Code:
for ($token = strtok($text2, $separators); $token !== FALSE; $token = strtok($separators)) { $token = mb_ereg_replace("^([\x00-\x1f]|[\x21-\x2f]|[\x3a-\x40]|[\x5b-\x60]|[\x7b-\x7f])+","",$token); //off front only $token = mb_ereg_replace("([\x00-\x1f]|[\x21-\x2f]|[\x3a-\x40]|[\x5b-\x60]|[\x7b-\x7f])+$","",$token); //off back only $token = mb_strtolower(trim($token)); if (mb_strlen($token) > 0) { if (!isset($nbre_mots[$token])) { $nbre_mots[$token] = 1; } else { $nbre_mots[$token]++; } $total++; } } Code:
CREATE TABLE engine2 ( spider_id mediumint(9) DEFAULT '0' NOT NULL, key_id mediumint(9) DEFAULT '0' NOT NULL, weight smallint(4) DEFAULT '0' NOT NULL, KEY key_id (key_id) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE utf8_general_ci; INSERT INTO engine2 SELECT spider_id,key_id,sum(weight) AS weight FROM engine GROUP BY spider_id,key_id; DELETE FROM engine; INSERT INTO engine SELECT spider_id,key_id,weight FROM engine2; DROP TABLE engine2;
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
PhpDig Versions 1.8.9 RC1 and 1.8.8 Released | Charter | Feedback & News | 0 | 11-06-2005 11:34 PM |
PhpDig Version 1.8.6 Released | Charter | Feedback & News | 5 | 01-05-2005 12:53 AM |
PhpDig Version 1.8.5 Released | Charter | Feedback & News | 4 | 12-15-2004 10:18 PM |
PhpDig Version 1.8.4 Released | Charter | Feedback & News | 4 | 12-12-2004 02:43 AM |
PhpDig Version 1.6.3 Released | Charter | Feedback & News | 0 | 11-10-2003 05:00 PM |