PhpDig.net

Go Back   PhpDig.net > PhpDig Forums > Bug Tracker

Reply
 
Thread Tools
Old 05-16-2006, 01:26 AM   #1
shockfreezer
Green Mole
 
Join Date: Oct 2005
Location: Switzerland
Posts: 6
Exclude not working 1.8.9 RC1 (Workaround included)

Hi there,

ok time for another workaround in phpDig 1.8.9 RC1:
The new spider engine removes all line breaks in the content wich would retrieve.
That causes a problem with the exclude mechanism. This mechanisem works until now line based, that means that every line is checked for an exclude. If there is an exclude no more lines would be stored until the next include tag.
If there is just one line of content with exclude and include tags included this mechanism dosn't work.

That's why I've written a little regex to remove all the parts in the line wich are excluded.
Insert following code in file admin/robot_functions.php in function phpdigIndexFile on line 1219 :
PHP Code:
foreach ($file_content as $num => $line) {
    
//Remove excludet parts
    
$pattern "".preg_quote(PHPDIG_EXCLUDE_COMMENT).".+?".preg_quote(PHPDIG_INCLUDE_COMMENT)."";
    
$line mb_eregi_replace("".$pattern."","",$line);
    if (
trim($line)) { 
At the moment this code is experimental, it looks like it works fine, but i can't guarantee that it will work on your site!

Greez
shockfreezer
shockfreezer is offline   Reply With Quote
Old 05-16-2006, 01:55 AM   #2
shockfreezer
Green Mole
 
Join Date: Oct 2005
Location: Switzerland
Posts: 6
Ok first fix is here:
PHP Code:
$pattern "".preg_quote(PHPDIG_EXCLUDE_COMMENT).".+?(".preg_quote(PHPDIG_INCLUDE_COMMENT)."|$)"
shockfreezer is offline   Reply With Quote
Reply


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
PDF Indexing Workaround on Shared Hosting dekortage Mod Submissions 0 02-07-2007 12:17 PM
Certain sites, pages and pdfs are not indexed 1.8.9 RC1 [Workaround included] obottek Bug Tracker 0 08-24-2006 06:30 AM
Strange db change behavior [Fix included] shockfreezer Bug Tracker 0 06-22-2006 08:11 AM
Spider CLI call under Windows fails [Workaround included] shockfreezer Bug Tracker 0 06-22-2006 07:58 AM
files above 2 levels can not be included using require_once or include ravi Coding & Tutorials 0 06-15-2006 04:33 AM


All times are GMT -8. The time now is 01:00 AM.


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