![]() |
|
![]() |
#1 |
Green Mole
Join Date: Oct 2003
Posts: 8
|
custom sites phpdig:form_dropdown
Hi All,
I would like to specify which sites are listed on the search page because phpDig finds too many (clutters up list with unneeded info). I wanted to set this manually but it appears phpDig is adding a number to the site as a prefix, so hardcoding in the template wouldn't work, because this number might change. Is there a way to manually specify (say in config.php) which values should appear in the sites form_dropdown item? Thanks! John |
![]() |
![]() |
![]() |
#2 |
Orange Mole
Join Date: Mar 2004
Posts: 48
|
Hi,
You can set the number of results to display per site. In the config file find define('NUMBER_OF_RESULTS_PER_SITE',-1); //max number of results per site and set the value to what you like. |
![]() |
![]() |
![]() |
#3 |
Green Mole
Join Date: Oct 2003
Posts: 8
|
Hi jerrywin5,
I guess I wasn't clear what I was requesting. On the search page, there is a drop down list of sites at the top of the page that contains about 100 entries, many of which are useless. The search results are fine as they are. I just want to restrict the list of sites at the top in the drop down. The only two settings I can find that seem to affect the drop down are these: define('DISPLAY_DROPDOWN',true); define('DROPDOWN_URLS',true); So, I'd like to be able to dictate what appears in the drop-down. Does that make sense? Thanks for your kind consideration in replying! Regards, John |
![]() |
![]() |
![]() |
#4 |
Head Mole
Join Date: May 2003
Posts: 2,539
|
PhpDig dynamically creates the dropdown options based on the database content. If you wish to change the dropdown options rather than turn the dropdown off, you would need to edit the function_phpdig_form.php file.
__________________
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. |
![]() |
![]() |
![]() |
#5 |
Green Mole
Join Date: Oct 2003
Posts: 8
|
Thanks! That was the hint I needed. Here is what I did which I think might be useful for others. I added a simple substr_count so we don't get URL's deeper than the first level of the website. For my site structure, this is perfect. I'm sure YMMV for others.
about line 188 of function_phpdig_form.php... Code:
while ($dd_data = mysql_fetch_array($dd_query)) { ++ // limit results to only main URL's - don't get lots of useless stuff ++ if (substr_count($dd_data['path'],"/") <= 1) { $result['form_dropdown'] .= "<option value='".$dd_data['site_id'].",".$dd_data['path']."'>".$dd_data['site_url'].$dd_data['path']."</option>"; ++ } } |
![]() |
![]() |
![]() |
#6 |
Green Mole
Join Date: Oct 2003
Posts: 8
|
Oops! You also need to do the same change for the 'Narrow search results' on about line 140 of same file.
|
![]() |
![]() |
![]() |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
PHPDig won't index most sites and only go down one level on all | confusion | Troubleshooting | 1 | 10-14-2005 10:32 AM |
"I don't want to index your sites!!!" - said PHPDig | #ASH | How-to Forum | 1 | 04-06-2005 01:57 PM |
Can PhpDig spider only certain sites? | jkuzma | How-to Forum | 1 | 02-11-2005 02:38 PM |
custom install | rom | Script Installation | 16 | 02-23-2004 10:05 AM |