Welcome! Log In Create A New Profile

Advanced

Few bug fixed in last release

Posted by Olivier 
Few bug fixed in last release
March 14, 2007 02:39PM
Hello,

Thanks for the software, very easy to use to to customize. Fits my needs perfectly !!!

I came across few bugs that I had to fix here is the list:


1- Url port not taken into account
-----------------------------------
--In spiderfunc.php:
-Function remove_file_from_url() does not take into account port number in url..
We should have when $url_parts['port'] is not empty:
$url_parts['scheme']."://".$url_parts['host'].":".$url_parts['port'].$path;
-Same thing in url_purify().
We should have when $url_parts['port'] is not empty:
$url_parts['scheme']."://".$url_parts['host'].":".$url_parts['port'].$urlpath.$query;

2- Title keywords not trimed
----------------------------
In spiderfunc.php: function clean_file
If you have this:
<title>
MyTitle
</title>
Then in the keywords table you have that "\nMytitle" and as a result this word is never found.
Fix is "$title = trim($regs[1]);", line 594

3- Not well balanced comment -> rest of file ignored:
----------------------------------------------------
In spiderfunc.php: function clean_file

Example you have that:
<!-- coment -->
<title><title-->
<!-- comment -->

Fix is just to start searching the ending comment tag after the opening comment tag:

$first = strpos($file, "<!--"winking smiley;
$count = 0;
while(!($first === FALSE) && $count < 200) {
$count ++;
$next = strpos($file, "-->", $first); // Fix is here
$file = str_replace(substr($file, $first, $next - $first +3), " ", $file);
$first = strpos($file, "<!--"winking smiley;
}

I guess same thing should be done for "<script".
Re: Few bug fixed in last release
April 04, 2007 12:46PM
I would like to submit a small bug fixed.

Concerning template use.

the "standard" string is hard coded to the css link in header.html of any template....

I changed it to <?php $template?> and now my template "test_template" refers to the good folder of my css instead of "standard" folder

Sorry for my english i'm french :p

Best regards,
Re: Few bug fixed in last release
April 06, 2007 12:18PM
Bug on site browsing pages :

replace :

$links_to_next =$per_page;
$firstpage = $start - $links_to_next;
if ($firstpage < 1) $firstpage = 1;
$lastpage = $start + $links_to_next;
if ($lastpage > $pages) $lastpage = $pages;

By :

$firstpage = 1;
$lastpage = floor($numOfPages/$per_page);
$reminder = $numOfPages%$per_page;
if ($reminder > 0){
$lastpage += 1;
}

This fix let see all pages links and fix a bug on setting urls by page
rec
Re: Few bug fixed in last release
July 01, 2007 08:29PM
Olivier

You are out for a while.
rec
Re: Few bug fixed in last release
July 01, 2007 11:50PM
You can see under a large search engine, with certain key words, that Sphider fits needs of a lot of people around the world. I am among them.

So I/we hope that it goes on improving and updating.

That is why this is the latest release, not the last one.

Best regards.
Sorry, only registered users may post in this forum.

Click here to login