PhpDig.net

Go Back   PhpDig.net > General Forums > Feedback & News

Closed Thread
 
Thread Tools
Old 01-30-2005, 07:44 PM   #1
Charter
Head Mole
 
Charter's Avatar
 
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.
Charter is offline  
Old 02-03-2005, 01:13 PM   #2
Charter
Head Mole
 
Charter's Avatar
 
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);
And replace with:
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;
Also, in this function find:
Code:
$first_bold_spot = max($first_bold_spot - round((SNIPPET_DISPLAY_LENGTH / 2),0), 0);
And replace with:
Code:
$first_bold_spot = (int) max($first_bold_spot - round((SNIPPET_DISPLAY_LENGTH / 2),0), 0);
If you downloaded PhpDig v.1.8.8 RC1 after the date of this post, the changes are already included in the package.
__________________
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.
Charter is offline  
Old 02-04-2005, 10:40 PM   #3
Charter
Head Mole
 
Charter's Avatar
 
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
And replace with:
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 robot_functions.php find the phpdigMakeUTF8 function.

In this function find:
Code:
if ($no_convert == 0) {
  return $string;
}
else {
  return 0;
}
And replace with:
Code:
if ($no_convert == 0) {
  if (ENABLE_JPKANA == true) {
    $string = @mb_convert_kana($string,CONVERT_JPKANA,"UTF-8");
  }
  return $string;
}
else {
  return 0;
}
In search_functions.php find:
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);
}
And replace with:
Code:
if ($query_string) {
    if (ENABLE_JPKANA == true) {
      $query_string = @mb_convert_kana($query_string,CONVERT_JPKANA,"UTF-8");
    }
    $query_string = phpdigVerifyUTF8($query_string);
}
Also in search_functions.php find:
Code:
$query_to_parse = mb_ereg_replace('&[^ ]+','',$query_to_parse); // avoid &[chars] in the query
And afterwards add:
Code:
$query_to_parse = mb_ereg_replace('[?]*','',$query_to_parse); // avoid ? in the query
If you downloaded PhpDig v.1.8.8 RC1 after the date of this post, the changes are already included in the package.
__________________
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.
Charter is offline  
Old 02-18-2005, 05:23 PM   #4
Charter
Head Mole
 
Charter's Avatar
 
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
And delete these two lines.

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++;
  }
And replace with:
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++;
        }
  }
Now run the following queries, adding your table prefix to engine and engine2 if needed:
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;
If you downloaded PhpDig v.1.8.8 RC1 after the date of this post, the code changes are already included in the package.
__________________
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.
Charter is offline  
Closed Thread


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

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


All times are GMT -8. The time now is 06:57 AM.


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