Make it possible to set negative priorities using addLinkPriority
Status: Beta
Brought to you by:
huni
Currently, it is only possible to increase priorities for links: only positive integers are allowed as argument and the default is 0.
I would like to decrease the priority of certain URLs, for example by setting a negative priority. An alternative solution could be to change the default priority from 0 to something higher.
Anonymous
View and moderate all "feature-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Feature Requests"
Actually, this is fairly simple. It seems that all of the code is totally capable of working with negative numbers. It's only the initial function addLinkPriority that checks with a regexp if there's it's a positive integer.
By changing line 1163 in libs/PHPCrawler.class.php to:
it will also allow negative integers to be entered and it will sort the link queue appropriately.
Hi!
Thanks for the report and the solution!
Will change this in the next version (probably).