I have added the priority mod to a site I'm building but now it turns out I'll have at least three different ways that sites can improve their priority rating in the system.. I want to make sure I haven't missed anything in the logic of what I'm doing so bear with me while I explain.
What I need is a total of the three priority improving fields to use to sort the results by when building the pages each night. Each of these has a field in the table and will be updated in different ways. What I am going to do is adjust the sort order along these lines.. If I go to nph-build.cgi in sub build_category_pages, I see that the list of links from each category is retrieved here..
$get_links = $LINKDB->prepare (" SELECT * FROM Links WHERE CategoryID = ? ORDER BY $LINKS{build_sort_order_category} LIMIT 1000 ");
What I'm doing is adding something like this
$get_links = $LINKDB->prepare (" SELECT *,Priority1+Priority2+Priority3 as Priority FROM Links WHERE CategoryID = ? ORDER BY $LINKS{build_sort_order_category} LIMIT 1000 ");
Of course in Links.pm I have adjusted this
$LINKS{build_sort_order_category} = "Priority DESC,isNew,Title"
I haven't tested this on the actual build yet, but if I run the query from the command line, it seems to work fine when I mock up some data. I figure this way if I add any other priority improving methods, I should think I could just change this one line.... I realize I probably need to change either the field called Priority or the results of my calculated fields so I don't create other problems..
My question is, Is there anywhere else that I need to worry about this. I really don't use page.cgi to create dynamic pages.. I'm not sure yet if I want to implement this in search results. I'm just wondering if there might be anywhere else that I should be using the mysql calculated priority total.
TIA
JerryP
What I need is a total of the three priority improving fields to use to sort the results by when building the pages each night. Each of these has a field in the table and will be updated in different ways. What I am going to do is adjust the sort order along these lines.. If I go to nph-build.cgi in sub build_category_pages, I see that the list of links from each category is retrieved here..
$get_links = $LINKDB->prepare (" SELECT * FROM Links WHERE CategoryID = ? ORDER BY $LINKS{build_sort_order_category} LIMIT 1000 ");
What I'm doing is adding something like this
$get_links = $LINKDB->prepare (" SELECT *,Priority1+Priority2+Priority3 as Priority FROM Links WHERE CategoryID = ? ORDER BY $LINKS{build_sort_order_category} LIMIT 1000 ");
Of course in Links.pm I have adjusted this
$LINKS{build_sort_order_category} = "Priority DESC,isNew,Title"
I haven't tested this on the actual build yet, but if I run the query from the command line, it seems to work fine when I mock up some data. I figure this way if I add any other priority improving methods, I should think I could just change this one line.... I realize I probably need to change either the field called Priority or the results of my calculated fields so I don't create other problems..
My question is, Is there anywhere else that I need to worry about this. I really don't use page.cgi to create dynamic pages.. I'm not sure yet if I want to implement this in search results. I'm just wondering if there might be anywhere else that I should be using the mysql calculated priority total.
TIA
JerryP